Permalink
Showing with 4 additions and 19 deletions.
  1. +0 −16 lib/navigationlib.php
  2. +2 −3 user/portfolio.php
  3. +2 −0 user/portfoliologs.php
View
16 lib/navigationlib.php
@@ -3398,26 +3398,10 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr
if (portfolio_instances(true, false)) {
$portfolio = $usersetting->add(get_string('portfolios', 'portfolio'), null, self::TYPE_SETTING);
- $config = optional_param('config', 0, PARAM_INT);
- $hide = optional_param('hide', 0, PARAM_INT);
$url = new moodle_url('/user/portfolio.php', array('courseid'=>$course->id));
- if ($hide !== 0) {
- $url->param('hide', $hide);
- }
- if ($config !== 0) {
- $url->param('config', $config);
- }
$portfolio->add(get_string('configure', 'portfolio'), $url, self::TYPE_SETTING);
- $page = optional_param('page', 0, PARAM_INT);
- $perpage = optional_param('perpage', 10, PARAM_INT);
$url = new moodle_url('/user/portfoliologs.php', array('courseid'=>$course->id));
- if ($page !== 0) {
- $url->param('page', $page);
- }
- if ($perpage !== 0) {
- $url->param('perpage', $perpage);
- }
$portfolio->add(get_string('logs', 'portfolio'), $url, self::TYPE_SETTING);
}
}
View
5 user/portfolio.php
@@ -37,9 +37,7 @@
$courseid = optional_param('courseid', SITEID, PARAM_INT);
$url = new moodle_url('/user/portfolio.php', array('courseid'=>$courseid));
-if ($hide !== 0) {
- $url->param('hide', $hide);
-}
+
if ($config !== 0) {
$url->param('config', $config);
}
@@ -69,6 +67,7 @@
$showroles = 1;
if (!empty($config)) {
+ navigation_node::override_active_url(new moodle_url('/user/portfolio.php', array('courseid'=>$courseid)));
$instance = portfolio_instance($config);
$mform = new portfolio_user_form('', array('instance' => $instance, 'userid' => $user->id));
if ($mform->is_cancelled()){
View
2 user/portfoliologs.php
@@ -48,6 +48,8 @@
$url = new moodle_url('/user/portfoliologs.php', array('courseid'=>$courseid));
+navigation_node::override_active_url(new moodle_url('/user/portfoliologs.php', array('courseid'=>$courseid)));
+
if ($page !== 0) {
$url->param('page', $page);
}

0 comments on commit 476b123

Please sign in to comment.