mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-55074 theme_boost: Only show activity edit menu on first page
This commit is contained in:
parent
e226461dab
commit
5004baaad4
1 changed files with 12 additions and 5 deletions
|
@ -567,11 +567,18 @@ class core_renderer extends \core_renderer {
|
||||||
$node = $this->page->navigation->find_active_node();
|
$node = $this->page->navigation->find_active_node();
|
||||||
if (($node->type == navigation_node::TYPE_ACTIVITY ||
|
if (($node->type == navigation_node::TYPE_ACTIVITY ||
|
||||||
$node->type == navigation_node::TYPE_RESOURCE)) {
|
$node->type == navigation_node::TYPE_RESOURCE)) {
|
||||||
// Get the course admin node from the settings navigation.
|
|
||||||
$node = $this->page->settingsnav->find('modulesettings', navigation_node::TYPE_SETTING);
|
$items = $this->page->navbar->get_items();
|
||||||
if ($node) {
|
$navbarnode = end($items);
|
||||||
// Build an action menu based on the visible nodes from this navigation tree.
|
// We only want to show the menu on the first page of the activity. This means
|
||||||
$this->build_action_menu_from_navigation($menu, $node);
|
// the breadcrumb has no additional nodes.
|
||||||
|
if ($navbarnode->key == $node->key && $navbarnode->type == $node->type) {
|
||||||
|
// Get the course admin node from the settings navigation.
|
||||||
|
$node = $this->page->settingsnav->find('modulesettings', navigation_node::TYPE_SETTING);
|
||||||
|
if ($node) {
|
||||||
|
// Build an action menu based on the visible nodes from this navigation tree.
|
||||||
|
$this->build_action_menu_from_navigation($menu, $node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue