--- loncom/homework/grades.pm 2003/05/30 21:33:15 1.92
+++ loncom/homework/grades.pm 2003/06/13 21:29:30 1.97
@@ -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.97 2003/06/13 21:29:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -466,8 +466,13 @@ LISTJAVASCRIPT
'onClick="javascript:checkSelect(this.form.stuinfo);" '.
'value="'.$viewgrade.'" />'."\n";
if ($ctr == 0) {
- $gradeTable=' '.
- 'No submission found for this resource. ';
+ my $num_students=(scalar(keys(%$fullname)));
+ if ($num_students eq 0) {
+ $gradeTable=' There are no students currently enrolled.';
+ } else {
+ $gradeTable=' '.
+ 'No submissions found for this resource for any students. ('.$num_students.' checked for submissions ';
+ }
} elsif ($ctr == 1) {
$gradeTable =~ s/type=checkbox/type=checkbox checked/;
}
@@ -1924,6 +1929,10 @@ sub viewgrades {
$result.=''."\n";
$result.=''."\n";
+ if (scalar(%$fullname) eq 0) {
+ my $colspan=3+scalar(@parts);
+ $result='There are no students in section "'.$ENV{'form.section'}.'" with enrollment status "'.$ENV{'form.status'}.'" to modify or grade.';
+ }
$result.=&show_grading_menu_form($symb,$url);
return $result;
}
@@ -2035,8 +2044,9 @@ sub editgrades {
$result .= '
';
$result .= $header;
$result .= '
'."\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 +2054,7 @@ sub editgrades {
my %newrecord;
my $updateflag = 0;
- $result .= '
'.$uname.'
'.
+ $line .= '
'.$uname.'
'.
$udom.'
'.
$$fullname{$usercolon}.'
';
foreach (@partid) {
@@ -2066,7 +2076,7 @@ sub editgrades {
}
$score = 'excused' if (($ENV{'form.GD_'.$user.'_'.$_.'_solved'} eq 'excused') &&
($score ne 'excused'));
- $result .= '