mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
navigation MDL-23323 Site pages content is ALWAYS generated now so that it is available when JS is disabled
This commit is contained in:
parent
0dd819c7e1
commit
14d35a26a5
@ -948,13 +948,17 @@ class global_navigation extends navigation_node {
|
||||
$this->load_all_courses();
|
||||
}
|
||||
|
||||
// We always load the frontpage course to ensure it is available without
|
||||
// JavaScript enabled.
|
||||
$frontpagecourse = $this->load_course($SITE);
|
||||
$this->add_front_page_course_essentials($frontpagecourse, $SITE);
|
||||
|
||||
// Next load context specific content into the navigation
|
||||
switch ($this->page->context->contextlevel) {
|
||||
case CONTEXT_SYSTEM :
|
||||
case CONTEXT_COURSECAT :
|
||||
// Load the front page course navigation
|
||||
$coursenode = $this->load_course($SITE);
|
||||
$this->add_front_page_course_essentials($coursenode, $SITE);
|
||||
// This has already been loaded we just need to map the variable
|
||||
$coursenode = $frontpagecourse;
|
||||
break;
|
||||
case CONTEXT_BLOCK :
|
||||
case CONTEXT_COURSE :
|
||||
|
Loading…
x
Reference in New Issue
Block a user