-
Bug
-
Resolution: Fixed
-
Minor
-
2.9.5, 3.0.3
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
Consider the following situation: An assignment activity allows submissions in groups and requires each group member to click the "submit" button. A group contains both students and a teacher. In that case I would expect the group submission to be counted as "submitted" after all students have clicked the "submit" button. However, currently the submission will always show as "Draft" with the teacher still required to submit. (Teachers don't have the necessary capability to submit.)
Steps to reproduce:
- Create an empty course, and enrol two students (S1, S2) and a nonediting teacher (N).
- Create a group and add S1, S2, N to the group.
- In the course, create an assignment with the following settings:
- Require students click submit button: Yes
- Students submit in groups: Yes
- Require all group members submit: Yes
- Log in as S1 and submit the assignment. Repeat with S2.
- Log in as N and open the grading screen for the assignment.
- EXPECTED: The assignment for S1, S2 shows as "Submitted".
- ACTUAL: The assignment for S1, S2 shows as "Draft (not submitted)". When clicking on "grade" for S1, the overview table shows: "Users who need to submit: N".
Remark on the test case: It is quite usual to have nonediting teachers along with students as members of groups, for example if they share a forum in group mode (and don't have the right to access all groups).
Technical remark: The problem seems to be in the method assign::get_submission_group_members(), which does not check whether a member of the group has the capability mod/assign:submit.