Search in sources :

Example 1 with SyncAssessmentItem

use of org.olat.ims.qti21.ui.editor.SyncAssessmentItem in project OpenOLAT by OpenOLAT.

the class AssessmentItemEditorController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (tabbedPane == source) {
        Controller selectedCtrl = tabbedPane.getSelectedController();
        if (selectedCtrl instanceof SyncAssessmentItem) {
            ((SyncAssessmentItem) selectedCtrl).sync(ureq, itemBuilder);
        } else if (selectedCtrl == displayCtrl) {
            if (testEntry != null) {
                AssessmentEntry assessmentEntry = assessmentService.getOrCreateAssessmentEntry(getIdentity(), null, testEntry, null, testEntry);
                displayCtrl = new AssessmentItemPreviewController(ureq, getWindowControl(), resolvedAssessmentItem, itemRef, testEntry, assessmentEntry, rootDirectory, itemFile);
            } else {
                displayCtrl = new AssessmentItemPreviewController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
            }
            listenTo(displayCtrl);
            tabbedPane.replaceTab(displayTabPosition, displayCtrl);
        } else if (selectedCtrl == solutionCtrl) {
            solutionCtrl = new AssessmentItemPreviewSolutionController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
            listenTo(displayCtrl);
            tabbedPane.replaceTab(solutionTabPosition, solutionCtrl);
        }
    }
}
Also used : ChoiceScoreController(org.olat.ims.qti21.ui.editor.interactions.ChoiceScoreController) FIBEditorController(org.olat.ims.qti21.ui.editor.interactions.FIBEditorController) HottextEditorController(org.olat.ims.qti21.ui.editor.interactions.HottextEditorController) MatchEditorController(org.olat.ims.qti21.ui.editor.interactions.MatchEditorController) HotspotChoiceScoreController(org.olat.ims.qti21.ui.editor.interactions.HotspotChoiceScoreController) MatchScoreController(org.olat.ims.qti21.ui.editor.interactions.MatchScoreController) UploadEditorController(org.olat.ims.qti21.ui.editor.interactions.UploadEditorController) BasicController(org.olat.core.gui.control.controller.BasicController) KPrimEditorController(org.olat.ims.qti21.ui.editor.interactions.KPrimEditorController) AssessmentItemDisplayController(org.olat.ims.qti21.ui.AssessmentItemDisplayController) MultipleChoiceEditorController(org.olat.ims.qti21.ui.editor.interactions.MultipleChoiceEditorController) HotspotEditorController(org.olat.ims.qti21.ui.editor.interactions.HotspotEditorController) FIBScoreController(org.olat.ims.qti21.ui.editor.interactions.FIBScoreController) EssayEditorController(org.olat.ims.qti21.ui.editor.interactions.EssayEditorController) TrueFalseEditorController(org.olat.ims.qti21.ui.editor.interactions.TrueFalseEditorController) SingleChoiceEditorController(org.olat.ims.qti21.ui.editor.interactions.SingleChoiceEditorController) Controller(org.olat.core.gui.control.Controller) DrawingEditorController(org.olat.ims.qti21.ui.editor.interactions.DrawingEditorController) AssessmentEntry(org.olat.modules.assessment.AssessmentEntry)

Example 2 with SyncAssessmentItem

use of org.olat.ims.qti21.ui.editor.SyncAssessmentItem in project openolat by klemens.

the class AssessmentItemEditorController method event.

