use of org.olat.ims.qti21.ui.CandidateSessionContext in project openolat by klemens.
the class AssessmentTreeComponentRenderer method render.
@Override
public void render(Renderer renderer, StringOutput sb, Component source, URLBuilder ubu, Translator translator, RenderResult renderResult, String[] args) {
AssessmentTreeComponent component = (AssessmentTreeComponent) source;
TestSessionController testSessionController = component.getTestSessionController();
if (!testSessionController.getTestSessionState().isEnded()) {
CandidateSessionContext candidateSessionContext = component.getCandidateSessionContext();
final AssessmentTestSession candidateSession = candidateSessionContext.getCandidateSession();
if (!candidateSession.isExploded() && !candidateSessionContext.isTerminated()) {
CandidateEvent candidateEvent = candidateSessionContext.getLastEvent();
CandidateTestEventType testEventType = candidateEvent.getTestEventType();
RenderingRequest options;
if (testEventType == CandidateTestEventType.REVIEW_ITEM) {
options = RenderingRequest.getItemReview();
} else if (testEventType == CandidateTestEventType.SOLUTION_ITEM) {
options = RenderingRequest.getItemSolution();
} else {
options = RenderingRequest.getItem(testSessionController);
}
AssessmentRenderer renderHints = new AssessmentRenderer(renderer);
renderTestEvent(testSessionController, renderHints, sb, component, ubu, translator, options);
}
}
}
Aggregations