use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.
the class MSCourseNode 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, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
Controller controller;
// Do not allow guests to have manual scoring
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(MSCourseNode.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 MSCourseNodeRunController(ureq, wControl, userCourseEnv, this, true, true);
}
Controller wrappedCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_ms_icon");
return new NodeRunConstructionResult(wrappedCtrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.
the class ProjectBrokerCourseNode 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, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller controller;
// Do not allow guests to access tasks
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
String title = trans.translate(NLS_GUESTNOACCESS_TITLE);
String message = trans.translate(NLS_GUESTNOACCESS_MESSAGE);
controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
// Add message id to business path if nodemcd is available
if (nodecmd != null) {
try {
Long projectId = Long.valueOf(nodecmd);
BusinessControlFactory bcf = BusinessControlFactory.getInstance();
BusinessControl businessControl = bcf.createFromString("[Project:" + projectId + "]");
wControl = bcf.createBusinessWindowControl(businessControl, wControl);
} catch (NumberFormatException e) {
// ups, nodecmd is not a message, what the heck is it then?
log.warn("Could not create message ID from given nodemcd::" + nodecmd, e);
}
}
controller = ProjectBrokerControllerFactory.createRunController(ureq, wControl, userCourseEnv, this);
}
Controller wrapperCtrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_projectbroker_icon");
return new NodeRunConstructionResult(wrapperCtrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.
the class ScormCourseNode method createPreviewController.
/**
* @see org.olat.course.nodes.GenericCourseNode#createPreviewController(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 Controller createPreviewController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne) {
updateModuleConfigDefaults(false);
ScormRunController cprunC = new ScormRunController(getModuleConfiguration(), ureq, userCourseEnv, wControl, this, true);
return new NodeRunConstructionResult(cprunC).getRunController();
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.
the class ScormCourseNode 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, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
ScormRunController cprunC = new ScormRunController(getModuleConfiguration(), ureq, userCourseEnv, wControl, this, false);
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, cprunC, this, "o_scorm_icon");
// no inline-in-olat-menu integration possible: no display configuration option
return new NodeRunConstructionResult(ctrl);
}
use of org.olat.course.run.navigation.NodeRunConstructionResult in project OpenOLAT by OpenOLAT.
the class VideoCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
NodeRunConstructionResult ncr;
updateModuleConfigDefaults(false);
VideoRunController cprunC = new VideoRunController(getModuleConfiguration(), wControl, ureq, userCourseEnv, this);
ncr = cprunC.createNodeRunConstructionResult(ureq);
return ncr;
}
Aggregations