]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12543 - Quiz overview report displays a grade of 0 the same way as a missing...
authortjhunt <tjhunt>
Tue, 11 Dec 2007 16:55:54 +0000 (16:55 +0000)
committertjhunt <tjhunt>
Tue, 11 Dec 2007 16:55:54 +0000 (16:55 +0000)
mod/quiz/report/overview/report.php

index cadfcf18e17558c70b629b1b631dc457152184fb..95cec6800c9f37b34eebade780eb595d149240b2 100644 (file)
@@ -476,16 +476,19 @@ class quiz_report extends quiz_default_report {
                     }
 
                     // Grades columns.
-                    if ($showgrades && $attempt->sumgrades) {
-                        $grade = round($attempt->sumgrades / $quiz->sumgrades * $quiz->grade,$quiz->decimalpoints);
-                        if (!$download) {
-                            $row[] = '<a href="review.php?q='.$quiz->id.'&amp;attempt='.$attempt->attempt.'">'.$grade.'</a>';
+                    if ($showgrades) {
+                        if ($attempt->timefinish) {
+                            $grade = round($attempt->sumgrades / $quiz->sumgrades * $quiz->grade,$quiz->decimalpoints);
+                            if (!$download) {
+                                $row[] = '<a href="review.php?q='.$quiz->id.'&amp;attempt='.$attempt->attempt.'">'.$grade.'</a>';
+                            } else {
+                                $row[] = $grade;
+                            }
                         } else {
-                            $row[] = $grade;
+                            $row[] = '-';
                         }
-                    } else {
-                        $row[] = '-';
                     }
+
                     if($detailedmarks) {
                         if(empty($attempt->attempt)) {
                             foreach($questionids as $questionid) {