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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 14 Oct 2004 20:39:34 -0000


albertel		Thu Oct 14 16:39:34 2004 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - if they don't pick a code set don't validate the codes
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.220 loncom/homework/grades.pm:1.221
--- loncom/homework/grades.pm:1.220	Thu Oct  7 18:12:47 2004
+++ loncom/homework/grades.pm	Thu Oct 14 16:39:34 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.220 2004/10/07 22:12:47 albertel Exp $
+# $Id: grades.pm,v 1.221 2004/10/14 20:39:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4460,7 +4460,8 @@
 						 $scan_data);
 	my $CODE=$$scan_record{'scantron.CODE'};
 	my $error=0;
-	if (!exists($allcodes{$CODE}) && !$$scan_record{'scantron.useCODE'}) {
+	if (%allcodes && !exists($allcodes{$CODE}) 
+	    && !$$scan_record{'scantron.useCODE'}) {
 	    &scantron_get_correction($r,$i,$scan_record,
 				     \%scantron_config,
 				     $line,'incorrectCODE',\%allcodes);