--- loncom/homework/grades.pm 2007/11/06 11:21:21 1.482 +++ loncom/homework/grades.pm 2007/11/06 11:48:48 1.483 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.482 2007/11/06 11:21:21 foxr Exp $ +# $Id: grades.pm,v 1.483 2007/11/06 11:48:48 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5453,8 +5453,9 @@ sub scantron_parse_scanline { } elsif (scalar(@array) le 2) { my $location = length($array[0]); - my $line_num = $location / $$scantron_config{'Qlength'}; + my $line_num = int($location / $$scantron_config{'Qlength'}); my $bubble = $alphabet[$location % $$scantron_config{'Qlength'}]; + for (my $ans = 0; $ans < $answers_needed; $ans++) { if ($ans eq $line_num) {