MDL-82525 user: correct course parameter for course profile page.
This commit is contained in:
@@ -1417,11 +1417,11 @@ class core_user {
|
||||
|
||||
// Get courseid from context if provided.
|
||||
if ($context && $coursecontext = $context->get_course_context(false)) {
|
||||
$params['courseid'] = $coursecontext->instanceid;
|
||||
$params['course'] = $coursecontext->instanceid;
|
||||
}
|
||||
|
||||
// If courseid is not set or is set to site id, then return profile page, otherwise return view page.
|
||||
if (!isset($params['courseid']) || $params['courseid'] == SITEID) {
|
||||
if (!isset($params['course']) || $params['course'] == SITEID) {
|
||||
return new moodle_url('/user/profile.php', $params);
|
||||
} else {
|
||||
return new moodle_url('/user/view.php', $params);
|
||||
|
||||
Reference in New Issue
Block a user