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

Group Submission NPE when attempting to grade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Incorporated
    • Affects Version/s: 10.0
    • Fix Version/s: None
    • Component/s: Assignments
    • Labels:
      None

      Description

      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

      java.lang.NullPointerException
      at org.sakaiproject.assignment.tool.AssignmentAction.build_instructor_grade_submission_context(AssignmentAction.java:2734)

      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.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  relong Bob Long
                  Reporter:
                  ufchrisg Christopher Gross
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration