MDL-16046 Fixed up the portfolio tabs
authormoodler <moodler>
Mon, 15 Sep 2008 06:09:57 +0000 (06:09 +0000)
committermoodler <moodler>
Mon, 15 Sep 2008 06:09:57 +0000 (06:09 +0000)
user/portfolio.php
user/portfoliologs.php
user/tabs.php

index 5c1b610cae8bc2b2186d1919bca29a1652c8edd5..327165e4cd6b5bcb8bc07b1ad990717a7abe45cf 100644 (file)
@@ -37,7 +37,7 @@ $navigation = build_navigation($navlinks);
 print_header("$course->fullname: $fullname: $strportfolios", $course->fullname,
              $navigation, "", "", true, "&nbsp;", navmenu($course));
 
-$currenttab = 'portfolios';
+$currenttab = 'portfolioconf';
 $showroles = 1;
 include('tabs.php');
 
index ffe9b2d0d2b6fc3ca82ef4fd91cc18103dc66d31..18e0706fb27b22dbe8a563596db2556cbb876aa4 100644 (file)
@@ -30,7 +30,7 @@ $navigation = build_navigation($navlinks);
 print_header("$course->fullname: $fullname: $strportfolios", $course->fullname,
              $navigation, "", "", true, "&nbsp;", navmenu($course));
 
-$currenttab = 'portfolios';
+$currenttab = 'portfoliologs';
 $showroles = 1;
 include('tabs.php');
 
index b04fca174b06b6229daa3cd7a116d126c398c9b2..052fd5f004bcc1e3d8945edc6304bf324a206031 100644 (file)
         require_once($CFG->libdir . '/portfoliolib.php');
         if (portfolio_instances(true, false)) {
             $toprow[] = new tabobject('portfolios', $CFG->wwwroot .'/user/portfolio.php', get_string('portfolios', 'portfolio'));
-            $inactive = array('portfolios');
-            $activetwo = array('portfolios');
-            $secondrow[] = new tabobject('configure', $CFG->wwwroot . '/user/portfolio.php', get_string('configure', 'portfolio'));
-            $secondrow[] = new tabobject('logs', $CFG->wwwroot . '/user/portfoliologs.php', get_string('logs', 'portfolio'));
+            if (in_array($currenttab, array('portfolioconf', 'portfoliologs'))) {
+                $inactive = array('portfolios');
+                $activetwo = array('portfolios');
+                $secondrow = array();
+                $secondrow[] = new tabobject('portfolioconf', $CFG->wwwroot . '/user/portfolio.php', get_string('configure', 'portfolio'));
+                $secondrow[] = new tabobject('portfoliologs', $CFG->wwwroot . '/user/portfoliologs.php', get_string('logs', 'portfolio'));
+            }
         }
     }