--- loncom/homework/grades.pm 2007/11/16 08:50:39 1.493 +++ loncom/homework/grades.pm 2007/11/16 08:52:15 1.494 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.493 2007/11/16 08:50:39 albertel Exp $ +# $Id: grades.pm,v 1.494 2007/11/16 08:52:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5403,8 +5403,8 @@ sub scantron_parse_scanline { $questions =~ s/\r$//; # Get rid of trailing \r too (MAC or Win uploads). while (length($questions)) { my $answers_needed = $bubble_lines_per_response{$questnum}; - my $answer_length = $$scantron_config{'Qlength'} * $answers_needed; - + my $answer_length = ($$scantron_config{'Qlength'} * $answers_needed) + || 1; $questnum++; my $currentquest = substr($questions,0,$answer_length);