use of org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext in project OpenOLAT by OpenOLAT.
the class QTI21ItemBodyController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
ItemBodyResultFormItem questionItem = new ItemBodyResultFormItem("question", resolvedAssessmentItem);
questionItem.setItemSessionState(itemSessionController.getItemSessionState());
questionItem.setCandidateSessionContext(new TerminatedStaticCandidateSessionContext(new InMemoryAssessmentTestSession()));
questionItem.setResourceLocator(inputResourceLocator);
questionItem.setAssessmentObjectUri(assessmentObjectUri);
questionItem.setMapperUri(mapperUri);
formLayout.add(questionItem);
}
use of org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext in project OpenOLAT by OpenOLAT.
the class UnkownItemEditorController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
setFormWarning("warning.alien.assessment.item");
convertLink = uifactory.addFormLink("convert.alien", formLayout, Link.BUTTON);
convertLink.setEnabled(canConvert());
if (formLayout instanceof FormLayoutContainer) {
FormLayoutContainer layoutCont = (FormLayoutContainer) formLayout;
String title = StringHelper.escapeHtml(item.getTitle());
layoutCont.contextPut("title", title);
String responseId = "responseBody" + CodeHelper.getRAMUniqueID();
ItemBodyResultFormItem formItem = new ItemBodyResultFormItem(responseId, resolvedAssessmentItem);
formLayout.add(responseId, formItem);
layoutCont.contextPut("responseId", responseId);
formItem.setLabel("form.imd.descr", null);
formItem.setItemSessionState(itemSessionController.getItemSessionState());
formItem.setCandidateSessionContext(new TerminatedStaticCandidateSessionContext(new InMemoryAssessmentTestSession()));
formItem.setResourceLocator(inputResourceLocator);
formItem.setAssessmentObjectUri(assessmentObjectUri);
formItem.setMapperUri(mapperUri);
}
}
use of org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext in project OpenOLAT by OpenOLAT.
the class CorrectionIdentityInteractionsController method initFormExtendedTextInteraction.
private ItemBodyResultFormItem initFormExtendedTextInteraction(TestPlanNodeKey testPlanNodeKey, TestSessionState testSessionState, AssessmentTestSession assessmentTestSession, FormItemContainer layoutCont) {
ItemSessionState sessionState = testSessionState.getItemSessionStates().get(testPlanNodeKey);
String responseId = "responseItem_" + id + "_" + count++;
ItemBodyResultFormItem responseFormItem = new ItemBodyResultFormItem(responseId, resolvedAssessmentItem);
responseFormItem.setItemSessionState(sessionState);
responseFormItem.setCandidateSessionContext(new TerminatedStaticCandidateSessionContext(assessmentTestSession));
responseFormItem.setResolvedAssessmentTest(resolvedAssessmentTest);
responseFormItem.setResourceLocator(inputResourceLocator);
responseFormItem.setAssessmentObjectUri(assessmentObjectUri);
responseFormItem.setMapperUri(mapperUri);
layoutCont.add(responseFormItem);
return responseFormItem;
}
use of org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext in project openolat by klemens.
the class CorrectionIdentityInteractionsController method initFormExtendedTextInteraction.
private ItemBodyResultFormItem initFormExtendedTextInteraction(TestPlanNodeKey testPlanNodeKey, TestSessionState testSessionState, AssessmentTestSession assessmentTestSession, FormItemContainer layoutCont) {
ItemSessionState sessionState = testSessionState.getItemSessionStates().get(testPlanNodeKey);
String responseId = "responseItem_" + id + "_" + count++;
ItemBodyResultFormItem responseFormItem = new ItemBodyResultFormItem(responseId, resolvedAssessmentItem);
responseFormItem.setItemSessionState(sessionState);
responseFormItem.setCandidateSessionContext(new TerminatedStaticCandidateSessionContext(assessmentTestSession));
responseFormItem.setResolvedAssessmentTest(resolvedAssessmentTest);
responseFormItem.setResourceLocator(inputResourceLocator);
responseFormItem.setAssessmentObjectUri(assessmentObjectUri);
responseFormItem.setMapperUri(mapperUri);
layoutCont.add(responseFormItem);
return responseFormItem;
}
use of org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext in project openolat by klemens.
the class QTI21ItemBodyController method initForm.
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
ItemBodyResultFormItem questionItem = new ItemBodyResultFormItem("question", resolvedAssessmentItem);
questionItem.setItemSessionState(itemSessionController.getItemSessionState());
questionItem.setCandidateSessionContext(new TerminatedStaticCandidateSessionContext(new InMemoryAssessmentTestSession()));
questionItem.setResourceLocator(inputResourceLocator);
questionItem.setAssessmentObjectUri(assessmentObjectUri);
questionItem.setMapperUri(mapperUri);
formLayout.add(questionItem);
}
Aggregations