Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33978

"Release Grades" gradebook integration only works if user has grade permissions for all sections

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.4, 11.5 [Tentative]
    • Fix Version/s: 12.3, 19.0
    • Component/s: Assignments
    • Labels:
      None
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      1. Create a site with at least two sections and two teaching assistants
      2. Assign the sections to different TAs
      3. Create an assignment connected to gradebook
      4. 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
      5. Grade and release all submission from one section
      6. Be the TA of the other section and try to do the same via the "Release Grades Link"
      Show
      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"

      Description

      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

      org.sakaiproject.assignment.tool.AssignmentAction.doRelease_grades(RunData)

      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

      https://jira.sakaiproject.org/browse/SAK-31915

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ern Earle R Nietzel
                  Reporter:
                  hendrik Hendrik Steller
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code