From d16d4761d4a7dea3e2932bfcc9c655da2df32315 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Tue, 6 Nov 2012 14:01:14 +1300 Subject: [PATCH] MDL-36379 user_view: fixed issue with page layout when editing was on --- user/view.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/user/view.php b/user/view.php index 68d36ac33cf..83792d40a0b 100644 --- a/user/view.php +++ b/user/view.php @@ -148,9 +148,12 @@ if ($currentuser) { } } +$PAGE->set_title("$course->fullname: $strpersonalprofile: $fullname"); +$PAGE->set_heading($course->fullname); +$PAGE->set_pagelayout('standard'); -/// We've established they can see the user's name at least, so what about the rest? - +// Locate the users settings in the settings navigation and force it open. +// This MUST be done after we've set up the page as it is going to cause theme and output to initialise. if (!$currentuser) { $PAGE->navigation->extend_for_user($user); if ($node = $PAGE->settingsnav->get('userviewingsettings'.$user->id)) { @@ -163,9 +166,6 @@ if ($node = $PAGE->settingsnav->get('courseadmin')) { $node->forceopen = false; } -$PAGE->set_title("$course->fullname: $strpersonalprofile: $fullname"); -$PAGE->set_heading($course->fullname); -$PAGE->set_pagelayout('standard'); echo $OUTPUT->header(); echo '
';