From 55de6e0784ec3bf8f3277a9a948109cf00c75d23 Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 15 Sep 2008 06:09:57 +0000 Subject: [PATCH] MDL-16046 Fixed up the portfolio tabs --- user/portfolio.php | 2 +- user/portfoliologs.php | 2 +- user/tabs.php | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/user/portfolio.php b/user/portfolio.php index 5c1b610cae..327165e4cd 100644 --- a/user/portfolio.php +++ b/user/portfolio.php @@ -37,7 +37,7 @@ $navigation = build_navigation($navlinks); print_header("$course->fullname: $fullname: $strportfolios", $course->fullname, $navigation, "", "", true, " ", navmenu($course)); -$currenttab = 'portfolios'; +$currenttab = 'portfolioconf'; $showroles = 1; include('tabs.php'); diff --git a/user/portfoliologs.php b/user/portfoliologs.php index ffe9b2d0d2..18e0706fb2 100644 --- a/user/portfoliologs.php +++ b/user/portfoliologs.php @@ -30,7 +30,7 @@ $navigation = build_navigation($navlinks); print_header("$course->fullname: $fullname: $strportfolios", $course->fullname, $navigation, "", "", true, " ", navmenu($course)); -$currenttab = 'portfolios'; +$currenttab = 'portfoliologs'; $showroles = 1; include('tabs.php'); diff --git a/user/tabs.php b/user/tabs.php index b04fca174b..052fd5f004 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -245,10 +245,13 @@ 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')); + } } } -- 2.39.5