]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12362 - Don't show scores for incomplete attempts on the quiz view page. Merged...
authortjhunt <tjhunt>
Tue, 27 Nov 2007 19:18:36 +0000 (19:18 +0000)
committertjhunt <tjhunt>
Tue, 27 Nov 2007 19:18:36 +0000 (19:18 +0000)
mod/quiz/view.php

index a2dfe307036978fad6457645e6782718c64acd91..e04808eae6cc626704663fc49eff8227eed89dc0 100644 (file)
                 $timetaken = format_time($quiz->timeclose - $attempt->timestart);
                 $datecompleted = userdate($quiz->timeclose);
             } else {
-                // Something wheird happened.
+                // Something weird happened.
                 $timetaken = '';
                 $datecompleted = '';
             }
             $row[] = $datecompleted;
 
-            if ($markcolumn) {
+            if ($markcolumn && $attempt->timefinish > 0) {
                 if ($attemptoptions->scores) {
                     $row[] = make_review_link(round($attempt->sumgrades, $quiz->decimalpoints), $quiz, $attempt);
                 } else {
             $attemptgrade = quiz_rescale_grade($attempt->sumgrades, $quiz);
 
             if ($gradecolumn) {
-                if ($attemptoptions->scores) {
+                if ($attemptoptions->scores && $attempt->timefinish > 0) {
                     $formattedgrade = $attemptgrade;
                     // highlight the highest grade if appropriate
                     if ($overallstats && $numattempts > 1 && !is_null($mygrade) && $attemptgrade == $mygrade && $quiz->grademethod == QUIZ_GRADEHIGHEST) {
                 }
             }
 
-            if ($feedbackcolumn) {
+            if ($feedbackcolumn && $attempt->timefinish > 0) {
                 if ($attemptoptions->overallfeedback) {
                     $row[] = quiz_feedback_for_grade($attemptgrade, $quiz->id);
                 } else {