Affects Version/s: 11.4, 11.5 [Tentative]
Create a site with at least two sections and two teaching assistants Assign the sections to different TAs Create an assignment connected to gradebook Add enough students and submissions to each section so that a random iteration over all submissions is unlikely to walk first over one section's submissions and the the other Grade and release all submission from one section Be the TA of the other section and try to do the same via the "Release Grades Link"
- Create a site with at least two sections and two teaching assistants
- Assign the sections to different TAs
- Create an assignment connected to gradebook
- Add enough students and submissions to each section so that a random iteration over all submissions is unlikely to walk first over one section's submissions and the the other
- Grade and release all submission from one section
- Be the TA of the other section and try to do the same via the "Release Grades Link"
If there are sections which have different Teaching Assistants assigned and if those TAs only have grading permissions for their own section(s), then the bulk option to "release grades" must fail for all TAs as soon as a grade has been released which that TA doesn't have grading permissions for.
The reason is that
first updates the state (graded, released,..) for all AssignmentSubmissions in a submissioon collection which is filtered based on the current user's session state; that is, for a TA, it might do so for all the submissions by people in that TA's section.
It then tries (and fails) to submit the grades to the gradebook by calling:
org.sakaiproject.assignment.tool.AssignmentAction.integrateGradebook(SessionState, String, String, String, String, String, int, Time, String, String, long)
This method will iterate over ALL submissions (instead of the filtered list), collect ALL released grades in that site and then loop over those grades and try to submit the grades to the gradebook one-by-one without checking the users permissions or dealing with exceptions.
=> As soon as that loop hits a grade for an item which the TA isn't allowed to grade, the gradebook service throws a SecurityException and the loop and call to integrateGradebook are being terminated without adding the remaining, not-yet-looped-over grades to the gradebook.
Which leaves the TA with a list of assignment submissions which are marked as "returned" and "released", but without grades in either assignment (they'll have vanished) or gradebook (because those after the exception never got submitted).
NOTE: I haven't tested it with the GradebookAction in the master branch; while the code looks somewhat nicer, it looks like the basic mechanism hasn't changed and thus the problem is likely present in 12.x and 19, too
Also, I think there is a small chance that this could be slightly related to