Search in sources :

Example 1 with EdubaseRunController

use of org.olat.course.nodes.edubase.EdubaseRunController in project OpenOLAT by OpenOLAT.

the class EdubaseCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller runCtrl;
    if (userCourseEnv.isCourseReadOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("freezenoaccess.title");
        String message = trans.translate("freezenoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) Translator(org.olat.core.gui.translator.Translator) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) EdubaseEditController(org.olat.course.nodes.edubase.EdubaseEditController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) EdubasePeekViewController(org.olat.course.nodes.edubase.EdubasePeekViewController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 2 with EdubaseRunController

use of org.olat.course.nodes.edubase.EdubaseRunController in project openolat by klemens.

the class EdubaseCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller runCtrl;
    if (userCourseEnv.isCourseReadOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("freezenoaccess.title");
        String message = trans.translate("freezenoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) Translator(org.olat.core.gui.translator.Translator) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) EdubaseRunController(org.olat.course.nodes.edubase.EdubaseRunController) EdubaseEditController(org.olat.course.nodes.edubase.EdubaseEditController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) EdubasePeekViewController(org.olat.course.nodes.edubase.EdubasePeekViewController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

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 ConditionEditController (org.olat.course.condition.ConditionEditController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 EdubaseEditController (org.olat.course.nodes.edubase.EdubaseEditController)2 EdubasePeekViewController (org.olat.course.nodes.edubase.EdubasePeekViewController)2 EdubaseRunController (org.olat.course.nodes.edubase.EdubaseRunController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2