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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 02 Mar 2006 21:50:31 -0000


This is a MIME encoded message

--albertel1141336231
Content-Type: text/plain

albertel		Thu Mar  2 16:50:31 2006 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - some xhtml cleaning
  
  
--albertel1141336231
Content-Type: text/plain
Content-Disposition: attachment; filename="albertel-20060302165031.txt"

Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.325 loncom/homework/grades.pm:1.326
--- loncom/homework/grades.pm:1.325	Thu Mar  2 13:01:41 2006
+++ loncom/homework/grades.pm	Thu Mar  2 16:50:30 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.325 2006/03/02 18:01:41 www Exp $
+# $Id: grades.pm,v 1.326 2006/03/02 21:50:30 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -556,7 +556,7 @@
 
     my $title.='<h3><font color="#339933">Verifying Submission Receipt '.
 	$receipt.'</h3></font>'."\n".
-	'<font size=+1><b>Resource: </b>'.$env{'form.probTitle'}.'</font><br><br>'."\n";
+	'<font size=+1><b>Resource: </b>'.$env{'form.probTitle'}.'</font><br /><br />'."\n";
 
     my ($string,$contents,$matches) = ('','',0);
     my (undef,undef,$fullname) = &getclasslist('all','0');
@@ -1264,7 +1264,7 @@
 
     pDoc.write("<form action=\\"inactive\\" name=\\"msgcenter\\">");
     pDoc.write("<input value=\\""+usrctr+"\\" name=\\"usrctr\\" type=\\"hidden\\">");
-    pDoc.write("<font color=\\"green\\" size=+1>&nbsp;Compose Message for \"+fullname+\"</font><br><br>");
+    pDoc.write("<font color=\\"green\\" size=+1>&nbsp;Compose Message for \"+fullname+\"</font><br /><br />");
 
     pDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">");
     pDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">");
@@ -1299,7 +1299,7 @@
     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=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />");
     pDoc.write("</form>");
     pDoc.write("</body></html>");
     pDoc.close();
@@ -1368,7 +1368,7 @@
     hDoc.write("</head><body bgcolor=white>");
 
     hDoc.write("<form action=\\"inactive\\" name=\\"hlCenter\\">");
-    hDoc.write("<font color=\\"green\\" size=+1>&nbsp;Keyword Highlight Options</font><br><br>");
+    hDoc.write("<font color=\\"green\\" size=+1>&nbsp;Keyword Highlight Options</font><br /><br />");
 
     hDoc.write("<table border=0 width=100%><tr><td bgcolor=\\"#777777\\">");
     hDoc.write("<table border=0 width=100%><tr bgcolor=\\"#ddffff\\">");
@@ -1392,7 +1392,7 @@
     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=\\"Cancel\\" onClick=\\"self.close()\\"><br /><br />");
     hDoc.write("</form>");
     hDoc.write("</body></html>");
     hDoc.close();
@@ -1630,9 +1630,9 @@
 			'<input type="hidden" name="vProb"      value="'.$env{'form.vProb'}.'" />'."\n".
 			'<input type="hidden" name="vAns"       value="'.$env{'form.vAns'}.'" />'."\n".
 			'<input type="hidden" name="lastSub"    value="'.$env{'form.lastSub'}.'" />'."\n".
-			'<input type="hidden" name="section"    value="'.$env{'form.section'}.'">'."\n".
-			'<input type="hidden" name="submitonly" value="'.$env{'form.submitonly'}.'">'."\n".
-			'<input type="hidden" name="handgrade"  value="'.$env{'form.handgrade'}.'">'."\n".
+			'<input type="hidden" name="section"    value="'.$env{'form.section'}.'" />'."\n".
+			'<input type="hidden" name="submitonly" value="'.$env{'form.submitonly'}.'" />'."\n".
+			'<input type="hidden" name="handgrade"  value="'.$env{'form.handgrade'}.'" />'."\n".
 			'<input type="hidden" name="NCT"'.
 			' value="'.($env{'form.NTSTU'} ne '' ? $env{'form.NTSTU'} : $total+1).'" />'."\n");
 	if ($env{'form.handgrade'} eq 'yes') {
@@ -1700,8 +1700,8 @@
 
     # Display student info
     $request->print(($counter == 0 ? '' : '<br />'));
-    my $result='<table border="0" width=100%><tr><td bgcolor="#777777">'."\n".
-	'<table border="0" width=100%><tr bgcolor="#edffff"><td>'."\n";
+    my $result='<table border="0" width="100%"><tr><td bgcolor="#777777">'."\n".
+	'<table border="0" width="100%"><tr bgcolor="#edffff"><td>'."\n";
 
     $result.='<b>Fullname: </b>'.&nameUserString(undef,$env{'form.fullname'},$uname,$udom).'<br />'."\n";
     $result.='<input type="hidden" name="name'.$counter.
@@ -3233,7 +3233,7 @@
 <form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload">
 <h3><font color="#339933">Uploading Class Grades</font></h3>
 $result
-<hr>
+<hr />
 <h3>Identify fields</h3>
 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
@@ -3315,8 +3315,8 @@
     $env{'form.probTitle'} = &Apache::lonnet::gettitle($symb);
     my ($table) = &showResourceInfo($symb,$env{'form.probTitle'});
     $result.=$table;
-    $result.='<br /><table width=100% border=0><tr><td bgcolor="#777777">'."\n";
-    $result.='<table width=100% border=0><tr bgcolor="#e6ffff"><td>'."\n";
+    $result.='<br /><table width="100%" border="0"><tr><td bgcolor="#777777">'."\n";
+    $result.='<table width="100%" border="0"><tr bgcolor="#e6ffff"><td>'."\n";
     $result.='&nbsp;<b>Specify a file containing the class scores for current resource'.
 	'.</b></td></tr>'."\n";
     $result.='<tr bgcolor=#ffffe6><td>'."\n";
@@ -3597,7 +3597,7 @@
 	    '>'.$showtitle.'</option>'."\n";
 	$ctr++;
     }
-    $result.= '</select>'."<br>\n";
+    $result.= '</select>'."<br />\n";
     $ctr=0;
     foreach (@$titles) {
 	my ($minder,$showtitle) = ($_ =~ /(\d+)\.(.*)/);
@@ -3627,7 +3627,7 @@
 
     $request->print($result);
 
-    my $studentTable.='&nbsp;<b>Select a student you wish to grade and then click on the Next button.</b><br>'.
+    my $studentTable.='&nbsp;<b>Select a student you wish to grade and then click on the Next button.</b><br />'.
 	'<table border="0"><tr><td bgcolor="#777777">'.
 	'<table border="0"><tr bgcolor="#e6ffff">'.
 	'<td align="right">&nbsp;<b>No.</b></td>'.
@@ -3760,7 +3760,7 @@
             my $title = $curRes->compTitle();
 	    my $symbx = $curRes->symb();
 	    $studentTable.='<tr bgcolor="#ffffe6"><td align="center" valign="top" >'.$prob.
-		(scalar(@{$parts}) == 1 ? '' : '<br>('.scalar(@{$parts}).'&nbsp;parts)').'</td>';
+		(scalar(@{$parts}) == 1 ? '' : '<br />('.scalar(@{$parts}).'&nbsp;parts)').'</td>';
 	    $studentTable.='<td valign="top">';
 	    if ($env{'form.vProb'} eq 'yes' ) {
 		$studentTable.=&show_problem($request,$symbx,$uname,$udom,1,
@@ -3771,10 +3771,10 @@
 		$companswer =~ s|</form>||g;
 #		while ($companswer =~ /(<a href\=\"javascript:newWindow.*?Script Vars<\/a>)/s) { #<a href="javascript:newWindow</a>
 #		    $companswer =~ s/$1/ /ms;
-#		    $request->print('match='.$1."<br>\n");
+#		    $request->print('match='.$1."<br />\n");
 #		}
 #		$companswer =~ s|<table border=\"1\">|<table border=\"0\">|g;
-		$studentTable.='&nbsp;<b>'.$title.'</b>&nbsp;<br>&nbsp;<b>Correct answer:</b><br>'.$companswer;
+		$studentTable.='&nbsp;<b>'.$title.'</b>&nbsp;<br />&nbsp;<b>Correct answer:</b><br />'.$companswer;
 	    }
 
 	    my %record = &Apache::lonnet::restore($symbx,$env{'request.course.id'},$udom,$uname);
@@ -3957,7 +3957,7 @@
             my $title = $curRes->compTitle();
 	    my $symbx = $curRes->symb();
 	    $studentTable.='<tr bgcolor="#ffffe6"><td align="center" valign="top" >'.$prob.
-		(scalar(@{$parts}) == 1 ? '' : '<br>('.scalar(@{$parts}).'&nbsp;parts)').'</td>';
+		(scalar(@{$parts}) == 1 ? '' : '<br />('.scalar(@{$parts}).'&nbsp;parts)').'</td>';
 	    $studentTable.='<td valign="top">&nbsp;<b>'.$title.'</b>&nbsp;</td>';
 
 	    my %newrecord=();
@@ -4003,10 +4003,10 @@
 		my $oldstatus = $env{'form.solved'.$question.'_'.$partid};
 		$displayPts[0].='&nbsp;<b>Part:</b> '.$display_part.' = '.
 		    (($oldstatus eq 'excused') ? 'excused' : $oldpts).
-		    '&nbsp;<br>';
+		    '&nbsp;<br />';
 		$displayPts[1].='&nbsp;<b>Part:</b> '.$display_part.' = '.
 		     (($score eq 'excused') ? 'excused' : $newpts).
-		    '&nbsp;<br>';
+		    '&nbsp;<br />';
 
 		$question++;
 		next if ($dropMenu eq 'reset status' || ($newpts == $oldpts && $score ne 'excused'));
@@ -5622,12 +5622,12 @@
 	'<input type="hidden" name="gradingMenu" value="1" />'."\n".
 	'<input type="hidden" name="showgrading" value="yes" />'."\n";
 
-    $result.='<table width="100%" border=0><tr><td bgcolor=#777777>'."\n".
-	'<table width=100% border=0><tr bgcolor="#e6ffff"><td colspan="2">'."\n".
+    $result.='<table width="100%" border="0"><tr><td bgcolor=#777777>'."\n".
+	'<table width="100%" border="0"><tr bgcolor="#e6ffff"><td colspan="2">'."\n".
 	'&nbsp;<b>Select a Grading/Viewing Option</b></td></tr>'."\n".
 	'<tr bgcolor="#ffffe6" valign="top"><td>'."\n";
 
-    $result.='<table width="100%" border=0>';
+    $result.='<table width="100%" border="0">';
     $result.='<tr bgcolor="#ffffe6" valign="top"><td>'."\n".
 	'&nbsp;'.&mt('Select Section').': <select name="section">'."\n";
     if (ref($sections)) {
@@ -5644,27 +5644,27 @@
 
     $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' : '').' /> '.'<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="on"' : '').' />'.&mt('with submissions').'</option>'.
 	'<option value="queued" '.
-	($saveSub eq 'queued' ? 'selected="on"' : '').'>'.&mt('in grading queue').'</option>'.
+	($saveSub eq 'queued' ? 'selected="on"' : '').' />'.&mt('in grading queue').'</option>'.
 	'<option value="graded" '.
-	($saveSub eq 'graded' ? 'selected="on"' : '').'>'.&mt('with ungraded submissions').'</option>'.
+	($saveSub eq 'graded' ? 'selected="on"' : '').' />'.&mt('with ungraded submissions').'</option>'.
 	'<option value="incorrect" '.
-	($saveSub eq 'incorrect' ? 'selected="on"' : '').'>'.&mt('with incorrect submissions').'</option>'.
+	($saveSub eq 'incorrect' ? 'selected="on"' : '').' />'.&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="on"' : '').' />'.&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' : '').' /> '.
 	'<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' : '').' /> '.
 	'The <b>complete</b> set/page/sequence: For one student</label></td></tr>'."\n";
 
     $result.='<tr bgcolor="#ffffe6"><td><br />'.
@@ -5673,7 +5673,7 @@
 
     $result.='</td><td valign="top">';
 
-    $result.='<table width="100%" border=0>';
+    $result.='<table width="100%" border="0">';
     $result.='<tr bgcolor="#ffffe6"><td>'.
 	'<input type="button" onClick="javascript:checkChoice(this.form,\'3\',\'csvform\');" value="'.&mt('Upload').'" />'.
 	' '.&mt('scores from file').' </td></tr>'."\n";
@@ -5687,7 +5687,7 @@
 	    '<input type="button" onClick="javascript:checkChoice(this.form,\'5\',\'verify\');" value="'.&mt('Verify').'" />'.
 	    ' '.&mt('receipt').': '.
 	    &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\')" />'.
 	    '</td></tr>'."\n";
     } 
     $result.='<tr bgcolor="#ffffe6"valign="top"><td colspan="2">'.

--albertel1141336231--