Search in sources :

Example 1 with DENRunController

use of de.bps.course.nodes.den.DENRunController in project openolat by klemens.

the class DENCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    // Do not allow guests to enroll to dates
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(CourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        controller = new DENRunController(ureq, wControl, getModuleConfiguration(), userCourseEnv, this);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_en_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : Translator(org.olat.core.gui.translator.Translator) DENRunController(de.bps.course.nodes.den.DENRunController) Roles(org.olat.core.id.Roles) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) DENEditController(de.bps.course.nodes.den.DENEditController) DENRunController(de.bps.course.nodes.den.DENRunController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 2 with DENRunController

use of de.bps.course.nodes.den.DENRunController in project OpenOLAT by OpenOLAT.

the class DENCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    // Do not allow guests to enroll to dates
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(CourseNode.class, ureq.getLocale());
        String title = trans.translate("guestnoaccess.title");
        String message = trans.translate("guestnoaccess.message");
        controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
        controller = new DENRunController(ureq, wControl, getModuleConfiguration(), userCourseEnv, this);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_en_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : Translator(org.olat.core.gui.translator.Translator) DENRunController(de.bps.course.nodes.den.DENRunController) Roles(org.olat.core.id.Roles) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) DENEditController(de.bps.course.nodes.den.DENEditController) DENRunController(de.bps.course.nodes.den.DENRunController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) ConditionEditController(org.olat.course.condition.ConditionEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Aggregations

DENEditController (de.bps.course.nodes.den.DENEditController)2 DENRunController (de.bps.course.nodes.den.DENRunController)2 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 Roles (org.olat.core.id.Roles)2 ConditionEditController (org.olat.course.condition.ConditionEditController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2