Skip to content

Commit

Permalink
MDL-45774 Navigation: Hide the second dashboard node from the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Damyon Wiese authored and abgreeve committed Apr 10, 2015
1 parent e9f1284 commit 6bdc788
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 4 additions & 1 deletion lib/navigationlib.php
Original file line number Diff line number Diff line change
Expand Up @@ -4192,10 +4192,13 @@ protected function generate_user_settings($courseid, $userid, $gstitle='usercurr

// Add a user setting branch.
if ($gstitle == 'usercurrentsettings') {
$dashboard = $this->add('Dashboard', new moodle_url('/my/'), self::TYPE_CONTAINER, null, 'dashboard');
$dashboard = $this->add(get_string('myhome'), new moodle_url('/my/'), self::TYPE_CONTAINER, null, 'dashboard');
// This should be set to false as we don't want to show this to the user. It's only for generating the correct
// breadcrumb.
$dashboard->display = false;
if (get_home_page() == HOMEPAGE_MY) {
$dashboard->mainnavonly = true;
}

$iscurrentuser = ($user->id == $USER->id);

Expand Down
5 changes: 0 additions & 5 deletions lib/outputrenderers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3388,11 +3388,6 @@ public function navbar() {
return '';
}

// Remove the Dashboard node from the breadcrumb. This saves doubling up of the same link.
if (get_home_page()) {
array_shift($items);
}

$htmlblocks = array();
// Iterate the navarray and display each node
$separator = get_separator();
Expand Down
5 changes: 0 additions & 5 deletions theme/bootstrapbase/renderers/core_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ public function navbar() {
return '';
}

// Remove the Dashboard node from the breadcrumb. This saves doubling up of the same link.
if (get_home_page()) {
array_shift($items);
}

$breadcrumbs = array();
foreach ($items as $item) {
$item->hideicon = true;
Expand Down

0 comments on commit 6bdc788

Please sign in to comment.