From 29b9b464d8b495e163a8379cab491346cf22487d Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Fri, 20 Jan 2012 16:01:03 +0000 Subject: [PATCH] MDL-31316 Fix block controls when default home is My Moodle --- index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 232abdcd01d..99bae5f6d3c 100644 --- a/index.php +++ b/index.php @@ -42,7 +42,11 @@ $hassiteconfig = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); - $PAGE->set_url('/'); + $urlparams = array(); + if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) { + $urlparams['redirect'] = 0; + } + $PAGE->set_url('/', $urlparams); $PAGE->set_course($SITE); /// If the site is currently under maintenance, then print a message