use of org.olat.course.run.navigation.NodeRunConstructionResult 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);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project openolat by klemens.
the class WikiRunController method createNodeRunConstructionResult.
public NodeRunConstructionResult createNodeRunConstructionResult() {
TreeModel wikiTreeModel = wikiCtr.getAndUseExternalTree();
String selNodeId = wikiTreeModel.getRootNode().getChildAt(0).getIdent();
return new NodeRunConstructionResult(this, wikiTreeModel, selNodeId, wikiCtr);
}
Aggregations