]> git.mjollnir.org Git - moodle.git/commitdiff
user blocks MDL-19077 Set URL for the user/view page so blocks work better
authormoodler <moodler>
Mon, 20 Jul 2009 05:40:32 +0000 (05:40 +0000)
committermoodler <moodler>
Mon, 20 Jul 2009 05:40:32 +0000 (05:40 +0000)
user/view.php

index ec568f4c555abf5b5c50a864f9ee66d1b359a36a..e4eebe41328a77e8c06f3db649dd6514ef0c14d7 100644 (file)
         redirect($CFG->wwwroot .'/'. $CFG->admin .'/index.php');
     }
 
+/// Set up page URL for blocks etc
+    if ($course->id == SITEID) {
+        $PAGE->set_url('user/view.php', array('id' => $user->id));
+    } else {
+        $PAGE->set_url('user/view.php', array('id' => $user->id, 'course' => $course->id));
+    }
+
 /// Make sure the current user is allowed to see this user
 
     if (empty($USER->id)) {