[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 30 May 2003 21:42:36 -0000
albertel Fri May 30 17:42:36 2003 EDT
Modified files:
/loncom/homework grades.pm
Log:
- fixes for BUG# 1530, non updated students listed seperately from updated students
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.92 loncom/homework/grades.pm:1.93
--- loncom/homework/grades.pm:1.92 Fri May 30 17:33:15 2003
+++ loncom/homework/grades.pm Fri May 30 17:42:36 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.92 2003/05/30 21:33:15 albertel Exp $
+# $Id: grades.pm,v 1.93 2003/05/30 21:42:36 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2035,8 +2035,9 @@
$result .= '</tr><tr bgcolor="#deffff">';
$result .= $header;
$result .= '</tr>'."\n";
-
+ my $noupdate;
for ($i=0; $i<$ENV{'form.total'}; $i++) {
+ my $line;
my $user = $ENV{'form.ctr'.$i};
my $usercolon = $user;
$usercolon =~s/_/:/;
@@ -2044,7 +2045,7 @@
my %newrecord;
my $updateflag = 0;
- $result .= '<tr bgcolor="#ffffde"><td>'.$uname.' </td><td>'.
+ $line .= '<tr bgcolor="#ffffde"><td>'.$uname.' </td><td>'.
$udom.' </td><td>'.
$$fullname{$usercolon}.' </td>';
foreach (@partid) {
@@ -2066,7 +2067,7 @@
}
$score = 'excused' if (($ENV{'form.GD_'.$user.'_'.$_.'_solved'} eq 'excused') &&
($score ne 'excused'));
- $result .= '<td align="center">'.$old_aw.' </td>'.
+ $line .= '<td align="center">'.$old_aw.' </td>'.
'<td align="center">'.$awarded.
($score eq 'excused' ? $score : '').' </td>';
@@ -2089,16 +2090,22 @@
$newrecord{'resource.'.$part.'regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";
$updateflag=1;
}
- $result .= '<td align="center">'.$old_aw.' </td>'.
+ $line .= '<td align="center">'.$old_aw.' </td>'.
'<td align="center">'.$awarded.' </td>';
}
}
+ $line.='</tr>'."\n";
if ($updateflag) {
$count++;
&Apache::lonnet::cstore(\%newrecord,$symb,$ENV{'request.course.id'},
$udom,$uname);
+ $result.=$line;
+ } else {
+ $noupdate.=$line;
}
- $result .= '</tr>'."\n";
+ }
+ if ($noupdate) {
+ $result .= '<tr bgcolor="#ffffff"><td align="center" colspan="7">No Changes Occured For the Students Below</td></tr>'.$noupdate;
}
$result .= '</table></td></tr></table>'."\n".
&show_grading_menu_form ($symb,$url);