--- loncom/homework/grades.pm 2009/12/27 01:51:07 1.574.2.5 +++ loncom/homework/grades.pm 2009/12/27 02:05:40 1.574.2.6 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.574.2.5 2009/12/27 01:51:07 raeburn Exp $ +# $Id: grades.pm,v 1.574.2.6 2009/12/27 02:05:40 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -9050,13 +9050,13 @@ ENDHEADER my $sum=0; my $realnumber=$number; for (my $i=0;$i<$number;$i++) { - if ($answer[$i]) { + if ($correct[$i] eq '-') { + $realnumber--; + } elsif ($answer[$i]) { if ($gradingmechanism eq 'attendance') { $sum+=$pcorrect; - } elsif ($answer[$i] eq '*') { + } elsif ($correct[$i] eq '*') { $sum+=$pcorrect; - } elsif ($answer[$i] eq '-') { - $realnumber--; } else { if ($answer[$i] eq $correct[$i]) { $sum+=$pcorrect;