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

albertel lon-capa-cvs-allow@mail.lon-capa.org
Mon, 11 Jun 2007 21:36:19 -0000


This is a MIME encoded message

--albertel1181597779
Content-Type: text/plain

albertel		Mon Jun 11 17:36:19 2007 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - xhtml
  - errror -> error
  - occured -> occurred
  
  
--albertel1181597779
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20070611173619.txt"

Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.400 loncom/homework/grades.pm:1.401
--- loncom/homework/grades.pm:1.400	Sun May 20 17:10:46 2007
+++ loncom/homework/grades.pm	Mon Jun 11 17:36:18 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.400 2007/05/20 21:10:46 www Exp $
+# $Id: grades.pm,v 1.401 2007/06/11 21:36:18 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -180,7 +180,7 @@
 		if (exists($partsseen{$partID})) {
 		    $result.="<td>&nbsp;</td>";
 		} else {
-		    $result.="<td><input type='checkbox' name='vPart' value='$partID' checked='on' /></td>";
+		    $result.="<td><input type='checkbox' name='vPart' value='$partID' checked='checked' /></td>";
 		}
 		$partsseen{$partID}=1;
 	    }
@@ -708,16 +708,16 @@
     &commonJSfunctions($request);
     $request->print($result);
 
-    my $checkhdgrade = ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked' : '';
-    my $checklastsub = $checkhdgrade eq '' ? 'checked' : '';
+    my $checkhdgrade = ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1 ) ? 'checked="checked"' : '';
+    my $checklastsub = $checkhdgrade eq '' ? 'checked="checked"' : '';
     my $gradeTable='<form action="/adm/grades" method="post" name="gradesub">'.
 	"\n".$table.
-	'&nbsp;<b>View Problem Text: </b><label><input type="radio" name="vProb" value="no" checked="on" /> no </label>'."\n".
+	'&nbsp;<b>View Problem Text: </b><label><input type="radio" name="vProb" value="no" checked="checked" /> no </label>'."\n".
 	'<label><input type="radio" name="vProb" value="yes" /> one student </label>'."\n".
 	'<label><input type="radio" name="vProb" value="all" /> all students </label><br />'."\n".
 	'&nbsp;<b>View Answer: </b><label><input type="radio" name="vAns" value="no"  /> no </label>'."\n".
 	'<label><input type="radio" name="vAns" value="yes" /> one student </label>'."\n".
