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

Avoid a possible NPE when catching errors during assessment preview

    Details

    • Type: Task
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.6, 19.2
    • Fix Version/s: 20.0
    • Component/s: None
    • Labels:
      None
    • Test Plan:
      Hide

      No easy way to QA this as it depends on the presence of a bug in some other part of the code.

      It was discovered when a question pool included a calculated question that had no formulas or variables, which broke the preview of the assessment drawing questions from that pool.

      Show
      No easy way to QA this as it depends on the presence of a bug in some other part of the code. It was discovered when a question pool included a calculated question that had no formulas or variables, which broke the preview of the assessment drawing questions from that pool.
    • 19 status:
      Please Merge
    • 12 status:
      Please Merge

      Description

      The T&Q DeliveryActionListener has a large try/catch block that catches RuntimeException and then adds an error the error log.

      If an exception is caught for an assessment preview, the real error is masked because the T&Q event logging code attempts to get an assessmentGradingId which is null (and really there's nothing meaningful to log here since it's a preview and the event log doesn't log previews).

      So we should check for that and throw the real exception earlier before attempting to update the event log.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                smarquard Stephen Marquard
                Reporter:
                smarquard Stephen Marquard
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration