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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 18 Sep 2003 18:45:28 -0000


albertel		Thu Sep 18 14:45:28 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - fixes BUG#2205, 'reset status' on the 'grade everyone at once' page didn't always work.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.138 loncom/homework/grades.pm:1.139
--- loncom/homework/grades.pm:1.138	Thu Sep 18 13:20:05 2003
+++ loncom/homework/grades.pm	Thu Sep 18 14:45:28 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.138 2003/09/18 17:20:05 albertel Exp $
+# $Id: grades.pm,v 1.139 2003/09/18 18:45:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2335,18 +2335,17 @@
 		$newrecord{'resource.'.$_.'.awarded'} = 0;
 		$newrecord{'resource.'.$_.'.regrader'}="$ENV{'user.name'}:$ENV{'user.domain'}";
 		$updateflag = 1;
+	    } elsif (!($old_part eq $partial && $old_score eq $score)) {
+		$updateflag = 1;
+		$newrecord{'resource.'.$_.'.awarded'}  = $partial if $partial ne '';
+		$newrecord{'resource.'.$_.'.solved'}   = $score;
+		$rec_update++;
 	    }
 
 	    $line .= '<td align="center">'.$old_aw.'&nbsp;</td>'.
 		'<td align="center">'.$awarded.
 		($score eq 'excused' ? $score : '').'&nbsp;</td>';
 
-	    if (!($old_part eq $partial && $old_score eq $score)) {
-		$updateflag = 1;
-		$newrecord{'resource.'.$_.'.awarded'}  = $partial if $partial ne '';
-		$newrecord{'resource.'.$_.'.solved'}   = $score;
-		$rec_update++;
-	    }
 
 	    my $partid=$_;
 	    foreach my $stores (@parts) {