Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'm20_MDL-25468_coding_error' of git://github.com/dongshe…

…ng/moodle
  • Loading branch information...
commit 476b123a721c2cec1b022ca23f63b239d45c473c 2 parents 8c4a6a4 + 100e0d4
@skodak skodak authored
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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.