use of org.olat.modules.gotomeeting.ui.GoToMeetingRunController in project OpenOLAT by OpenOLAT.
the class GoToMeetingCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller controller;
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(GoToMeetingEditController.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
// check if user is moderator of the virtual classroom
boolean admin = roles.isOLATAdmin();
boolean moderator = admin;
RepositoryEntry re = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
if (!admin) {
RepositoryManager rm = RepositoryManager.getInstance();
if (re != null) {
admin = rm.isOwnerOfRepositoryEntry(ureq.getIdentity(), re) || rm.isInstitutionalRessourceManagerFor(ureq.getIdentity(), roles, re);
moderator = admin || rm.isIdentityInTutorSecurityGroup(ureq.getIdentity(), re) || isCoach(re, ureq.getIdentity());
}
}
// create run controller
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
controller = new GoToMeetingRunController(ureq, wControl, courseEntry, getIdent(), null, admin, moderator, userCourseEnv.isCourseReadOnly());
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gotomeeting_icon");
return new NodeRunConstructionResult(ctrl);
}
use of org.olat.modules.gotomeeting.ui.GoToMeetingRunController in project openolat by klemens.
the class GoToMeetingCourseNode method createNodeRunConstructionResult.
@Override
public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
updateModuleConfigDefaults(false);
Controller controller;
Roles roles = ureq.getUserSession().getRoles();
if (roles.isGuestOnly()) {
Translator trans = Util.createPackageTranslator(GoToMeetingEditController.class, ureq.getLocale());
String title = trans.translate("guestnoaccess.title");
String message = trans.translate("guestnoaccess.message");
controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
} else {
// check if user is moderator of the virtual classroom
boolean admin = roles.isOLATAdmin();
boolean moderator = admin;
RepositoryEntry re = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
if (!admin) {
RepositoryManager rm = RepositoryManager.getInstance();
if (re != null) {
admin = rm.isOwnerOfRepositoryEntry(ureq.getIdentity(), re) || rm.isInstitutionalRessourceManagerFor(ureq.getIdentity(), roles, re);
moderator = admin || rm.isIdentityInTutorSecurityGroup(ureq.getIdentity(), re) || isCoach(re, ureq.getIdentity());
}
}
// create run controller
RepositoryEntry courseEntry = userCourseEnv.getCourseEnvironment().getCourseGroupManager().getCourseEntry();
controller = new GoToMeetingRunController(ureq, wControl, courseEntry, getIdent(), null, admin, moderator, userCourseEnv.isCourseReadOnly());
}
Controller ctrl = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_gotomeeting_icon");
return new NodeRunConstructionResult(ctrl);
}
Aggregations