Permalink
Browse files

navigation MDL-23881 Labels are now added to the navigation but the d…

…isplay property is set to false.
  • Loading branch information...
1 parent c47cc9f commit 93ea1294e38371d2a348489189bb13b5bf1277e4 Sam Hemelryk committed Aug 23, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/navigationlib.php
View
@@ -1406,7 +1406,7 @@ protected function load_section_activities(navigation_node $sectionnode, $sectio
foreach ($modinfo->sections[$sectionnumber] as $cmid) {
$cm = $modinfo->cms[$cmid];
- if ($cm->modname == 'label' || (!$viewhiddenactivities && !$cm->visible)) {
+ if (!$viewhiddenactivities && !$cm->visible) {
continue;
}
if ($cm->icon) {
@@ -1418,7 +1418,9 @@ protected function load_section_activities(navigation_node $sectionnode, $sectio
$activitynode = $sectionnode->add($cm->name, $url, navigation_node::TYPE_ACTIVITY, $cm->name, $cm->id, $icon);
$activitynode->title(get_string('modulename', $cm->modname));
$activitynode->hidden = (!$cm->visible);
- if ($this->module_extends_navigation($cm->modname)) {
+ if ($cm->modname == 'label') {
+ $activitynode->display = false;
+ } else if ($this->module_extends_navigation($cm->modname)) {
$activitynode->nodetype = navigation_node::NODETYPE_BRANCH;
}
$activities[$cmid] = $activitynode;

0 comments on commit 93ea129

Please sign in to comment.