mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-62345 navigation: Change data-key for dashboard rootnode
This commit is contained in:
parent
07203d34f1
commit
f286376913
@ -1280,7 +1280,7 @@ class global_navigation extends navigation_node {
|
||||
// The home element should be my moodle because the root element is the site
|
||||
if (isloggedin() && !isguestuser()) { // Makes no sense if you aren't logged in
|
||||
$this->rootnodes['home'] = $this->add(get_string('myhome'), new moodle_url('/my/'),
|
||||
self::TYPE_SETTING, null, 'home', new pix_icon('i/dashboard', ''));
|
||||
self::TYPE_SETTING, null, 'myhome', new pix_icon('i/dashboard', ''));
|
||||
$this->rootnodes['home']->showinflatnavigation = true;
|
||||
}
|
||||
} else {
|
||||
@ -1488,7 +1488,7 @@ class global_navigation extends navigation_node {
|
||||
foreach ($this->rootnodes as $node) {
|
||||
// Dont remove the home node
|
||||
/** @var navigation_node $node */
|
||||
if ($node->key !== 'home' && !$node->has_children() && !$node->isactive) {
|
||||
if (!in_array($node->key, ['home', 'myhome']) && !$node->has_children() && !$node->isactive) {
|
||||
$node->remove();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user