Search in sources :

Example 1 with IQPreviewController

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;
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) Translator(org.olat.core.gui.translator.Translator) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) IQIdentityListCourseNodeController(org.olat.course.nodes.iq.IQIdentityListCourseNodeController) IQRunController(org.olat.course.nodes.iq.IQRunController) QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) IQEditController(org.olat.course.nodes.iq.IQEditController) NodeEditController(org.olat.course.editor.NodeEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller)

Example 2 with IQPreviewController

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;
}
Also used : ModuleConfiguration(org.olat.modules.ModuleConfiguration) Translator(org.olat.core.gui.translator.Translator) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) QTI21AssessmentRunController(org.olat.course.nodes.iq.QTI21AssessmentRunController) IQIdentityListCourseNodeController(org.olat.course.nodes.iq.IQIdentityListCourseNodeController) IQRunController(org.olat.course.nodes.iq.IQRunController) QTI21AssessmentDetailsController(org.olat.ims.qti21.ui.QTI21AssessmentDetailsController) IQPreviewController(org.olat.course.nodes.iq.IQPreviewController) IQEditController(org.olat.course.nodes.iq.IQEditController) NodeEditController(org.olat.course.editor.NodeEditController) QTI12ResultDetailsController(org.olat.ims.qti.QTI12ResultDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller)

Aggregations

Controller (org.olat.core.gui.control.Controller)2 TabbableController (org.olat.core.gui.control.generic.tabbable.TabbableController)2 Translator (org.olat.core.gui.translator.Translator)2 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 IQEditController (org.olat.course.nodes.iq.IQEditController)2 IQIdentityListCourseNodeController (org.olat.course.nodes.iq.IQIdentityListCourseNodeController)2 IQPreviewController (org.olat.course.nodes.iq.IQPreviewController)2 IQRunController (org.olat.course.nodes.iq.IQRunController)2 QTI21AssessmentRunController (org.olat.course.nodes.iq.QTI21AssessmentRunController)2 QTI12ResultDetailsController (org.olat.ims.qti.QTI12ResultDetailsController)2 QTI21AssessmentDetailsController (org.olat.ims.qti21.ui.QTI21AssessmentDetailsController)2 ModuleConfiguration (org.olat.modules.ModuleConfiguration)2