mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-35913 site home: Set the page layout before setting blocks
When the default home page is set by user preference the site home blocks are gone. This is caused because the page layout is not correctly set before manipulating the navigation block (the base layout it is used instead).
This commit is contained in:
parent
216ea39be7
commit
e8a7f5ff3b
@ -39,6 +39,7 @@ if (!empty($CFG->defaulthomepage) && ($CFG->defaulthomepage == HOMEPAGE_MY) && o
|
||||
}
|
||||
$PAGE->set_url('/', $urlparams);
|
||||
$PAGE->set_course($SITE);
|
||||
$PAGE->set_pagelayout('frontpage');
|
||||
$PAGE->set_other_editing_capability('moodle/course:update');
|
||||
$PAGE->set_other_editing_capability('moodle/course:manageactivities');
|
||||
$PAGE->set_other_editing_capability('moodle/course:activityvisibility');
|
||||
@ -106,7 +107,6 @@ if (file_exists($CFG->dirroot.'/local/hub/lib.php') and get_config('local_hub',
|
||||
|
||||
$PAGE->set_pagetype('site-index');
|
||||
$PAGE->set_docs_path('');
|
||||
$PAGE->set_pagelayout('frontpage');
|
||||
$editing = $PAGE->user_is_editing();
|
||||
$PAGE->set_title($SITE->fullname);
|
||||
$PAGE->set_heading($SITE->fullname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user