mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
Merge branch 'MDL-82169' of https://github.com/paulholden/moodle
This commit is contained in:
commit
cafc34d8b4
@ -1415,17 +1415,9 @@ class core_user {
|
||||
// Params to be passed to the user view page.
|
||||
$params = ['id' => $user->id];
|
||||
|
||||
// Get courseid if provided.
|
||||
if (isset($options['courseid'])) {
|
||||
$params['courseid'] = $options['courseid'];
|
||||
}
|
||||
|
||||
// Get courseid from context if provided.
|
||||
if ($context) {
|
||||
$coursecontext = $context->get_course_context(false);
|
||||
if ($coursecontext) {
|
||||
$params['courseid'] = $coursecontext->instanceid;
|
||||
}
|
||||
if ($context && $coursecontext = $context->get_course_context(false)) {
|
||||
$params['courseid'] = $coursecontext->instanceid;
|
||||
}
|
||||
|
||||
// If courseid is not set or is set to site id, then return profile page, otherwise return view page.
|
||||
|
Loading…
x
Reference in New Issue
Block a user