Resolution: Won't Fix
Affects Version/s: 1.9.1
Fix Version/s: None
Component/s: Assignment (2.2)
When a student is changed to a role unable to submit assignments (or unenrolled from a course) their existing submitted assignments are no longer visible to when browsing for all submitted assignments. If a person is still a participant in a course, even if they do not have permission to submit an assignment, the teacher should still be able to grade the assignment, and the submitter should be able to review the submission, grade and response. In at least mod/assignment/lib.php's display_submission(), display_submissions(), and assignment_count_real_submissions(), the code checks only for assignments for folks with a "mod/assignment:submit" capability. Again, users who formerly had that capability and submitted assignments should also be displayed (e.g., an assignment due the last day of the course could be graded after the course is finished and the users can no longer submit new work).
My current workaround (mod/assignment/lib.php v 1.269):
- 'WHERE u.id IN ('.implode(',', array_keys($users)).') ';
+ 'WHERE (u.id = s.userid OR u.id IN ('.implode(',', array_keys($users)).')) ';
- 'WHERE '.$where.'u.id IN ('.implode(',',$users).') ';
+ 'WHERE '.$where.' (u.id = s.userid OR u.id IN ('.implode(',',$users).') )';
Also, in mod/assignments/lib.php v 22.214.171.124, the similar capability check on line 39 probably only needs to encapsulate the "$this->view_upload_form();" on line 61.