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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 28 Jan 2004 16:25:05 -0000


albertel		Wed Jan 28 11:25:05 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - fix up message for when no submissions found in specif filter modes BUG#2470
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.170 loncom/homework/grades.pm:1.171
--- loncom/homework/grades.pm:1.170	Thu Dec 11 08:51:09 2003
+++ loncom/homework/grades.pm	Wed Jan 28 11:25:05 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.170 2003/12/11 13:51:09 albertel Exp $
+# $Id: grades.pm,v 1.171 2004/01/28 16:25:05 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -738,9 +738,12 @@
 	if ($num_students eq 0) {
 	    $gradeTable='<br />&nbsp;<font color="red">There are no students currently enrolled.</font>';
 	} else {
+	    my $submissions='submissions';
+	    if ($submitonly eq 'incorrect') { $submissions = 'incorrect submissions'; }
+	    if ($submitonly eq 'graded'   ) { $submissions = 'ungraded submissions'; }
 	    $gradeTable='<br />&nbsp;<font color="red">'.
-		'No submissions found for this resource for any students. ('.$num_students.
-		' checked for submissions)</font><br />';
+		'No '.$submissions.' found for this resource for any students. ('.$num_students.
+		' students checked for '.$submissions.')</font><br />';
 	}
     } elsif ($ctr == 1) {
 	$gradeTable =~ s/type=checkbox/type=checkbox checked/;