Search in sources :

Example 1 with MembersCourseNodeRunController

use of org.olat.course.nodes.members.MembersCourseNodeRunController in project OpenOLAT by OpenOLAT.

the class MembersCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    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 MembersCourseNodeRunController(ureq, wControl, userCourseEnv, this.getModuleConfiguration());
    }
    Controller titledCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_cmembers_icon");
    return new NodeRunConstructionResult(titledCtrl);
}
Also used : Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) MembersPeekViewController(org.olat.course.nodes.members.MembersPeekViewController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) MembersCourseNodeRunController(org.olat.course.nodes.members.MembersCourseNodeRunController) MembersCourseNodeEditController(org.olat.course.nodes.members.MembersCourseNodeEditController) InfoCourseNodeEditController(org.olat.course.nodes.info.InfoCourseNodeEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult) MembersCourseNodeRunController(org.olat.course.nodes.members.MembersCourseNodeRunController)

Example 2 with MembersCourseNodeRunController

use of org.olat.course.nodes.members.MembersCourseNodeRunController in project openolat by klemens.

the class MembersCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    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 MembersCourseNodeRunController(ureq, wControl, userCourseEnv, this.getModuleConfiguration());
    }
    Controller titledCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_cmembers_icon");
    return new NodeRunConstructionResult(titledCtrl);
}
Also used : Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) MembersPeekViewController(org.olat.course.nodes.members.MembersPeekViewController) Controller(org.olat.core.gui.control.Controller) NodeEditController(org.olat.course.editor.NodeEditController) MembersCourseNodeRunController(org.olat.course.nodes.members.MembersCourseNodeRunController) MembersCourseNodeEditController(org.olat.course.nodes.members.MembersCourseNodeEditController) InfoCourseNodeEditController(org.olat.course.nodes.info.InfoCourseNodeEditController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult) MembersCourseNodeRunController(org.olat.course.nodes.members.MembersCourseNodeRunController)

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 Roles (org.olat.core.id.Roles)2 NodeEditController (org.olat.course.editor.NodeEditController)2 InfoCourseNodeEditController (org.olat.course.nodes.info.InfoCourseNodeEditController)2 MembersCourseNodeEditController (org.olat.course.nodes.members.MembersCourseNodeEditController)2 MembersCourseNodeRunController (org.olat.course.nodes.members.MembersCourseNodeRunController)2 MembersPeekViewController (org.olat.course.nodes.members.MembersPeekViewController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2