From e52a5d3ab2d6dbb9c18047d2f7b1a23a05830fd3 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Tue, 6 Dec 2011 13:32:59 +1300 Subject: [PATCH] MDL-30582 navigation: Fixed regression in generation of front page modules --- lib/navigationlib.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 6d67cced819..8645e271975 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -1240,6 +1240,16 @@ class global_navigation extends navigation_node { $sections = $this->load_course_sections($course, $coursenode); break; } + } else { + // We need to check if the user is viewing a front page module. + // If so then there is potentially more content to load yet for that + // module. + if ($this->page->context->contextlevel == CONTEXT_MODULE) { + $activitynode = $this->rootnodes['site']->get($this->page->cm->id, navigation_node::TYPE_ACTIVITY); + if ($activitynode) { + $this->load_activity($this->page->cm, $this->page->course, $activitynode); + } + } } $limit = 20; -- 2.43.0