Permalink
Browse files

MDL-36379 user_view: fixed issue with page layout when editing was on

  • Loading branch information...
1 parent f47b2e4 commit d16d4761d4a7dea3e2932bfcc9c655da2df32315 Sam Hemelryk committed Nov 6, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 user/view.php
View
@@ -148,9 +148,12 @@
}
}
+$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 @@
$node->forceopen = false;
}
-$PAGE->set_title("$course->fullname: $strpersonalprofile: $fullname");
-$PAGE->set_heading($course->fullname);
-$PAGE->set_pagelayout('standard');
echo $OUTPUT->header();
echo '<div class="userprofile">';

0 comments on commit d16d476

Please sign in to comment.