Lessons 'require' flag for quiz throws NPE in getHighestSubmittedAssessmentGrading

Description

For the 11.x branch, I'm observing another NPE for line 1519 in "getHighestSubmittedAssessmentGrading":

ag.setAssessmentGradingAttachmentList(attachments);

The 'ag' variable is null for the following scenario:

1. On a blank Lessons page, add a published quiz (Add Content -> Link to a test or quiz).
2. Click the "Edit" button that corresponds to the quiz on the Lessons page
3. In the "Edit Item" dialog, check "Require that the student submit this assessment." and click "Update Item".

An NPE should be logged in catalina.out.

Moving ag.setAssessmentGradingAttachmentList(attachments) up into the "if (ag != null)" conditional seems to resolve this problem.

Activity

Neal Caidin February 21, 2017 at 8:14 AM

Reproduced the steps and do not see an NPE in the logs for Sakai 11.3-RC02 on https://qa1-us.nightly.sakaiproject.org/logs/

Mac/Firefox

Alexandre Ballesté Crevillén February 17, 2017 at 3:49 AM

Verified on sakai-trunk https://trunk-oracle.nightly.sakaiproject.org No log shown. It can be merged to 11

Alexandre Ballesté Crevillén February 17, 2017 at 3:41 AM

Ohh, forget my previous comment. It was merged.

Alexandre Ballesté Crevillén February 17, 2017 at 3:40 AM

I couldn't reproduce this for trunk, so this is why the patch is just for 11, right?

Sean Horner February 14, 2017 at 11:58 AM

I've created the following PR for this: https://github.com/sakaiproject/sakai/pull/3920

Fixed

Details

Priority

Affects versions

Fix versions

Assignee

Reporter

Created February 14, 2017 at 11:17 AM
Updated April 17, 2018 at 8:32 AM
Resolved February 15, 2017 at 4:43 PM

Flag notifications