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

bisitz bisitz@source.lon-capa.org
Fri, 15 Jan 2010 17:12:18 -0000


This is a MIME encoded message

--bisitz1263575538
Content-Type: text/plain

bisitz		Fri Jan 15 17:12:18 2010 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  XHTML: Lower case attributes (onClick, onChange, onMouseDown)
  
  
--bisitz1263575538
Content-Type: text/plain
Content-Disposition: attachment; filename="bisitz-20100115171218.txt"

Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.588 loncom/homework/grades.pm:1.589
--- loncom/homework/grades.pm:1.588	Fri Jan 15 16:41:43 2010
+++ loncom/homework/grades.pm	Fri Jan 15 17:12:18 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.588 2010/01/15 16:41:43 bisitz Exp $
+# $Id: grades.pm,v 1.589 2010/01/15 17:12:18 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -993,8 +993,8 @@
 # checkall buttons
     $gradeTable.=&check_script('gradesub', 'stuinfo');
     $gradeTable.='<input type="button" '."\n".
-	'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n".
-	'value="'.&mt('Next').' &rarr;" /> <br />'."\n";
+        'onclick="javascript:checkSelect(this.form.stuinfo);" '."\n".
+        'value="'.&mt('Next').' &rarr;" /> <br />'."\n";
     $gradeTable.=&check_buttons();
     my ($classlist, undef, $fullname) = &getclasslist($getsec,'1',$getgroup);
     $gradeTable.= &Apache::loncommon::start_data_table().
@@ -1111,9 +1111,9 @@
     }
 
     $gradeTable.=&Apache::loncommon::end_data_table()."\n".
-	'<input type="button" '.
-	'onClick="javascript:checkSelect(this.form.stuinfo);" '.
-	'value="'.&mt('Next').' &rarr;" /></form>'."\n";
+        '<input type="button" '.
+        'onclick="javascript:checkSelect(this.form.stuinfo);" '.
+        'value="'.&mt('Next').' &rarr;" /></form>'."\n";
     if ($ctr == 0) {
 	my $num_students=(scalar(keys(%$fullname)));
 	if ($num_students eq 0) {
@@ -1617,8 +1617,8 @@
     pDoc = pWin.document;
     pDoc.write("<\\/table>");
     pDoc.write("<\\/td><\\/tr><\\/table>&nbsp;");
-    pDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:checkInput()\\">&nbsp;&nbsp;");
-    pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />");
+    pDoc.write("<input type=\\"button\\" value=\\"Save\\" onclick=\\"javascript:checkInput()\\">&nbsp;&nbsp;");
+    pDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onclick=\\"self.close()\\"><br /><br />");
     pDoc.write("<\\/form>");
     pDoc.write('$end_page_msg_central');
     pDoc.close();
@@ -1691,8 +1691,8 @@
     var hDoc = hwdWin.document;
     hDoc.write("<\\/table>");
     hDoc.write("<\\/td><\\/tr><\\/table>&nbsp;");
-    hDoc.write("<input type=\\"button\\" value=\\"Save\\" onClick=\\"javascript:updateChoice(1)\\">&nbsp;&nbsp;");
-    hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />");
+    hDoc.write("<input type=\\"button\\" value=\\"Save\\" onclick=\\"javascript:updateChoice(1)\\">&nbsp;&nbsp;");
+    hDoc.write("<input type=\\"button\\" value=\\"Cancel\\" onclick=\\"self.close()\\"><br /><br />");
     hDoc.write("<\\/form>");
     hDoc.write('$end_page_highlight_central');
     hDoc.close();
@@ -1757,7 +1757,7 @@
     my $radio.='<table border="0"><tr>'."\n";  # display radio buttons in a nice table 10 across
     while ($thisweight<=$wgt) {
 	$radio.= '<td><span class="LC_nobreak"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '.
-	    'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','.
+        'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','.
 	    $thisweight.')" value="'.$thisweight.'" '.
 	    ($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n";
 	$radio.=(($ctr+1)%10 == 0 ? '</tr><tr>' : '');
@@ -1768,13 +1768,13 @@
 
     my $line.='<input type="text" name="GD_BOX'.$counter.'_'.$partid.'"'.
 	($score ne ''? ' value = "'.$score.'"':'').' size="4" '.
-	'onChange="javascript:updateRadio(this.form,\''.$counter.'_'.$partid.'\','.
+	'onchange="javascript:updateRadio(this.form,\''.$counter.'_'.$partid.'\','.
 	$wgt.')" /></td>'."\n";
     $line.='<td>/'.$wgt.' '.$wgtmsg.
 	($$record{'resource.'.$partid.'.solved'} eq 'correct_by_student' ? '&nbsp;'.$checkIcon : '').
 	' </td>'."\n";
     $line.='<td><select name="GD_SEL'.$counter.'_'.$partid.'" '.
-	'onChange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n";
+	'onchange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n";
     if ($$record{'resource.'.$partid.'.solved'} eq 'excused') {
 	$line.='<option></option>'.
 	    '<option value="excused" selected="selected">'.&mt('excused').'</option>';
@@ -2063,7 +2063,7 @@
 	    $request->print(<<KEYWORDS);
 &nbsp;<b>Keyword Options:</b>&nbsp;
 <a href="javascript:keywords(document.SCORE);" target="_self">List</a>&nbsp; &nbsp;
-<a href="#" onMouseDown="javascript:getSel(); return false"
+<a href="#" onmousedown="javascript:getSel(); return false"
  CLASS="page">Paste Selection to List</a>&nbsp; &nbsp;
 <a href="javascript:kwhighlight();" target="_self">Highlight Attribute</a><br /><br />
 KEYWORDS
@@ -2251,7 +2251,7 @@
     # return if view submission with no grading option
     if ($env{'form.showgrading'} eq '' || (!&canmodify($usec))) {
 	my $toGrade.='<input type="button" value="Grade Student" '.
-	    'onClick="javascript:checksubmit(this.form,\'Grade Student\',\''
+	    'onclick="javascript:checksubmit(this.form,\'Grade Student\',\''
 	    .$counter.'\');" target="_self" /> &nbsp;'."\n" if (&canmodify($usec));
 	$toGrade.='</div>'."\n";
 	if (($env{'form.command'} eq 'submission') || 
@@ -2349,7 +2349,7 @@
     if ($counter == $total) {
 	my $endform='<table border="0"><tr><td>'."\n";
 	$endform.='<input type="button" value="'.&mt('Save &amp; Next').'" '.
-	    'onClick="javascript:checksubmit(this.form,\'Save & Next\','.
+	    'onclick="javascript:checksubmit(this.form,\'Save & Next\','.
 	    $total.','.scalar(@partlist).');" target="_self" /> &nbsp;'."\n";
 	my $ntstu ='<select name="NTSTU">'.
 	    '<option>1</option><option>2</option>'.
@@ -2359,9 +2359,9 @@
 	$ntstu =~ s/<option>$nsel</<option selected="selected">$nsel</;
         $endform.=&mt('[_1]student(s)',$ntstu);
 	$endform.='&nbsp;&nbsp;<input type="button" value="'.&mt('Previous').'" '.
-	    'onClick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> &nbsp;'."\n".
+	    'onclick="javascript:checksubmit(this.form,\'Previous\');" target="_self" /> &nbsp;'."\n".
 	    '<input type="button" value="'.&mt('Next').'" '.
-	    'onClick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> &nbsp;';
+	    'onclick="javascript:checksubmit(this.form,\'Next\');" target="_self" /> &nbsp;';
 	$endform.=&mt('(Next and Previous (student) do not save the scores.)')."\n" ;
         $endform.="<input type='hidden' value='".&get_increment().
             "' name='increment' />";
@@ -3350,11 +3350,11 @@
 	}
 	$radio.='</tr></table>';
 	my $line = '<input type="text" name="TEXTVAL_'.
-	    $partid.'" size="4" '.'onChange="javascript:writePoint(\''.
+	    $partid.'" size="4" '.'onchange="javascript:writePoint(\''.
 		$partid.'\','.$weight{$partid}.',\'textval\')" /> /'.
 	    $weight{$partid}.' '.&mt('(problem weight)').'</td>'."\n";
 	$line.= '<td><b>'.&mt('Grade Status').':</b><select name="SELVAL_'.$partid.'"'.
-	    'onChange="javascript:writeRadText(\''.$partid.'\','.
+	    'onchange="javascript:writeRadText(\''.$partid.'\','.
 		$weight{$partid}.')"> '.
 	    '<option selected="selected"> </option>'.
 	    '<option value="excused">'.&mt('excused').'</option>'.
@@ -3375,7 +3375,7 @@
     $result.=&Apache::loncommon::end_data_table()."\n".
 	'<input type="hidden" name="totalparts" value="'.$ctsparts.'" />';
     $result.='<input type="button" value="'.&mt('Revert to Default').'" '.
-	'onClick="javascript:resetEntry('.$ctsparts.');" />';
+	'onclick="javascript:resetEntry('.$ctsparts.');" />';
 
     #table listing all the students in a section/class
     #header of table
@@ -3439,7 +3439,7 @@
     $result.=&Apache::loncommon::end_data_table();
     $result.='<input type="hidden" name="total" value="'.$ctr.'" />'."\n";
     $result.='<input type="button" value="'.&mt('Save').'" '.
-	'onClick="javascript:submit();" target="_self" /></form>'."\n";
+	'onclick="javascript:submit();" target="_self" /></form>'."\n";
     if (scalar(%$fullname) eq 0) {
 	my $colspan=3+scalar(@parts);
 	my $section_display = join (", ",&Apache::loncommon::get_env_multiple('form.section'));
@@ -3491,7 +3491,7 @@
 		'GD_'.$student.'_'.$part.'_awarded_s" value="'.$pts.'" />'."\n";
 	    $result.='<input type="text" name="'.
 		'GD_'.$student.'_'.$part.'_awarded" '.
-		'onChange="javascript:changeSelect(\''.$part.'\',\''.$student.
+                'onchange="javascript:changeSelect(\''.$part.'\',\''.$student.
 		'\')" value="'.$pts.'" size="4" /></td>'."\n";
 	} elsif ($type eq 'solved') {
 	    my ($status,$foo)=split(/_/,$score,2);
@@ -3500,7 +3500,7 @@
 		$part.'_solved_s" value="'.$status.'" />'."\n";
 	    $result.='&nbsp;<select name="'.
 		'GD_'.$student.'_'.$part.'_solved" '.
-		'onChange="javascript:changeOneScore(\''.$part.'\',\''.$student.'\')" >'."\n";
+                'onchange="javascript:changeOneScore(\''.$part.'\',\''.$student.'\')" >'."\n";
 	    $result.= (($status eq 'excused') ? '<option> </option><option selected="selected" value="excused">'.&mt('excused').'</option>' 
 		: '<option selected="selected"> </option><option value="excused">'.&mt('excused').'</option>')."\n";
 	    $result.='<option value="reset status">'.&mt('reset status').'</option>';
@@ -3860,7 +3860,7 @@
 Total number of records found in file: $distotal <hr />
 Enter as many fields as you can. The system will inform you and bring you back
 to this page if the data selected is insufficient to run your class.<hr />
-<input type="button" value="Reverse Association" onClick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" />
+<input type="button" value="Reverse Association" onclick="javascript:this.form.associate.value='Reverse Association';submit(this.form);" />
 <label><input type="checkbox" name="noFirstLine" $checked />$ignore</label>
 <input type="hidden" name="associate"  value="" />
 <input type="hidden" name="phase"      value="three" />
@@ -3915,7 +3915,7 @@
 </table>
 <input type="hidden" name="nfields" value="$i" />
 <input type="hidden" name="keyfields" value="$keyfields" />
-<input type="button" onClick="javascript:verify(this.form)" value="Assign Grades" /><br />
+<input type="button" onclick="javascript:verify(this.form)" value="Assign Grades" /><br />
 </form>
 ENDPICK
 }
@@ -3960,7 +3960,7 @@
 <input type="hidden" name="probTitle" value="$env{'form.probTitle'}" />
 <input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 $upfile_select
-<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="$upload" />
+<br /><input type="button" onclick="javascript:checkUpload(this.form);" value="$upload" />
 <label><input type="checkbox" name="noFirstLine" />$ignore</label>
 </form>
 ENDUPFORM
@@ -4283,7 +4283,7 @@
     $result.='&nbsp;<b>'.&mt('Use CODE').': </b> <input type="text" name="CODE" value="" /> <br />'."\n";
 
     $result.='&nbsp;<input type="button" '.
-	'onClick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' &rarr;" /><br />'."\n";
+             'onclick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' &rarr;" /><br />'."\n";
 
     $request->print($result);
 
@@ -4322,7 +4322,7 @@
     }
     $studentTable.=&Apache::loncommon::end_data_table()."\n";
     $studentTable.='<input type="button" '.
-	'onClick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' &rarr;" /></form>'."\n";
+                   'onclick="javascript:checkPickOne(this.form);" value="'.&mt('Next').' &rarr;" /></form>'."\n";
 
     $studentTable.=&show_grading_menu_form($symb);
     $request->print($studentTable);
@@ -4515,10 +4515,11 @@
         $curRes = $iterator->next();
     }
 
-    $studentTable.='</table>'."\n".
-	'<input type="button" value="'.&mt('Save').'" '.
-	'onClick="javascript:checkSubmitPage(this.form,'.$question.');" />'.
-	'</form>'."\n";
+    $studentTable.=
+        '</table>'."\n".
+        '<input type="button" value="'.&mt('Save').'" '.
+        'onclick="javascript:checkSubmitPage(this.form,'.$question.');" />'.
+        '</form>'."\n";
     $studentTable.=&show_grading_menu_form($symb);
     $request->print($studentTable);
 
@@ -5264,7 +5265,7 @@
                 <input name="command" value="scantronupload_save" type="hidden" />
                 '.&mt('File to upload: [_1]','<input type="file" name="upfile" size="50" />').'
                 <br />
-                <input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" />
+                <input type="button" onclick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" />
               </form>
 ');
 
@@ -7956,7 +7957,7 @@
   &Apache::lonhtmlcommon::end_pick_box().'<br />
 
 <input name="command" value="scantronupload_save" type="hidden" />
-<input type="button" onClick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" />
+<input type="button" onclick="javascript:checkUpload(this.form);" value="'.&mt('Upload Bubblesheet Data').'" />
 </form>
 ');
     return '';
@@ -8542,10 +8543,10 @@
     $Str .= Apache::lonhtmlcommon::generate_menu(@menu);
     #$menudata->{'jscript'}
     $Str .='<hr /><input type="button" value="'.&mt('Verify Receipt No.').'" '.
-        ' onClick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
+        ' onclick="javascript:checkChoice(document.forms.gradingMenu,\'5\',\'verify\')" '.
         ' /> '.
         &Apache::lonnet::recprefix($env{'request.course.id'}).
-        '-<input type="text" name="receipt" size="4" onChange="javascript:checkReceiptNo(this.form,\'OK\')" />';
+        '-<input type="text" name="receipt" size="4" onchange="javascript:checkReceiptNo(this.form,\'OK\')" />';
 
     $Str .="</form>\n";
     my $receiptalert = &mt("Please enter a receipt number given by a student in the receipt box.");
@@ -8728,7 +8729,7 @@
               </label>
             </div>
             <div>
-	      <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' &rarr;" />
+	      <input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' &rarr;" />
             </div>
           </div>
 
@@ -8745,7 +8746,7 @@
               </label>
             </div>
             <div>
-	      <input type="button" onClick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' &rarr;" />
+	      <input type="button" onclick="javascript:checkChoice(this.form,\'2\');" value="'.&mt('Next').' &rarr;" />
             </div>
         </div>
   </form>';
@@ -8925,17 +8926,17 @@
 <input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 <input type="file" name="upfile" size="50" />
 <br /><label>$type: $selectform</label>
-<br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onClick="sanitycheck()" />$attendance </label>
-<br /><label><input type="radio" name="gradingmechanism" value="personnel"$checked{'personnel'} onClick="sanitycheck()" />$personnel</label>
-<br /><label><input type="radio" name="gradingmechanism" value="specific"$checked{'specific'} onClick="sanitycheck()" />$specific </label>
+<br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onclick="sanitycheck()" />$attendance </label>
+<br /><label><input type="radio" name="gradingmechanism" value="personnel"$checked{'personnel'} onclick="sanitycheck()" />$personnel</label>
+<br /><label><input type="radio" name="gradingmechanism" value="specific"$checked{'specific'} onclick="sanitycheck()" />$specific </label>
 <input type="text" name="specificid" value="$env{'form.specificid'}" size="20" />
-<br /><label><input type="radio" name="gradingmechanism" value="given"$checked{'given'} onClick="sanitycheck()" />$given </label>
+<br /><label><input type="radio" name="gradingmechanism" value="given"$checked{'given'} onclick="sanitycheck()" />$given </label>
 <br />&nbsp;&nbsp;&nbsp;
 <input type="text" name="givenanswer" size="50" />
 <input type="hidden" name="waschecked" value="$env{'form.gradingmechanism'}" />
-<br /><label>$pcorrect: <input type="text" name="pcorrect" size="4" value="$env{'form.pcorrect'}" onChange="sanitycheck()" /></label>
-<br /><label>$pincorrect: <input type="text" name="pincorrect" size="4" value="$env{'form.pincorrect'}" onChange="sanitycheck()" /></label>
-<br /><input type="button" onClick="javascript:checkUpload(this.form);" value="$upload" />
+<br /><label>$pcorrect: <input type="text" name="pcorrect" size="4" value="$env{'form.pcorrect'}" onchange="sanitycheck()" /></label>
+<br /><label>$pincorrect: <input type="text" name="pincorrect" size="4" value="$env{'form.pincorrect'}" onchange="sanitycheck()" /></label>
+<br /><input type="button" onclick="javascript:checkUpload(this.form);" value="$upload" />
 </form>
 ENDUPFORM
     $result.='</td></tr></table>'."\n".

--bisitz1263575538--