Commit 25b51251 authored by Alexey's avatar Alexey
Browse files

MDL-74522 lib/classes/navigation fix Navbar My courses data-key value

parent 5500d143
......@@ -68,7 +68,7 @@ class primary extends view {
$showcoursesnode = empty($this->page->theme->removedprimarynavitems) ||
!in_array('courses', $this->page->theme->removedprimarynavitems);
if ($showcoursesnode) {
$this->add(get_string('mycourses'), new \moodle_url('/my/courses.php'), self::TYPE_ROOTNODE, null, 'courses');
$this->add(get_string('mycourses'), new \moodle_url('/my/courses.php'), self::TYPE_ROOTNODE, null, 'mycourses');
}
}
......
......@@ -62,8 +62,8 @@ class primary_test extends \advanced_testcase {
public function test_setting_initialise_provider() {
return [
'Testing as a guest user' => ['guest', ['home']],
'Testing as an admin' => ['admin', ['home', 'myhome', 'courses', 'siteadminnode']],
'Testing as a regular user' => ['user', ['home', 'myhome', 'courses']]
'Testing as an admin' => ['admin', ['home', 'myhome', 'mycourses', 'siteadminnode']],
'Testing as a regular user' => ['user', ['home', 'myhome', 'mycourses']]
];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment