Search in sources :

Example 1 with InMemoryAssessmentTestSession

use of org.olat.ims.qti21.model.InMemoryAssessmentTestSession 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);
}
Also used : ItemBodyResultFormItem(org.olat.ims.qti21.ui.components.ItemBodyResultFormItem) TerminatedStaticCandidateSessionContext(org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext) InMemoryAssessmentTestSession(org.olat.ims.qti21.model.InMemoryAssessmentTestSession)

Example 2 with InMemoryAssessmentTestSession

use of org.olat.ims.qti21.model.InMemoryAssessmentTestSession 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);
    }
}
Also used : ItemBodyResultFormItem(org.olat.ims.qti21.ui.components.ItemBodyResultFormItem) TerminatedStaticCandidateSessionContext(org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext) FormLayoutContainer(org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer) InMemoryAssessmentTestSession(org.olat.ims.qti21.model.InMemoryAssessmentTestSession)

Example 3 with InMemoryAssessmentTestSession

use of org.olat.ims.qti21.model.InMemoryAssessmentTestSession in project OpenOLAT by OpenOLAT.

the class QTI21ServiceImpl method createInMemoryAssessmentTestSession.

@Override
public AssessmentTestSession createInMemoryAssessmentTestSession(Identity identity) {
    InMemoryAssessmentTestSession candidateSession = new InMemoryAssessmentTestSession();
    candidateSession.setIdentity(identity);
    candidateSession.setStorage(testSessionDao.createSessionStorage(candidateSession));
    return candidateSession;
}
Also used : InMemoryAssessmentTestSession(org.olat.ims.qti21.model.InMemoryAssessmentTestSession)

Example 4 with InMemoryAssessmentTestSession

use of org.olat.ims.qti21.model.InMemoryAssessmentTestSession in project openolat by klemens.

the class QTI21ServiceImpl method createInMemoryAssessmentTestSession.

@Override
public AssessmentTestSession createInMemoryAssessmentTestSession(Identity identity) {
    InMemoryAssessmentTestSession candidateSession = new InMemoryAssessmentTestSession();
    candidateSession.setIdentity(identity);
    candidateSession.setStorage(testSessionDao.createSessionStorage(candidateSession));
    return candidateSession;
}
Also used : InMemoryAssessmentTestSession(org.olat.ims.qti21.model.InMemoryAssessmentTestSession)

Example 5 with InMemoryAssessmentTestSession

use of org.olat.ims.qti21.model.InMemoryAssessmentTestSession 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);
}
Also used : ItemBodyResultFormItem(org.olat.ims.qti21.ui.components.ItemBodyResultFormItem) TerminatedStaticCandidateSessionContext(org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext) InMemoryAssessmentTestSession(org.olat.ims.qti21.model.InMemoryAssessmentTestSession)

Aggregations

InMemoryAssessmentTestSession (org.olat.ims.qti21.model.InMemoryAssessmentTestSession)6 TerminatedStaticCandidateSessionContext (org.olat.ims.qti21.ui.assessment.TerminatedStaticCandidateSessionContext)4 ItemBodyResultFormItem (org.olat.ims.qti21.ui.components.ItemBodyResultFormItem)4 FormLayoutContainer (org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer)2