diff --git a/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java b/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java index 2b7f8ea4742076914023dff839c2790637ab361c..b7e03b6f67eb95dcfbf2dc1fd927066f21d1aed8 100644 --- a/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java +++ b/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java @@ -862,6 +862,11 @@ public class AssessmentTestDisplayController extends BasicController implements private void handleTemporaryResponse(UserRequest ureq, Map<Identifier, ResponseInput> stringResponseMap) { NotificationRecorder notificationRecorder = new NotificationRecorder(NotificationLevel.INFO); TestSessionState testSessionState = testSessionController.getTestSessionState(); + TestPlanNodeKey currentItemKey = testSessionState.getCurrentItemKey(); + if(currentItemKey == null) { + return;// + } + final Date timestamp = ureq.getRequestTimestamp(); final Map<Identifier, ResponseData> responseDataMap = new HashMap<>(); @@ -875,9 +880,7 @@ public class AssessmentTestDisplayController extends BasicController implements } } - TestPlanNodeKey currentItemKey = testSessionState.getCurrentItemKey(); ParentPartItemRefs parentParts = getParentSection(currentItemKey); - String assessmentItemIdentifier = currentItemKey.getIdentifier().toString(); AssessmentItemSession itemSession = qtiService .getOrCreateAssessmentItemSession(candidateSession, parentParts, assessmentItemIdentifier);