]> git.mjollnir.org Git - moodle.git/commitdiff
FIxed tabs for quizzes
authormoodler <moodler>
Fri, 26 Jan 2007 06:59:16 +0000 (06:59 +0000)
committermoodler <moodler>
Fri, 26 Jan 2007 06:59:16 +0000 (06:59 +0000)
mod/quiz/tabs.php

index 0866d8e433588375693f20471a6da76eb058229b..4d0f70c4ae7b1b4e9cfd31668b23301ad2c5828c 100644 (file)
@@ -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;
         $tabs[] = $row;
     }
 
-    print_tabs($tabs, $currenttab, $inactive);
+    print_tabs($tabs, $currenttab, $inactive, $activated);
 
 ?>