use of org.olat.course.nodes.edubase.EdubaseRunController in project OpenOLAT by OpenOLAT.
the class EdubaseCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller runCtrl;
if (userCourseEnv.isCourseReadOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("freezenoaccess.title");
String message = trans.translate("freezenoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
return new NodeRunConstructionResult(ctrl);
}
use of org.olat.course.nodes.edubase.EdubaseRunController in project openolat by klemens.
the class EdubaseCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller runCtrl;
if (userCourseEnv.isCourseReadOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("freezenoaccess.title");
String message = trans.translate("freezenoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else if (userCourseEnv.getIdentityEnvironment().getRoles().isGuestOnly()) {
Translator trans = Util.createPackageTranslator(EdubaseCourseNode.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
runCtrl = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
runCtrl = new EdubaseRunController(ureq, wControl, this.getModuleConfiguration());
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, runCtrl, this, "o_edubase_icon");
return new NodeRunConstructionResult(ctrl);
}
Aggregations