[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 13 Jun 2003 15:43:28 -0000
albertel Fri Jun 13 11:43:28 2003 EDT
Modified files:
/loncom/homework grades.pm
Log:
- fixes BUG#1629, more verbose about there being no students to grade.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.95 loncom/homework/grades.pm:1.96
--- loncom/homework/grades.pm:1.95 Thu Jun 12 16:11:07 2003
+++ loncom/homework/grades.pm Fri Jun 13 11:43:28 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.95 2003/06/12 20:11:07 albertel Exp $
+# $Id: grades.pm,v 1.96 2003/06/13 15:43:28 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -466,8 +466,13 @@
'onClick="javascript:checkSelect(this.form.stuinfo);" '.
'value="'.$viewgrade.'" /></form>'."\n";
if ($ctr == 0) {
- $gradeTable='<br /> <font color="red">'.
- 'No submission found for this resource.</font><br />';
+ my $num_students=(scalar(keys(%$fullname)));
+ if ($num_students eq 0) {
+ $gradeTable='<br /> <font color="red">There are no students currently enrolled.</font>';
+ } else {
+ $gradeTable='<br /> <font color="red">'.
+ 'No submissions found for this resource for any students. ('.$num_students.' checked for submissions</font><br />';
+ }
} elsif ($ctr == 1) {
$gradeTable =~ s/type=checkbox/type=checkbox checked/;
}
@@ -1924,6 +1929,10 @@
$result.='<input type="hidden" name="total" value="'.$ctr.'" />'."\n";
$result.='<input type="button" value="Submit Changes" '.
'onClick="javascript:submit();" TARGET=_self /></form>'."\n";
+ if (scalar(%$fullname) eq 0) {
+ my $colspan=3+scalar(@parts);
+ $result='<font color="red">There are no students in section "'.$ENV{'form.section'}.'" with enrollment status "'.$ENV{'form.status'}.'" to modify or grade.</font>';
+ }
$result.=&show_grading_menu_form($symb,$url);
return $result;
}