use of org.olat.course.nodes.iq.IQPreviewController in project OpenOLAT by OpenOLAT.
the class IQTESTCourseNode method createPreviewController.
/**
* @see org.olat.course.nodes.CourseNode#createPreviewController(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public Controller createPreviewController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
Controller controller;
ModuleConfiguration config = getModuleConfiguration();
boolean onyx = IQEditController.CONFIG_VALUE_QTI2.equals(config.get(IQEditController.CONFIG_KEY_TYPE_QTI));
if (onyx) {
Translator trans = Util.createPackageTranslator(IQEditController.class, ureq.getLocale());
controller = MessageUIFactory.createInfoMessage(ureq, wControl, "", trans.translate("error.onyx"));
} else {
controller = new IQPreviewController(ureq, wControl, userCourseEnv, this);
}
return controller;
}
use of org.olat.course.nodes.iq.IQPreviewController in project openolat by klemens.
the class IQTESTCourseNode method createPreviewController.
/**
* @see org.olat.course.nodes.CourseNode#createPreviewController(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public Controller createPreviewController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
Controller controller;
ModuleConfiguration config = getModuleConfiguration();
boolean onyx = IQEditController.CONFIG_VALUE_QTI2.equals(config.get(IQEditController.CONFIG_KEY_TYPE_QTI));
if (onyx) {
Translator trans = Util.createPackageTranslator(IQEditController.class, ureq.getLocale());
controller = MessageUIFactory.createInfoMessage(ureq, wControl, "", trans.translate("error.onyx"));
} else {
controller = new IQPreviewController(ureq, wControl, userCourseEnv, this);
}
return controller;
}
Aggregations