]> git.mjollnir.org Git - moodle.git/commitdiff
merged notice fix
authormoodler <moodler>
Wed, 20 Feb 2008 06:52:43 +0000 (06:52 +0000)
committermoodler <moodler>
Wed, 20 Feb 2008 06:52:43 +0000 (06:52 +0000)
mod/quiz/index.php

index da8a4eed1fa223a71acba9ad315b6c0105bfb3b1..3193bda57d6578831407c0a25882d2f27e30e919 100644 (file)
@@ -53,6 +53,8 @@
     }
     array_unshift($align, 'center');
 
+    $showing = 'scores';  // default
+
     if (has_capability('mod/quiz:viewreports', $coursecontext)) {
         array_push($headings, get_string('attempts', 'quiz'));
         array_push($align, 'left');
     } else if (has_capability('mod/quiz:attempt', $coursecontext)) {
         array_push($headings, get_string('bestgrade', 'quiz'), get_string('feedback', 'quiz'));
         array_push($align, 'left', 'left');
-        $showing = 'scores';
     }
 
     $table->head = $headings;
     $table->align = $align;
 
-// Poplate the table with the list of instances.
+/// Populate the table with the list of instances.
+
     $currentsection = '';
     foreach ($quizzes as $quiz) {
         $cm      = get_coursemodule_from_instance('quiz', $quiz->id);
             } else {
                 $data[] = '';
             }
-        } else if ($showing = 'scores') {
+        } else if ($showing == 'scores') {
 
             // Grade and feedback.
             $bestgrade = quiz_get_best_grade($quiz, $USER->id);