use of org.olat.course.nodes.cl.ui.CheckListRunController in project openolat by klemens.
the class CheckListCourseNode method createNodeRunConstructionResult.
/**
* @see org.olat.course.nodes.CourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, final UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller ctrl;
OLATResourceable ores = OresHelper.createOLATResourceableInstance("CourseModule", userCourseEnv.getCourseEnvironment().getCourseResourceableId());
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(CheckListCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
ctrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else if (userCourseEnv.isCoach() || userCourseEnv.isAdmin()) {
ctrl = new CheckListRunForCoachController(ureq, wControl, userCourseEnv, ores, this);
} else {
ctrl = new CheckListRunController(ureq, wControl, userCourseEnv, ores, this);
}
Controller cont = TitledWrapperHelper.getWrapper(ureq, wControl, ctrl, this, ICON_CSS_CLASS);
return new NodeRunConstructionResult(cont);
}
use of org.olat.course.nodes.cl.ui.CheckListRunController in project OpenOLAT by OpenOLAT.
the class CheckListCourseNode method createNodeRunConstructionResult.
/**
* @see org.olat.course.nodes.CourseNode#createNodeRunConstructionResult(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl,
* org.olat.course.run.userview.UserCourseEnvironment,
* org.olat.course.run.userview.NodeEvaluation)
*/
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, final UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller ctrl;
OLATResourceable ores = OresHelper.createOLATResourceableInstance("CourseModule", userCourseEnv.getCourseEnvironment().getCourseResourceableId());
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(CheckListCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
ctrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else if (userCourseEnv.isCoach() || userCourseEnv.isAdmin()) {
ctrl = new CheckListRunForCoachController(ureq, wControl, userCourseEnv, ores, this);
} else {
ctrl = new CheckListRunController(ureq, wControl, userCourseEnv, ores, this);
}
Controller cont = TitledWrapperHelper.getWrapper(ureq, wControl, ctrl, this, ICON_CSS_CLASS);
return new NodeRunConstructionResult(cont);
}
Aggregations