Search in sources :

Example 1 with PortfolioCourseNodeRunController

use of org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController in project OpenOLAT by OpenOLAT.

the class PortfolioCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    // OO-136 : do not allow guests to access portfolio task
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(PortfolioCourseNode.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 PortfolioCourseNodeRunController(ureq, wControl, userCourseEnv, this);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_ep_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : PortfolioCourseNodeRunController(org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) NodeEditController(org.olat.course.editor.NodeEditController) PortfolioCourseNodeRunController(org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController) PortfolioCourseNodeEditController(org.olat.course.nodes.portfolio.PortfolioCourseNodeEditController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) PortfolioAssessmentDetailsController(org.olat.modules.portfolio.ui.PortfolioAssessmentDetailsController) IdentityListCourseNodeController(org.olat.course.assessment.ui.tool.IdentityListCourseNodeController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller) PortfolioResultDetailsController(org.olat.course.nodes.portfolio.PortfolioResultDetailsController) NodeRunConstructionResult(org.olat.course.run.navigation.NodeRunConstructionResult)

Example 2 with PortfolioCourseNodeRunController

use of org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController in project openolat by klemens.

the class PortfolioCourseNode method createNodeRunConstructionResult.

@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    // OO-136 : do not allow guests to access portfolio task
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
        Translator trans = Util.createPackageTranslator(PortfolioCourseNode.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 PortfolioCourseNodeRunController(ureq, wControl, userCourseEnv, this);
    }
    Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_ep_icon");
    return new NodeRunConstructionResult(ctrl);
}
Also used : PortfolioCourseNodeRunController(org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController) Translator(org.olat.core.gui.translator.Translator) Roles(org.olat.core.id.Roles) NodeEditController(org.olat.course.editor.NodeEditController) PortfolioCourseNodeRunController(org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController) PortfolioCourseNodeEditController(org.olat.course.nodes.portfolio.PortfolioCourseNodeEditController) TabbableController(org.olat.core.gui.control.generic.tabbable.TabbableController) PortfolioAssessmentDetailsController(org.olat.modules.portfolio.ui.PortfolioAssessmentDetailsController) IdentityListCourseNodeController(org.olat.course.assessment.ui.tool.IdentityListCourseNodeController) AssessmentCourseNodeController(org.olat.course.assessment.ui.tool.AssessmentCourseNodeController) Controller(org.olat.core.gui.control.Controller) PortfolioResultDetailsController(org.olat.course.nodes.portfolio.PortfolioResultDetailsController) 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 Roles (org.olat.core.id.Roles)2 AssessmentCourseNodeController (org.olat.course.assessment.ui.tool.AssessmentCourseNodeController)2 IdentityListCourseNodeController (org.olat.course.assessment.ui.tool.IdentityListCourseNodeController)2 NodeEditController (org.olat.course.editor.NodeEditController)2 PortfolioCourseNodeEditController (org.olat.course.nodes.portfolio.PortfolioCourseNodeEditController)2 PortfolioCourseNodeRunController (org.olat.course.nodes.portfolio.PortfolioCourseNodeRunController)2 PortfolioResultDetailsController (org.olat.course.nodes.portfolio.PortfolioResultDetailsController)2 NodeRunConstructionResult (org.olat.course.run.navigation.NodeRunConstructionResult)2 PortfolioAssessmentDetailsController (org.olat.modules.portfolio.ui.PortfolioAssessmentDetailsController)2