-	'<label><input type="radio" name="vAns" value="all" checked="on" /> all students </label><br />'."\n".
+	'<label><input type="radio" name="vAns" value="all" checked="checked" /> all students </label><br />'."\n".
 	'&nbsp;<b>Submissions: </b>'."\n";
     if ($env{'form.handgrade'} eq 'yes' && scalar(@$partlist) > 1) {
 	$gradeTable.='<label><input type="radio" name="lastSub" value="hdgrade" '.$checkhdgrade.' /> essay part only </label>'."\n";
@@ -763,7 +763,7 @@
 	'onClick="javascript:checkSelect(this.form.stuinfo);" '."\n".
 	'value="Next->" /> <br />'."\n";
     $gradeTable.=&check_buttons();
-    $gradeTable.='<label><input type="checkbox" name="checkPlag" checked="on" />Check For Plagiarism</label>';
+    $gradeTable.='<label><input type="checkbox" name="checkPlag" checked="checked" />Check For Plagiarism</label>';
     my ($classlist, undef, $fullname) = &getclasslist($getsec,'1');
     $gradeTable.='<table border="0"><tr><td bgcolor="#777777">'.
 	'<table border="0"><tr bgcolor="#e6ffff">';
@@ -1501,7 +1501,7 @@
 	$result.= '<td><span style="white-space: nowrap;"><label><input type="radio" name="RADVAL'.$counter.'_'.$partid.'" '.
 	    'onclick="javascript:writeBox(this.form,\''.$counter.'_'.$partid.'\','.
 	    $thisweight.')" value="'.$thisweight.'" '.
-	    ($score eq $thisweight ? 'checked':'').' /> '.$thisweight."</label></span></td>\n";
+	    ($score eq $thisweight ? 'checked="checked"':'').' /> '.$thisweight."</label></span></td>\n";
 	$result.=(($ctr+1)%10 == 0 ? '</tr><tr>' : '');
         $thisweight += $increment;
 	$ctr++;
@@ -1519,9 +1519,9 @@
 	'onChange="javascript:clearRadBox(this.form,\''.$counter.'_'.$partid.'\')" >'."\n";
     if ($$record{'resource.'.$partid.'.solved'} eq 'excused') {
 	$result.='<option></option>'.
-	    '<option selected="on">excused</option>';
+	    '<option selected="selected">excused</option>';
     } else {
-	$result.='<option selected="on"></option>'.
+	$result.='<option selected="selected"></option>'.
 	    '<option>excused</option>';
     }
     $result.='<option>reset status</option></select>'."\n";
@@ -2082,7 +2082,7 @@
 	    '<option>3</option><option>5</option>'.
 	    '<option>7</option><option>10</option></select>'."\n";
 	my $nsel = ($env{'form.NTSTU'} ne '' ? $env{'form.NTSTU'} : '1');
-	$ntstu =~ s/<option>$nsel</<option selected="on">$nsel</;
+	$ntstu =~ s/<option>$nsel</<option selected="selected">$nsel</;
 	$endform.=$ntstu.'student(s) &nbsp;&nbsp;';
 	$endform.='<input type="button" value="Previous" '.
 	    'onClick="javascript:checksubmit(this.form,\'Previous\');" TARGET=_self> &nbsp;'."\n".
@@ -2565,7 +2565,7 @@
             	                                $newflg.'_'.$part_resp.'_returndoc'.$file_counter,
             	                                $save_file_name);
                     if ($result !~ m|^/uploaded/|) {
-                        $request->print('<span class="LC_error">An errror occured ('.$result.
+                        $request->print('<span class="LC_error">An error occurred ('.$result.
                         ') while trying to upload '.$newflg.'_'.$part_resp.'_returndoc'.$file_counter.'</span><br />');
                     } else {
                         # mark the file as read only
@@ -3028,7 +3028,7 @@
 	$result.= '</td><td><select name="SELVAL_'.$partid.'"'.
 	    'onChange="javascript:writeRadText(\''.$partid.'\','.
 		$weight{$partid}.')"> '.
-	    '<option selected="on"> </option>'.
+	    '<option selected="selected"> </option>'.
 	    '<option>excused</option>'.
 	    '<option>reset status</option></select></td>'.
             '<td><label><input type="checkbox" name="FORCE_'.$partid.'" /> Override "Correct"</label></td></tr>'."\n";
@@ -3146,8 +3146,8 @@
 	    $result.='&nbsp;<select name="'.
 		'GD_'.$student.'_'.$part.'_solved" '.
 		'onChange="javascript:changeOneScore(\''.$part.'\',\''.$student.'\')" >'."\n";
-	    $result.= (($status eq 'excused') ? '<option> </option><option selected="on">excused</option>' 
-		: '<option selected="on"> </option><option>excused</option>')."\n";
+	    $result.= (($status eq 'excused') ? '<option> </option><option selected="selected">excused</option>' 
+		: '<option selected="selected"> </option><option>excused</option>')."\n";
 	    $result.='<option>reset status</option>';
 	    $result.="</select>&nbsp;</td>\n";
 	} else {
@@ -3848,7 +3848,7 @@
     foreach (@$titles) {
 	my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
 	$result.='<option value="'.$ctr.'" '.
-	    ($$symbx{$_} =~ /$curpage$/ ? 'selected="on"' : '').
+	    ($$symbx{$_} =~ /$curpage$/ ? 'selected="selected"' : '').
 	    '>'.$showtitle.'</option>'."\n";
 	$ctr++;
     }
@@ -3863,12 +3863,12 @@
     $result.='<input type="hidden" name="page" />'."\n".
 	'<input type="hidden" name="title" />'."\n";
 
-    $result.='&nbsp;<b>View Problems Text: </b><label><input type="radio" name="vProb" value="no" checked="on" /> no </label>'."\n".
+    $result.='&nbsp;<b>View Problems Text: </b><label><input type="radio" name="vProb" value="no" checked="checked" /> no </label>'."\n".
 	'<label><input type="radio" name="vProb" value="yes" /> yes </label>'."<br />\n";
 
     $result.='&nbsp;<b>Submission Details: </b>'.
 	'<label><input type="radio" name="lastSub" value="none" /> none</label>'."\n".
-	'<label><input type="radio" name="lastSub" value="datesub" checked /> by dates and submissions</label>'."\n".
+	'<label><input type="radio" name="lastSub" value="datesub" checked="checked" /> by dates and submissions</label>'."\n".
 	'<label><input type="radio" name="lastSub" value="all" /> all details</label>'."\n";
 
     $result.='<input type="hidden" name="section"     value="'.$getsec.'" />'."\n".
@@ -4384,7 +4384,7 @@
     foreach (@$titles) {
 	my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
 	$result.='<option value="'.$$symbx{$_}.'" '.
-	    ($$symbx{$_} =~ /$curpage$/ ? 'selected="on"' : '').
+	    ($$symbx{$_} =~ /$curpage$/ ? 'selected="selected"' : '').
 	    '>'.$showtitle.'</option>'."\n";
 	$ctr++;
     }
@@ -4412,7 +4412,7 @@
     my $result=	'<select name="scantron_selectfile">';
     $result.="<option></option>";
     foreach my $filename (sort(&scantron_filenames())) {
-	$result.="<option".($filename eq $file2grade ? ' selected="on"':'').">$filename</option>\n";
+	$result.="<option".($filename eq $file2grade ? ' selected="selected"':'').">$filename</option>\n";
     }
     $result.="</select>";
     return $result;
@@ -4963,7 +4963,7 @@
 sub check_for_error {
     my ($r,$result)=@_;
     if ($result ne 'ok' && $result ne 'not_found' ) {
-	$r->print("An error occured ($result) when trying to Remove the existing corrections.");
+	$r->print("An error occurred ($result) when trying to Remove the existing corrections.");
     }
 }
 
@@ -5425,7 +5425,7 @@
 	    if ($closest > 0) {
 		foreach my $testcode (@{$closest}) {
 		    my $checked='';
-		    if (!$i) { $checked=' checked="on" '; }
+		    if (!$i) { $checked=' checked="checked" '; }
 		    $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++;
@@ -5433,7 +5433,7 @@
 	    }
 	}
 	if ($$scan_record{'scantron.CODE'}=~/\S/ ) {
-	    my $checked; if (!$i) { $checked=' checked="on" '; }
+	    my $checked; if (!$i) { $checked=' checked="checked" '; }
 	    $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 />");
 	}
@@ -6033,38 +6033,38 @@
     if (ref($sections)) {
 	foreach (sort (@$sections)) {
 	    $result.='<option value="'.$_.'" '.
-		($saveSec eq $_ ? 'selected="on"':'').'>'.$_.'</option>'."\n";
+		($saveSec eq $_ ? 'selected="selected"':'').'>'.$_.'</option>'."\n";
 	}
     }
-    $result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="on"' : ''). '>all</option></select> &nbsp; ';
+    $result.= '<option value="all" '.($saveSec eq 'all' ? 'selected="selected"' : ''). '>all</option></select> &nbsp; ';
 
-    $result.=&mt('Student Status').':</b>'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef);
+    $result.=&mt('Student Status').':'.&Apache::lonhtmlcommon::StatusOptions($saveStatus,undef,1,undef);
 
     $result.='</td></tr>';
 
     $result.='<tr bgcolor="#ffffe6"valign="top"><td><label>'.
 	'<input type="radio" name="radioChoice" value="submission" '.
-	($saveCmd eq 'submission' ? 'checked' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students').
+	($saveCmd eq 'submission' ? 'checked="checked"' : '').' /> '.'<b>'.&mt('Current Resource').':</b> '.&mt('For one or more students').
 	'</label> <select name="submitonly">'.
 	'<option value="yes" '.
-	($saveSub eq 'yes' ? 'selected="on"' : '').' />'.&mt('with submissions').'</option>'.
+	($saveSub eq 'yes' ? 'selected="selected"' : '').'>'.&mt('with submissions').'</option>'.
 	'<option value="queued" '.
-	($saveSub eq 'queued' ? 'selected="on"' : '').' />'.&mt('in grading queue').'</option>'.
+	($saveSub eq 'queued' ? 'selected="selected"' : '').'>'.&mt('in grading queue').'</option>'.
 	'<option value="graded" '.
-	($saveSub eq 'graded' ? 'selected="on"' : '').' />'.&mt('with ungraded submissions').'</option>'.
+	($saveSub eq 'graded' ? 'selected="selected"' : '').'>'.&mt('with ungraded submissions').'</option>'.
 	'<option value="incorrect" '.
-	($saveSub eq 'incorrect' ? 'selected="on"' : '').' />'.&mt('with incorrect submissions').'</option>'.
+	($saveSub eq 'incorrect' ? 'selected="selected"' : '').'>'.&mt('with incorrect submissions').'</option>'.
 	'<option value="all" '.
-	($saveSub eq 'all' ? 'selected="on"' : '').' />'.&mt('with any status').'</option></select></td></tr>'."\n";
+	($saveSub eq 'all' ? 'selected="selected"' : '').'>'.&mt('with any status').'</option></select></td></tr>'."\n";
 
     $result.='<tr bgcolor="#ffffe6"valign="top"><td>'.
 	'<label><input type="radio" name="radioChoice" value="viewgrades" '.
-	($saveCmd eq 'viewgrades' ? 'checked' : '').' /> '.
+	($saveCmd eq 'viewgrades' ? 'checked="checked"' : '').' /> '.
 	'<b>Current Resource:</b> For all students in selected section or course</label></td></tr>'."\n";
 
     $result.='<tr bgcolor="#ffffe6" valign="top"><td>'.
 	'<label><input type="radio" name="radioChoice" value="pickStudentPage" '.
-	($saveCmd eq 'pickStudentPage' ? 'checked' : '').' /> '.
+	($saveCmd eq 'pickStudentPage' ? 'checked="checked"' : '').' /> '.
 	'The <b>complete</b> set/page/sequence: For one student</label></td></tr>'."\n";
 
     $result.='<tr bgcolor="#ffffe6"><td><br />'.
@@ -6102,9 +6102,9 @@
 	'<input type="button" onClick="javascript:this.form.command.value=\'codelist\';this.form.action=\'/adm/pickcode\';this.form.submit();'.
 	'" value="'.&mt('View').'" /> saved CODEs.</td></tr>'."\n";
 
-    $result.='</form></td></tr></table>'."\n".
+    $result.='</table>'."\n".
 	'</td></tr></table>'."\n".
-	'</td></tr></table>'."\n";
+	'</td></tr></table></form>'."\n";
     return $result;
 }
 

--albertel1181597779--