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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 07 May 2004 17:40:51 -0000


albertel		Fri May  7 13:40:51 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - skip blank submissions (BUG#2860)
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.197 loncom/homework/grades.pm:1.198
--- loncom/homework/grades.pm:1.197	Fri May  7 12:12:32 2004
+++ loncom/homework/grades.pm	Fri May  7 13:40:51 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.197 2004/05/07 16:12:32 albertel Exp $
+# $Id: grades.pm,v 1.198 2004/05/07 17:40:51 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3212,7 +3212,8 @@
 	    my @matchKey = sort(grep /^resource\.\Q$partid\E\..*?\.submission$/,@versionKeys);
 #	    next if ($$record{"$version:resource.$partid.solved"} eq '');
 	    foreach my $matchKey (@matchKey) {
-		if (exists $$record{$version.':'.$matchKey}) {
+		if (exists($$record{$version.':'.$matchKey}) &&
+		    $$record{$version.':'.$matchKey} ne '') {
 		    my ($responseId)=($matchKey=~ /^resource\.\Q$partid\E\.(.*?)\.submission$/);
 		    $displaySub[0].='<b>Part&nbsp;'.$partid.'&nbsp;';
 		    $displaySub[0].='<font color="#999999">(ID&nbsp;'.