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:
Juan Leyva
2017-03-28 17:11:19 +02:00
parent 6e0c45eab6
commit 48d02c4437
+1 -1
View File
@@ -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');
@@ -104,7 +105,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);