From 0406113fa9c8c642a0b7a31ac538f662073e07a0 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 26 Jan 2007 06:59:16 +0000 Subject: [PATCH] FIxed tabs for quizzes --- mod/quiz/tabs.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/quiz/tabs.php b/mod/quiz/tabs.php index 0866d8e433..4d0f70c4ae 100644 --- a/mod/quiz/tabs.php +++ b/mod/quiz/tabs.php @@ -28,7 +28,8 @@ $tabs = array(); $row = array(); $inactive = array(); - + $activated = array(); + if (has_capability('mod/quiz:view', $context)) { $row[] = new tabobject('info', "$CFG->wwwroot/mod/quiz/view.php?q=$quiz->id", get_string('info', 'quiz')); } @@ -50,6 +51,8 @@ if ($currenttab == 'reports' and isset($mode)) { $inactive[] = 'reports'; + $activated[] = 'reports'; + $allreports = get_list_of_plugins("mod/quiz/report"); $reportlist = array ('overview', 'regrade', 'grading', 'analysis'); // Standard reports we want to show first @@ -73,6 +76,7 @@ if ($currenttab == 'edit' and isset($mode)) { $inactive[] = 'edit'; + $activated[] = 'edit'; $row = array(); $currenttab = $mode; @@ -102,6 +106,6 @@ $tabs[] = $row; } - print_tabs($tabs, $currenttab, $inactive); + print_tabs($tabs, $currenttab, $inactive, $activated); ?> -- 2.39.5