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 e0d36e83ee553e6ab547dba8e593129bec7c774a..63adc8209066678084462d16392a6c82f161b408 100644 --- a/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java +++ b/src/main/java/org/olat/ims/qti21/ui/AssessmentTestDisplayController.java @@ -1588,6 +1588,9 @@ public class AssessmentTestDisplayController extends BasicController implements } boolean terminated = isTerminated(); + + /* Enter first assessment item if possible */ + enterFirstAssessmentItemOfAdvancedTestPart(nextTestPart, ureq); /* Record current result state */ computeAndRecordTestAssessmentResult(currentTimestamp, testSessionState, terminated); @@ -1604,6 +1607,22 @@ public class AssessmentTestDisplayController extends BasicController implements } } + private void enterFirstAssessmentItemOfAdvancedTestPart(TestPlanNode nextTestPart, UserRequest ureq) { + try { + if(!isTerminated() && nextTestPart != null) { + TestPart currentTestPart = testSessionController.getCurrentTestPart(); + if(currentTestPart != null && currentTestPart.getNavigationMode() == NavigationMode.NONLINEAR) { + //go to the first assessment item + if(testSessionController.hasFollowingNonLinearItem()) { + testSessionController.selectFollowingItemNonLinear(ureq.getRequestTimestamp()); + } + } + } + } catch (Exception e) { + logError("", e); + } + } + private void processReviewTestPart() { NotificationRecorder notificationRecorder = new NotificationRecorder(NotificationLevel.INFO); TestSessionState testSessionState = testSessionController.getTestSessionState();