mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-72930 navigation: Remove duplicated navigation boxes.
Some pages have settings that really aren't required anymore. These have been removed and a function has been aded so that other developers can turn off the navigation overflow if they want.
This commit is contained in:
parent
f56ecc27f9
commit
0a04ebde11
4 changed files with 31 additions and 28 deletions
|
@ -453,33 +453,13 @@ class grading_manager {
|
|||
// no money, no funny
|
||||
return;
|
||||
|
||||
} else if (count($areas) == 1) {
|
||||
} else {
|
||||
// make just a single node for the management screen
|
||||
$areatitle = reset($areas);
|
||||
$areaname = key($areas);
|
||||
$this->set_area($areaname);
|
||||
$method = $this->get_active_method();
|
||||
$managementnode = $modulenode->add(get_string('gradingmanagement', 'core_grading'),
|
||||
$this->get_management_url(), settings_navigation::TYPE_CUSTOM, null, 'advgrading');
|
||||
if ($method) {
|
||||
$controller = $this->get_controller($method);
|
||||
$controller->extend_settings_navigation($settingsnav, $managementnode);
|
||||
}
|
||||
|
||||
} else {
|
||||
// make management screen node for each area
|
||||
$managementnode = $modulenode->add(get_string('gradingmanagement', 'core_grading'),
|
||||
null, settings_navigation::TYPE_CUSTOM, null, 'advgrading');
|
||||
foreach ($areas as $areaname => $areatitle) {
|
||||
$this->set_area($areaname);
|
||||
$method = $this->get_active_method();
|
||||
$node = $managementnode->add($areatitle,
|
||||
$this->get_management_url(), settings_navigation::TYPE_CUSTOM);
|
||||
if ($method) {
|
||||
$controller = $this->get_controller($method);
|
||||
$controller->extend_settings_navigation($settingsnav, $node);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue