[LON-CAPA-cvs] cvs: loncom /homework grades.pm

www www@source.lon-capa.org
Mon, 25 May 2009 11:12:13 -0000


www		Mon May 25 11:12:13 2009 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Bug #5832: correctly process clicker wildcard entries
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.575 loncom/homework/grades.pm:1.576
--- loncom/homework/grades.pm:1.575	Sat May 23 19:01:13 2009
+++ loncom/homework/grades.pm	Mon May 25 11:12:13 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.575 2009/05/23 19:01:13 www Exp $
+# $Id: grades.pm,v 1.576 2009/05/25 11:12:13 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -9043,13 +9043,13 @@
           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;