mirror of
https://github.com/moodle/moodle.git
synced 2025-08-11 20:06:46 +02:00
Merge branch 'MDL-82169' of https://github.com/paulholden/moodle
This commit is contained in:
commit
cafc34d8b4
1 changed files with 2 additions and 10 deletions
|
@ -1415,18 +1415,10 @@ 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) {
|
||||
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.
|
||||
if (!isset($params['courseid']) || $params['courseid'] == SITEID) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue