[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 23 Jun 2006 05:05:34 -0000


albertel		Fri Jun 23 01:05:34 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - data table the course environemnt
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.314 loncom/interface/lonparmset.pm:1.315
--- loncom/interface/lonparmset.pm:1.314	Thu Jun 22 23:14:00 2006
+++ loncom/interface/lonparmset.pm	Fri Jun 23 01:05:33 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.314 2006/06/23 03:14:00 albertel Exp $
+# $Id: lonparmset.pm,v 1.315 2006/06/23 05:05:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2078,6 +2078,10 @@
             }
         }
     }
+
+    my $start_table     =&Apache::loncommon::start_data_table();
+    my $start_header_row=&Apache::loncommon::start_data_table_header_row();
+    my $end_header_row  =&Apache::loncommon::end_data_table_header_row();
 # ------------------------- Re-init course environment entries for this session
 
     &Apache::lonnet::coursedescription($env{'request.course.id'},
@@ -2243,13 +2247,15 @@
                 }
             }
 	}
+	
         foreach my $parameter (@Display_Order) {
             my $description = $descriptions{$parameter};
             # onchange is javascript to automatically check the 'Set' button.
             my $onchange = 'onFocus="javascript:window.document.forms'.
                 "['envform'].elements['".$parameter."_setparmval']".
                 '.checked=true;"';
-            $output .= '<tr><td>'.$description.'</td>';
+            $output .= &Apache::loncommon::start_data_table_row().
+		'<td>'.$description.'</td>';
             if ($parameter =~ /^default_enrollment_(start|end)_date$/) {
                 $output .= '<td>'.
                     &Apache::lonhtmlcommon::date_setter('envform',
@@ -2266,17 +2272,19 @@
             $output .= '<td>'.
                 &Apache::lonhtmlcommon::checkbox($parameter.'_setparmval').
                 '</td>';
-            $output .= "</tr>\n";
+            $output .= &Apache::loncommon::end_data_table_row()."\n";
 	}
         my $onchange = 'onFocus="javascript:window.document.forms'.
             '[\'envform\'].elements[\'newp_setparmval\']'.
             '.checked=true;"';
-	$output.='<tr><td><i>'.&mt('Create New Environment Variable').'</i><br />'.
+	$output.=&Apache::loncommon::start_data_table_row().
+	    '<td><i>'.&mt('Create New Environment Variable').'</i><br />'.
 	    '<input type="text" size=40 name="newp_name" '.
                 $onchange.' /></td><td>'.
             '<input type="text" size=40 name="newp_value" '.
                 $onchange.' /></td><td>'.
-	    '<input type="checkbox" name="newp_setparmval" /></td></tr>';
+	    '<input type="checkbox" name="newp_setparmval" /></td>'.
+	    &Apache::loncommon::end_data_table_row()."\n";
     }
     my %lt=&Apache::lonlocal::texthash(
 		    'par'   => 'Parameter',
@@ -2298,16 +2306,18 @@
 				       $browse_js);
     my $end_page = 
 	&Apache::loncommon::end_page();
+    my $end_table=&Apache::loncommon::end_data_table();
     $r->print(<<ENDENV);
 $start_page
 $breadcrumbs
 <form method="post" action="/adm/parmset?action=crsenv" name="envform">
 $setoutput
-<p>
-<table border=2>
-<tr><th>$lt{'par'}</th><th>$lt{'val'}</th><th>$lt{'set'}?</th></tr>
+$start_table
+$start_header_row
+<th>$lt{'par'}</th><th>$lt{'val'}</th><th>$lt{'set'}?</th>
+$end_header_row
 $output
-</table>
+$end_table
 <input type="submit" name="crsenv" value="$lt{'sce'}">
 </form>
 $end_page