Merge branch 'MDL-69868-master' of git://github.com/ilya-catalyst/moodle

This commit is contained in:
Andrew Nicols 2020-12-03 07:47:12 +08:00
commit 1cdae7a717

View File

@ -387,7 +387,7 @@ class manager {
if ($this->can_view_all_attempts()) {
$user = core_user::get_user($userid);
} else if ($this->can_view_own_attempts()) {
$user = $USER;
$user = core_user::get_user($USER->id);
if ($userid && $user->id != $userid) {
return null;
}