Affects Version/s: 10.0
Fix Version/s: None
The group submission patch in
SAK-22282 has a NPE when an instructor tries to grade a group submission before all groups have submitted.
1) Create a group assignment
2) Assign 2+ groups
3) Submit as a group
4) Attempt to grade that group's submission before submitting for other groups
The line at fault is this:
context.put("nextSubmissionId", ((SubmitterSubmission) userSubmissions.get(i+1)).getSubmission().getReference());
This happened because the group after the group I attempted to grade did not have a submission. It is likely the other line for "prevSubmissionId" can fail if it is the other way around. A null check is likely needed in both IF statements here.