[LON-CAPA-cvs] cvs: loncom /homework grades.pm
raeburn
raeburn@source.lon-capa.org
Sat, 14 Feb 2009 17:03:40 -0000
raeburn Sat Feb 14 17:03:40 2009 EDT
Modified files:
/loncom/homework grades.pm
Log:
- Bug 5912.
- "Answers" from scantron line only accumulated from columns needed to match total bubble rows.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.549 loncom/homework/grades.pm:1.550
--- loncom/homework/grades.pm:1.549 Wed Feb 4 13:21:40 2009
+++ loncom/homework/grades.pm Sat Feb 14 17:03:40 2009
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.549 2009/02/04 13:21:40 hauer Exp $
+# $Id: grades.pm,v 1.550 2009/02/14 17:03:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5487,7 +5487,8 @@
my ($line,$whichline,$scantron_config,$scan_data,$just_header)=@_;
my %record;
- my $questions=substr($line,$$scantron_config{'Qstart'}-1); # Answers
+ my $lastpos = $env{'form.scantron_maxbubble'}*$$scantron_config{'Qlength'};
+ my $questions=substr($line,$$scantron_config{'Qstart'}-1,$lastpos); # Answers
my $data=substr($line,0,$$scantron_config{'Qstart'}-1); # earlier stuff
if (!($$scantron_config{'CODElocation'} eq 0 ||
$$scantron_config{'CODElocation'} eq 'none')) {