@Override
protected void event(UserRequest ureq, Component source, Event event) {
    if (tabbedPane == source) {
        Controller selectedCtrl = tabbedPane.getSelectedController();
        if (selectedCtrl instanceof SyncAssessmentItem) {
            ((SyncAssessmentItem) selectedCtrl).sync(ureq, itemBuilder);
        } else if (selectedCtrl == displayCtrl) {
            if (testEntry != null) {
                AssessmentEntry assessmentEntry = assessmentService.getOrCreateAssessmentEntry(getIdentity(), null, testEntry, null, testEntry);
                displayCtrl = new AssessmentItemPreviewController(ureq, getWindowControl(), resolvedAssessmentItem, itemRef, testEntry, assessmentEntry, rootDirectory, itemFile);
            } else {
                displayCtrl = new AssessmentItemPreviewController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
            }
            listenTo(displayCtrl);
            tabbedPane.replaceTab(displayTabPosition, displayCtrl);
        } else if (selectedCtrl == solutionCtrl) {
            solutionCtrl = new AssessmentItemPreviewSolutionController(ureq, getWindowControl(), resolvedAssessmentItem, rootDirectory, itemFile);
            listenTo(displayCtrl);
            tabbedPane.replaceTab(solutionTabPosition, solutionCtrl);
        }
    }
}
Also used : ChoiceScoreController(org.olat.ims.qti21.ui.editor.interactions.ChoiceScoreController) FIBEditorController(org.olat.ims.qti21.ui.editor.interactions.FIBEditorController) HottextEditorController(org.olat.ims.qti21.ui.editor.interactions.HottextEditorController) MatchEditorController(org.olat.ims.qti21.ui.editor.interactions.MatchEditorController) HotspotChoiceScoreController(org.olat.ims.qti21.ui.editor.interactions.HotspotChoiceScoreController) MatchScoreController(org.olat.ims.qti21.ui.editor.interactions.MatchScoreController) UploadEditorController(org.olat.ims.qti21.ui.editor.interactions.UploadEditorController) BasicController(org.olat.core.gui.control.controller.BasicController) KPrimEditorController(org.olat.ims.qti21.ui.editor.interactions.KPrimEditorController) AssessmentItemDisplayController(org.olat.ims.qti21.ui.AssessmentItemDisplayController) MultipleChoiceEditorController(org.olat.ims.qti21.ui.editor.interactions.MultipleChoiceEditorController) HotspotEditorController(org.olat.ims.qti21.ui.editor.interactions.HotspotEditorController) FIBScoreController(org.olat.ims.qti21.ui.editor.interactions.FIBScoreController) EssayEditorController(org.olat.ims.qti21.ui.editor.interactions.EssayEditorController) TrueFalseEditorController(org.olat.ims.qti21.ui.editor.interactions.TrueFalseEditorController) SingleChoiceEditorController(org.olat.ims.qti21.ui.editor.interactions.SingleChoiceEditorController) Controller(org.olat.core.gui.control.Controller) DrawingEditorController(org.olat.ims.qti21.ui.editor.interactions.DrawingEditorController) AssessmentEntry(org.olat.modules.assessment.AssessmentEntry)

Aggregations

Controller (org.olat.core.gui.control.Controller)2 BasicController (org.olat.core.gui.control.controller.BasicController)2 AssessmentItemDisplayController (org.olat.ims.qti21.ui.AssessmentItemDisplayController)2 ChoiceScoreController (org.olat.ims.qti21.ui.editor.interactions.ChoiceScoreController)2 DrawingEditorController (org.olat.ims.qti21.ui.editor.interactions.DrawingEditorController)2 EssayEditorController (org.olat.ims.qti21.ui.editor.interactions.EssayEditorController)2 FIBEditorController (org.olat.ims.qti21.ui.editor.interactions.FIBEditorController)2 FIBScoreController (org.olat.ims.qti21.ui.editor.interactions.FIBScoreController)2 HotspotChoiceScoreController (org.olat.ims.qti21.ui.editor.interactions.HotspotChoiceScoreController)2 HotspotEditorController (org.olat.ims.qti21.ui.editor.interactions.HotspotEditorController)2 HottextEditorController (org.olat.ims.qti21.ui.editor.interactions.HottextEditorController)2 KPrimEditorController (org.olat.ims.qti21.ui.editor.interactions.KPrimEditorController)2 MatchEditorController (org.olat.ims.qti21.ui.editor.interactions.MatchEditorController)2 MatchScoreController (org.olat.ims.qti21.ui.editor.interactions.MatchScoreController)2 MultipleChoiceEditorController (org.olat.ims.qti21.ui.editor.interactions.MultipleChoiceEditorController)2 SingleChoiceEditorController (org.olat.ims.qti21.ui.editor.interactions.SingleChoiceEditorController)2 TrueFalseEditorController (org.olat.ims.qti21.ui.editor.interactions.TrueFalseEditorController)2 UploadEditorController (org.olat.ims.qti21.ui.editor.interactions.UploadEditorController)2 AssessmentEntry (org.olat.modules.assessment.AssessmentEntry)2