use of org.olat.ims.qti21.model.InMemoryOutcomeListener in project openolat by klemens.
the class IQConfigurationController method doPreview.
private void doPreview(UserRequest ureq) {
removeAsListenerAndDispose(previewLayoutCtr);
RepositoryEntry re = getIQReference();
if (re != null) {
Controller previewController;
if (OnyxModule.isOnyxTest(re.getOlatResource())) {
showError("error.onyx");
} else if (ImsQTI21Resource.TYPE_NAME.equals(re.getOlatResource().getResourceableTypeName())) {
// clean up last session
cleanUpQti21PreviewSession();
// need to clean up the assessment test session
QTI21DeliveryOptions deliveryOptions = qti21service.getDeliveryOptions(re);
QTI21OverrideOptions overrideOptions = QTI21OverrideOptions.nothingOverriden();
RepositoryEntry courseEntry = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
previewQTI21Ctrl = new AssessmentTestDisplayController(ureq, getWindowControl(), new InMemoryOutcomeListener(), re, courseEntry, courseNode.getIdent(), deliveryOptions, overrideOptions, true, true, true);
listenTo(previewQTI21Ctrl);
stackPanel.pushController(translate("preview"), previewQTI21Ctrl);
} else {
long courseResId = course.getResourceableId().longValue();
previewController = iqManager.createIQDisplayController(moduleConfiguration, new IQPreviewSecurityCallback(), ureq, getWindowControl(), courseResId, courseNode.getIdent(), null);
previewLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), previewController);
stackPanel.pushController(translate("preview"), previewLayoutCtr);
}
}
}
use of org.olat.ims.qti21.model.InMemoryOutcomeListener in project OpenOLAT by OpenOLAT.
the class IQConfigurationController method doPreview.
private void doPreview(UserRequest ureq) {
removeAsListenerAndDispose(previewLayoutCtr);
RepositoryEntry re = getIQReference();
if (re != null) {
Controller previewController;
if (OnyxModule.isOnyxTest(re.getOlatResource())) {
showError("error.onyx");
} else if (ImsQTI21Resource.TYPE_NAME.equals(re.getOlatResource().getResourceableTypeName())) {
// clean up last session
cleanUpQti21PreviewSession();
// need to clean up the assessment test session
QTI21DeliveryOptions deliveryOptions = qti21service.getDeliveryOptions(re);
QTI21OverrideOptions overrideOptions = QTI21OverrideOptions.nothingOverriden();
RepositoryEntry courseEntry = course.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
previewQTI21Ctrl = new AssessmentTestDisplayController(ureq, getWindowControl(), new InMemoryOutcomeListener(), re, courseEntry, courseNode.getIdent(), deliveryOptions, overrideOptions, true, true, true);
listenTo(previewQTI21Ctrl);
stackPanel.pushController(translate("preview"), previewQTI21Ctrl);
} else {
long courseResId = course.getResourceableId().longValue();
previewController = iqManager.createIQDisplayController(moduleConfiguration, new IQPreviewSecurityCallback(), ureq, getWindowControl(), courseResId, courseNode.getIdent(), null);
previewLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), previewController);
stackPanel.pushController(translate("preview"), previewLayoutCtr);
}
}
}
Aggregations