Skip to content
Snippets Groups Projects
Commit 570970ee authored by srosse's avatar srosse
Browse files

OO-3422: submit the test if the session is ended in case of finish linear event

parent 23452356
No related branches found
No related tags found
No related merge requests found
......@@ -955,27 +955,21 @@ public class AssessmentTestDisplayController extends BasicController implements
logError("CANNOT_FINISH_LINEAR_TEST_ITEM", null);
return;
}
} catch (QtiCandidateStateException e) {
candidateAuditLogger.logAndThrowCandidateException(candidateSession, CandidateExceptionReason.CANNOT_FINISH_LINEAR_TEST_ITEM, e);
logError("CANNOT_FINISH_LINEAR_TEST_ITEM", e);
return;
} catch (RuntimeException e) {
candidateAuditLogger.logAndThrowCandidateException(candidateSession, CandidateExceptionReason.CANNOT_FINISH_LINEAR_TEST_ITEM, e);
logError("CANNOT_FINISH_LINEAR_TEST_ITEM", e);
return;// handleExplosion(e, candidateSession);
return;
}
// Update state
final Date requestTimestamp = ureq.getRequestTimestamp();
final TestPlanNode nextItemNode = testSessionController.advanceItemLinear(requestTimestamp);
//boolean terminated = nextItemNode == null && testSessionController.findNextEnterableTestPart() == null;
boolean terminated = nextItemNode == null && testSessionController.findNextEnterableTestPart() == null;
// Record current result state
final AssessmentResult assessmentResult = computeAndRecordTestAssessmentResult(requestTimestamp, testSessionState, false);
final AssessmentResult assessmentResult = computeAndRecordTestAssessmentResult(requestTimestamp, testSessionState, terminated);
/* If we ended the testPart and there are now no more available testParts, then finish the session now */
if (nextItemNode==null && testSessionController.findNextEnterableTestPart()==null) {
if (terminated) {
candidateSession = qtiService.finishTestSession(candidateSession, testSessionState, assessmentResult,
requestTimestamp, getDigitalSignatureOptions(), getIdentity());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment