From e8a7f5ff3b018f00af7fe844feda857d8704664e Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Tue, 28 Mar 2017 17:10:15 +0200 Subject: [PATCH] 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). --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index a07a735b742..c7bed108852 100644 --- a/index.php +++ b/index.php @@ -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);