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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 02 Dec 2003 02:52:10 -0000


albertel		Mon Dec  1 21:52:10 2003 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  - Got the logic wrong here, was checking only if a part was graded correct, not all parts (BUG#2263)
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.163 loncom/homework/grades.pm:1.164
--- loncom/homework/grades.pm:1.163	Tue Nov 25 16:54:58 2003
+++ loncom/homework/grades.pm	Mon Dec  1 21:52:10 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.163 2003/11/25 21:54:58 www Exp $
+# $Id: grades.pm,v 1.164 2003/12/02 02:52:10 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -678,10 +678,11 @@
 	if ($ENV{'form.showgrading'} eq 'yes' && $submitonly ne 'all') {
 	    (%status) =&student_gradeStatus($url,$symb,$udom,$uname,$partlist);
 	    my $submitted = 0;
-	    my $graded = 1;
+	    my $graded = 0;
 	    foreach (keys(%status)) {
 		$submitted = 1 if ($status{$_} ne 'nothing');
-		$graded = 0 if ($status{$_} =~ /^correct/);
+		$graded = 1 if ($status{$_} !~ /^correct/);
+
 		my ($foo,$partid,$foo1) = split(/\./,$_);
 		if ($status{'resource.'.$partid.'.submitted_by'} ne '') {
 		    $submitted = 0;