mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-72287 theme_boost: Remove 'My courses' navbar item in module context
This commit is contained in:
parent
e00da7e884
commit
8b8b037ec1
@ -58,6 +58,11 @@ class boostnavbar implements \renderable {
|
||||
$this->remove('myhome'); // Dashboard.
|
||||
$this->remove('home');
|
||||
|
||||
// Remove 'My courses' if we are in the module context.
|
||||
if ($this->page->context->contextlevel == CONTEXT_MODULE) {
|
||||
$this->remove('mycourses');
|
||||
}
|
||||
|
||||
if (!is_null($this->get_item('root'))) { // We are in site administration.
|
||||
// Remove the 'Site administration' navbar node as it already exists in the primary navigation menu.
|
||||
$this->remove('root');
|
||||
|
Loading…
x
Reference in New Issue
Block a user