]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed up the tabs for roles
authormoodler <moodler>
Fri, 26 Jan 2007 06:18:43 +0000 (06:18 +0000)
committermoodler <moodler>
Fri, 26 Jan 2007 06:18:43 +0000 (06:18 +0000)
admin/roles/tabs.php

index 94e647e66c5303ff83afc6c95849326eff235c03..33f27e089d49881b1ac46e2a6ee6cc17713d484c 100755 (executable)
@@ -130,7 +130,6 @@ if ($context->contextlevel != CONTEXT_SYSTEM) {    // Print tabs for anything ex
             $overridableroles = get_overridable_roles($context);
         }
 
-        $inactive[] = 'roles';
         if (!empty($assignableroles)) {
             $secondrow[] = new tabobject('assign',
                                          $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$context->id,
@@ -147,14 +146,14 @@ if ($context->contextlevel != CONTEXT_SYSTEM) {    // Print tabs for anything ex
                                true);
         }
 
-        if ($tabsmode == 'override') {
-            $currenttab = 'override';
-        } elseif ($tabsmode == 'assign') {
-            $currenttab = 'assign';
-        }
+        $inactive[] = 'roles';
+        $activetwo = array('roles');
+        $currenttab = $tabsmode;
 
     } else {
         $inactive[] = '';
+        $activetwo = array();
+        $currenttab = 'roles';
     }
 
     if (!empty($secondrow)) {
@@ -163,7 +162,7 @@ if ($context->contextlevel != CONTEXT_SYSTEM) {    // Print tabs for anything ex
         $tabs = array($toprow);
     }
 
-    print_tabs($tabs, $currenttab, $inactive);
+    print_tabs($tabs, $currenttab, $inactive, $activetwo);
 }
 
 ?>