navigation MDL-22425 Fixed current user being added to the users branch in the navigation when on the site page

This commit is contained in:
Sam Hemelryk 2010-05-18 02:03:13 +00:00
parent 0aa366ecdc
commit 25ad1f47d6

View File

@ -965,7 +965,7 @@ class global_navigation extends navigation_node {
// Load for the current user
$this->load_for_user();
if ($this->page->context->contextlevel >= CONTEXT_COURSE) {
if ($this->page->context->contextlevel >= CONTEXT_COURSE && $this->page->context->instanceid != SITEID) {
$this->load_for_user(null, true);
}
// Load each extending user into the navigation.