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

raeburn raeburn@source.lon-capa.org
Wed, 09 Dec 2009 19:41:10 -0000


raeburn		Wed Dec  9 19:41:10 2009 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Amend 1.582 changes.
  - Remove surplus &scantron_get_maxbubble() call
  - Adding navmap object check for one more call to &scantron_get_maxbubble(). 
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.582 loncom/homework/grades.pm:1.583
--- loncom/homework/grades.pm:1.582	Wed Dec  9 17:53:55 2009
+++ loncom/homework/grades.pm	Wed Dec  9 19:41:10 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.582 2009/12/09 17:53:55 raeburn Exp $
+# $Id: grades.pm,v 1.583 2009/12/09 19:41:10 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -7386,7 +7386,12 @@
     #get scantron line setup
     my %scantron_config=&get_scantron_config($env{'form.scantron_format'});
     my ($scanlines,$scan_data)=&scantron_getfile();
-    &scantron_get_maxbubble();	# parse needs the bubble line array.
+    my $nav_error;
+    &scantron_get_maxbubble(\$nav_error); # parse needs the bubble line array.
+    if ($nav_error) {
+        $r->print(&navmap_errormsg());
+        return(1,$currentphase);
+    }
 
     for (my $i=0;$i<=$scanlines->{'count'};$i++) {
 	my $line=&scantron_get_line($scanlines,$scan_data,$i);
@@ -7626,9 +7631,6 @@
         return '';
     }
 
-    &scantron_get_maxbubble();	# Need the bubble lines array to parse.
-
-
     # If an ssi failed in scantron_get_maxbubble, put an error message out to
     # the user and return.