Index: temp_moodle_dev/moodle/mod/quiz/index.php =================================================================== diff -u -r5251d2a62e0e78377219456d6bba613eb2d1fd26 -raca9f00eec05f594be36b6397b9c363742db6022 --- temp_moodle_dev/moodle/mod/quiz/index.php (.../index.php) (revision 5251d2a62e0e78377219456d6bba613eb2d1fd26) +++ temp_moodle_dev/moodle/mod/quiz/index.php (.../index.php) (revision aca9f00eec05f594be36b6397b9c363742db6022) @@ -34,8 +34,8 @@ $navlinks[] = array('name' => $strquizzes, 'link' => '', 'type' => 'activity'); $navigation = build_navigation($navlinks); - print_header_simple($strquizzes, '', $navigation,'', '', true, $streditquestions, navmenu($course)); - + print_header_simple($strquizzes, '', $navigation, + '', '', true, $streditquestions, navmenu($course)); // Get all the appropriate data if (!$quizzes = get_all_instances_in_course("quiz", $course)) { @@ -53,15 +53,16 @@ } array_unshift($align, 'center'); - $showing = 'scores'; // default + $showing = ''; // default if (has_capability('mod/quiz:viewreports', $coursecontext)) { array_push($headings, get_string('attempts', 'quiz')); array_push($align, 'left'); $showing = 'stats'; - } else if (has_capability('mod/quiz:attempt', $coursecontext)) { + } else if (has_any_capability(array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'), $coursecontext)) { array_push($headings, get_string('bestgrade', 'quiz'), get_string('feedback', 'quiz')); array_push($align, 'left', 'left'); + $showing = 'scores'; // default } $table->head = $headings;