From ae2fa74f952cf2fdf0e5a67db626585ed6142115 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 6 May 2010 03:39:12 +0000 Subject: [PATCH] blocks MDL-22311 Fixed page layout for course/modedit.php For future note and all those who read CVS commit messages calls to set pagelayout MUST come before any mforms instantiations. --- course/modedit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/course/modedit.php b/course/modedit.php index a05acd95e45..fbf5c217e1c 100644 --- a/course/modedit.php +++ b/course/modedit.php @@ -196,6 +196,7 @@ if (!empty($type)) { //TODO: hopefully will be removed in 2.0 $pagepath .= 'mod'; } $PAGE->set_pagetype($pagepath); +$PAGE->set_pagelayout('admin'); $modmoodleform = "$CFG->dirroot/mod/$module->name/mod_form.php"; if (file_exists($modmoodleform)) { @@ -578,7 +579,6 @@ if ($mform->is_cancelled()) { $PAGE->set_title($streditinga); $PAGE->set_focuscontrol($mform->focus()); $PAGE->set_cacheable(false); - $PAGE->set_pagelayout('admin'); echo $OUTPUT->header(); if (!empty($cm->id)) {