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);
}
}
}
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);
}
}
}
Aggregations