X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=lib%2Fnavigationlib.php;h=8bc4a917de10d3dde74eaf5d65b1311ccb795b6e;hp=ee029fe1d3e2e1abfac4ec7a5bdbb770b885548c;hb=42dcfffc4f7b240f377c9a03e10bb9dee0c96682;hpb=c506af7786d1d00eaf5902bce5798e4a0d5fcf1c;ds=sidebyside diff --git a/lib/navigationlib.php b/lib/navigationlib.php index ee029fe1d3e..8bc4a917de1 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -3971,6 +3971,7 @@ class settings_navigation extends navigation_node { } $modulenode = $this->add(get_string('pluginadministration', $this->page->activityname), null, self::TYPE_SETTING, null, 'modulesettings'); + $modulenode->nodetype = navigation_node::NODETYPE_BRANCH; $modulenode->force_open(); // Settings for the module @@ -4026,12 +4027,10 @@ class settings_navigation extends navigation_node { } $function = $this->page->activityname.'_extend_settings_navigation'; - if (!function_exists($function)) { - return $modulenode; + if (function_exists($function)) { + $function($this, $modulenode); } - $function($this, $modulenode); - // Remove the module node if there are no children. if ($modulenode->children->count() <= 0) { $modulenode->remove(); @@ -4572,6 +4571,7 @@ class settings_navigation extends navigation_node { } $categorynode = $this->add($catcontext->get_context_name(), null, null, null, 'categorysettings'); + $categorynode->nodetype = navigation_node::NODETYPE_BRANCH; $categorynode->force_open(); if (can_edit_in_category($catcontext->instanceid)) {