Search in sources :

Example 1 with GTARunController

use of org.olat.course.nodes.gta.ui.GTARunController in project OpenOLAT by OpenOLAT.

the class GTACourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(GTACourseNode.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 GTARunController(ureq, wControl, this, userCourseEnv);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gta_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : GTARunController(org.olat.course.nodes.gta.ui.GTARunController) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) GroupRoles(org.olat.basesecurity.GroupRoles) NodeEditController(org.olat.course.editor.NodeEditController) GTAEditController(org.olat.course.nodes.gta.ui.GTAEditController) GTAAssessmentDetailsController(org.olat.course.nodes.gta.ui.GTAAssessmentDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) GTACoachedGroupListController(org.olat.course.nodes.gta.ui.GTACoachedGroupListController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) GTAIdentityListCourseNodeController(org.olat.course.nodes.gta.ui.GTAIdentityListCourseNodeController) Controller(org.olat.core.gui.control.Controller) GTARunController(org.olat.course.nodes.gta.ui.GTARunController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 2 with GTARunController

use of org.olat.course.nodes.gta.ui.GTARunController in project openolat by klemens.

the class GTACourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(GTACourseNode.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 GTARunController(ureq, wControl, this, userCourseEnv);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gta_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : GTARunController(org.olat.course.nodes.gta.ui.GTARunController) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) GroupRoles(org.olat.basesecurity.GroupRoles) NodeEditController(org.olat.course.editor.NodeEditController) GTAEditController(org.olat.course.nodes.gta.ui.GTAEditController) GTAAssessmentDetailsController(org.olat.course.nodes.gta.ui.GTAAssessmentDetailsController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) GTACoachedGroupListController(org.olat.course.nodes.gta.ui.GTACoachedGroupListController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) GTAIdentityListCourseNodeController(org.olat.course.nodes.gta.ui.GTAIdentityListCourseNodeController) Controller(org.olat.core.gui.control.Controller) GTARunController(org.olat.course.nodes.gta.ui.GTARunController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Aggregations

GroupRoles (org.olat.basesecurity.GroupRoles)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 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 GTAAssessmentDetailsController (org.olat.course.nodes.gta.ui.GTAAssessmentDetailsController)2 GTACoachedGroupListController (org.olat.course.nodes.gta.ui.GTACoachedGroupListController)2 GTAEditController (org.olat.course.nodes.gta.ui.GTAEditController)2 GTAIdentityListCourseNodeController (org.olat.course.nodes.gta.ui.GTAIdentityListCourseNodeController)2 GTARunController (org.olat.course.nodes.gta.ui.GTARunController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2