Permalink
Browse files

MDL-38525: Assignment upgrade - Error with comments for unenrolled st…

…udents.

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).
  • Loading branch information...
1 parent 1fbe4f4 commit 3133c8e4accf57ba547f6f18ff7375184640fc64 @damyon damyon committed Apr 10, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/assign/locallib.php
View
@@ -2705,6 +2705,9 @@ public function can_view_group_submission($groupid) {
public function can_view_submission($userid) {
global $USER;
+ if (is_siteadmin()) {
+ return true;
+ }
if (!is_enrolled($this->get_course_context(), $userid)) {
return false;
}

0 comments on commit 3133c8e

Please sign in to comment.