MDL-38525: Assignment upgrade - Error with comments for unenrolled students.
Students with comments on 'upload' assignments cause errors for the upgrade tool if they are no longer enrolled. The solution is to allow siteadmin to see student submissions even if the student is not currently enrolled (you must be siteadmin to run the upgrade tool).
This commit is contained in:
@@ -2061,6 +2061,9 @@ class assign {
|
||||
public function can_view_submission($userid) {
|
||||
global $USER;
|
||||
|
||||
if (is_siteadmin()) {
|
||||
return true;
|
||||
}
|
||||
if (!is_enrolled($this->get_course_context(), $userid)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user