[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs-allow@mail.lon-capa.org
Tue, 06 Nov 2007 19:19:54 -0000
albertel Tue Nov 6 14:19:54 2007 EDT
Modified files:
/loncom/homework grades.pm
Log:
- data tabling the grade whole for 1 student path
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.483 loncom/homework/grades.pm:1.484
--- loncom/homework/grades.pm:1.483 Tue Nov 6 06:48:48 2007
+++ loncom/homework/grades.pm Tue Nov 6 14:19:54 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.483 2007/11/06 11:48:48 foxr Exp $
+# $Id: grades.pm,v 1.484 2007/11/06 19:19:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4099,12 +4099,13 @@
$request->print($result);
my $studentTable.=' <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"> <b>No.</b></td>'.
- '<td>'.&nameUserString('header').'</td>'.
- '<td align="right"> <b>No.</b></td>'.
- '<td>'.&nameUserString('header').'</td></tr>';
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th align="right"> No.</th>'.
+ '<th>'.&nameUserString('header').'</th>'.
+ '<th align="right"> No.</th>'.
+ '<th>'.&nameUserString('header').'</th>'.
+ &Apache::loncommon::end_data_table_header_row();
my (undef,undef,$fullname) = &getclasslist($getsec,'1');
my $ptr = 1;
@@ -4116,15 +4117,21 @@
return $a cmp $b;
} (keys(%$fullname))) {
my ($uname,$udom) = split(/:/,$student);
- $studentTable.=($ptr%2 == 1 ? '<tr bgcolor="#ffffe6">' : '</td>');
+ $studentTable.=($ptr%2==1 ? &Apache::loncommon::start_data_table_row()
+ : '</td>');
$studentTable.='<td align="right">'.$ptr.' </td>';
$studentTable.='<td> <label><input type="radio" name="student" value="'.$student.'" /> '
.&nameUserString(undef,$$fullname{$student},$uname,$udom)."</label>\n";
- $studentTable.=($ptr%2 == 0 ? '</td></tr>' : '');
+ $studentTable.=
+ ($ptr%2 == 0 ? '</td>'.&Apache::loncommon::end_data_table_row()
+ : '');
$ptr++;
}
- $studentTable.='</td><td> </td><td> </td></tr>' if ($ptr%2 == 0);
- $studentTable.='</table></td></tr></table>'."\n";
+ if ($ptr%2 == 0) {
+ $studentTable.='</td><td> </td><td> </td>'.
+ &Apache::loncommon::end_data_table_row();
+ }
+ $studentTable.=&Apache::loncommon::end_data_table()."\n";
$studentTable.='<input type="button" '.
'onClick="javascript:checkPickOne(this.form);"value="Next->" /></form>'."\n";
@@ -4224,10 +4231,11 @@
$studentTable.=' <b>Note:</b> Problems graded correct by the computer are marked with a '.$checkIcon.
' symbol.'."\n".
- '<table border="0"><tr><td bgcolor="#777777">'.
- '<table border="0"><tr bgcolor="#e6ffff">'.
- '<td align="center"><b> Prob. </b></td>'.
- '<td><b> '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade</b></td></tr>';
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th align="center"> Prob. </th>'.
+ '<th> '.($env{'form.vProb'} eq 'no' ? 'Title' : 'Problem Text').'/Grade</th>'.
+ &Apache::loncommon::end_data_table_header_row();
&Apache::lonxml::clear_problem_counter();
my ($depth,$question,$prob) = (1,1,1);
@@ -4241,7 +4249,9 @@
my $parts = $curRes->parts();
my $title = $curRes->compTitle();
my $symbx = $curRes->symb();
- $studentTable.='<tr bgcolor="#ffffe6"><td align="center" valign="top" >'.$prob.
+ $studentTable.=
+ &Apache::loncommon::start_data_table_row().
+ '<td align="center" valign="top" >'.$prob.
(scalar(@{$parts}) == 1 ? '' : '<br />('.scalar(@{$parts}).' parts)').'</td>';
$studentTable.='<td valign="top">';
my %form = ('CODE' => $env{'form.CODE'},);
@@ -4449,12 +4459,14 @@
my $iterator = $navmap->getIterator($map->map_start(),
$map->map_finish());
- my $studentTable='<table border="0"><tr><td bgcolor="#777777">'.
- '<table border="0"><tr bgcolor="#e6ffff">'.
- '<td align="center"><b> Prob. </b></td>'.
- '<td><b> Title </b></td>'.
- '<td><b> Previous Score </b></td>'.
- '<td><b> New Score </b></td></tr>';
+ my $studentTable=
+ &Apache::loncommon::start_data_table().
+ &Apache::loncommon::start_data_table_header_row().
+ '<th align="center"> Prob. </th>'.
+ '<th> Title </th>'.
+ '<th> Previous Score </th>'.
+ '<th> New Score </th>'.
+ &Apache::loncommon::end_data_table_header_row();
$iterator->next(); # skip the first BEGIN_MAP
my $curRes = $iterator->next(); # for "current resource"
@@ -4467,7 +4479,9 @@
my $parts = $curRes->parts();
my $title = $curRes->compTitle();
my $symbx = $curRes->symb();
- $studentTable.='<tr bgcolor="#ffffe6"><td align="center" valign="top" >'.$prob.
+ $studentTable.=
+ &Apache::loncommon::start_data_table_row().
+ '<td align="center" valign="top" >'.$prob.
(scalar(@{$parts}) == 1 ? '' : '<br />('.scalar(@{$parts}).' parts)').'</td>';
$studentTable.='<td valign="top"> <b>'.$title.'</b> </td>';
@@ -4555,14 +4569,14 @@
$studentTable.='<td valign="top">'.$displayPts[0].'</td>'.
'<td valign="top">'.$displayPts[1].'</td>'.
- '</tr>';
+ &Apache::loncommon::end_data_table_row();
$prob++;
}
$curRes = $iterator->next();
}
- $studentTable.='</td></tr></table></td></tr></table>';
+ $studentTable.=&Apache::loncommon::end_data_table();
$studentTable.=&show_grading_menu_form($env{'form.symb'});
my $grademsg=($changeflag == 0 ? 'No score was changed or updated.' :
'The scores were changed for '.