[LON-CAPA-cvs] cvs: loncom /homework grades.pm

albertel lon-capa-cvs@mail.lon-capa.org
Sat, 04 Jun 2005 19:02:23 -0000


albertel		Sat Jun  4 15:02:23 2005 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  <label> how I love thee
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.271 loncom/homework/grades.pm:1.272
--- loncom/homework/grades.pm:1.271	Fri Jun  3 23:36:36 2005
+++ loncom/homework/grades.pm	Sat Jun  4 15:02:19 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.271 2005/06/04 03:36:36 albertel Exp $
+# $Id: grades.pm,v 1.272 2005/06/04 19:02:19 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3873,12 +3873,12 @@
 
 sub scantron_CODEunique {
     my $result='<nobr>
-                 <input type="radio" name="scantron_CODEunique"
-                        value="Yes" checked="on" /> Yes
+                 <label><input type="radio" name="scantron_CODEunique"
+                        value="Yes" checked="on" /> Yes </label>
                 </nobr>
                 <nobr>
-                 <input type="radio" name="scantron_CODEunique"
-                        value="No" /> No
+                 <label><input type="radio" name="scantron_CODEunique"
+                        value="No" /> No </label>
                 </nobr>';
     return $result;
 }
@@ -3928,8 +3928,8 @@
           <tr bgcolor="#ffffe6">
 	    <td> Options: </td>
             <td>
-                <input type="checkbox" name="scantron_options_redo" value="redo_skipped"/> Do only previously skipped records <br />
-                <input type="checkbox" name="scantron_options_ignore" value="ignore_corrections"/> Remove all exisiting corrections
+	       <label><input type="checkbox" name="scantron_options_redo" value="redo_skipped"/> Do only previously skipped records</label> <br />
+               <label><input type="checkbox" name="scantron_options_ignore" value="ignore_corrections"/> Remove all exisiting corrections</label>
 	    </td>
           </tr>
           <tr bgcolor="#ffffe6">
@@ -4740,13 +4740,13 @@
 	    foreach my $testcode (@{$closest}) {
 		my $checked='';
 		if (!$i) { $checked=' checked="on" '; }
-		$r->print("<input type='radio' name='scantron_CODE_resolution' value='use_closest_$i' $checked /> Use the similar CODE <b><tt>".$testcode."</tt></b> instead.<input type='hidden' name='scantron_CODE_closest_$i' value='$testcode' />");
+		$r->print("<label><input type='radio' name='scantron_CODE_resolution' value='use_closest_$i' $checked /> Use the similar CODE <b><tt>".$testcode."</tt></b> instead.</label><input type='hidden' name='scantron_CODE_closest_$i' value='$testcode' />");
 		$r->print("\n<br />");
 		$i++;
 	    }
 	}
 	my $checked; if (!$i) { $checked=' checked="on" '; }
-	$r->print("<input type='radio' name='scantron_CODE_resolution' value='use_unfound' $checked /> Use the CODE <b><tt>".$$scan_record{'scantron.CODE'}."</tt></b> that is was on the paper, ignoring the error.");
+	$r->print("<label><input type='radio' name='scantron_CODE_resolution' value='use_unfound' $checked /> Use the CODE <b><tt>".$$scan_record{'scantron.CODE'}."</tt></b> that is was on the paper, ignoring the error.</label>");
 	$r->print("\n<br />");
 
 	$r->print(<<ENDSCRIPT);
@@ -4766,9 +4766,9 @@
 	   "&scantron_CODElist=".&Apache::lonnet::escape($env{'form.scantron_CODElist'}).
 	   "&curCODE=".&Apache::lonnet::escape($$scan_record{'scantron.CODE'}).
 	   "&scantron_selectfile=".&Apache::lonnet::escape($env{'form.scantron_selectfile'});
-	$r->print("<input type='radio' name='scantron_CODE_resolution' value='use_found' /> <a target='_blank' href='$href'>Select</a> a CODE from the list of all CODEs and use it. Selected CODE is <input readonly='true' type='text' size='8' name='scantron_CODE_selectedvalue' onfocus=\"javascript:change_radio('use_found')\" onchange=\"javascript:change_radio('use_found')\" />");
+	$r->print("<label><input type='radio' name='scantron_CODE_resolution' value='use_found' /> <a target='_blank' href='$href'>Select</a> a CODE from the list of all CODEs and use it.</label> Selected CODE is <input readonly='true' type='text' size='8' name='scantron_CODE_selectedvalue' onfocus=\"javascript:change_radio('use_found')\" onchange=\"javascript:change_radio('use_found')\" />");
 	$r->print("\n<br />");
-	$r->print("<input type='radio' name='scantron_CODE_resolution' value='use_typed' /> Use <input type='text' size='8' name='scantron_CODE_newvalue' onfocus=\"javascript:change_radio('use_typed')\" onkeypress=\"javascript:change_radio('use_typed')\" /> as the CODE.");
+	$r->print("<label><input type='radio' name='scantron_CODE_resolution' value='use_typed' /> Use </label><input type='text' size='8' name='scantron_CODE_newvalue' onfocus=\"javascript:change_radio('use_typed')\" onkeypress=\"javascript:change_radio('use_typed')\" /> as the CODE.");
 	$r->print("\n<br /><br />");
     } elsif ($error eq 'doublebubble') {
 	$r->print("<p>There have been multiple bubbles scanned for a some question(s)</p>\n");
@@ -4811,11 +4811,11 @@
     }
     $r->print('<td></td></tr><tr>');
     for (my $i=0;$i<$max;$i++) {
-	$r->print('<td><input type="radio" name="scantron_correct_Q_'.$quest.
-		  '" value="'.$i.'" />'.$alphabet[$i]."</td>");
+	$r->print('<td><label><input type="radio" name="scantron_correct_Q_'.
+		  $quest.'" value="'.$i.'" />'.$alphabet[$i]."</label></td>");
     }
-    $r->print('<td><input type="radio" name="scantron_correct_Q_'.$quest.
-	      '" value="none" /> No bubble </td>');
+    $r->print('<td><label><input type="radio" name="scantron_correct_Q_'.
+	      $quest.'" value="none" /> No bubble </label></td>');
     $r->print('</tr></table>');
 }