[LON-CAPA-cvs] cvs: loncom /homework grades.pm
raeburn
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 04 Feb 2008 23:30:07 -0000
raeburn Mon Feb 4 18:30:07 2008 EDT
Modified files:
/loncom/homework grades.pm
Log:
Bug 5589. For positional style scantron formats, suppress erroneous doublebubble reports caused by trailing spaces after the end of bubble data in each scanline.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.506 loncom/homework/grades.pm:1.507
--- loncom/homework/grades.pm:1.506 Mon Feb 4 12:45:07 2008
+++ loncom/homework/grades.pm Mon Feb 4 18:30:05 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.506 2008/02/04 17:45:07 raeburn Exp $
+# $Id: grades.pm,v 1.507 2008/02/04 23:30:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5524,6 +5524,10 @@
# If the split only gives us one element.. the full length of the
# answer string, no bubbles are filled in:
+ if ($answers_needed eq '') {
+ return;
+ }
+
if (length($array[0]) eq $$scantron_config{'Qlength'}*$answers_needed) {
for (my $ans=0; $ans<$answers_needed; $ans++ ) {
$record->{"scantron.$ansnum.answer"}='';