use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doEdit.
@Override
protected void doEdit(UserRequest ureq) {
if ((reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR))) {
removeCustomCSS();
popToRoot(ureq);
cleanUp();
CourseNode currentCourseNode = getCurrentCourseNode();
WindowControl bwControl = getSubWindowControl("Editor");
EditorMainController ctrl = CourseFactory.createEditorController(ureq, addToHistory(ureq, bwControl), toolbarPanel, getRepositoryEntry(), currentCourseNode);
// user activity logger which was initialized with course run
if (ctrl != null) {
editorCtrl = pushController(ureq, "Editor", ctrl);
listenTo(editorCtrl);
setIsInEditor(true);
currentToolCtr = editorCtrl;
setActiveTool(editLink);
}
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doCertificatesOptions.
private void doCertificatesOptions(UserRequest ureq) {
if (delayedClose == Delayed.certificates || requestForClose(ureq)) {
if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
removeCustomCSS();
ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig().clone();
WindowControl bwControl = getSubWindowControl("CertificationSettings");
CertificatesOptionsController ctrl = new CertificatesOptionsController(ureq, addToHistory(ureq, bwControl), getRepositoryEntry(), courseConfig, true);
certificatesOptionsCtrl = pushController(ureq, translate("command.options"), ctrl);
setActiveTool(certificatesOptionsLink);
currentToolCtr = certificatesOptionsCtrl;
}
} else {
delayedClose = Delayed.certificates;
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doEfficiencyStatements.
private void doEfficiencyStatements(UserRequest ureq) {
if (delayedClose == Delayed.efficiencyStatements || requestForClose(ureq)) {
// will not be disposed on course run dispose, popus up as new browserwindow
WindowControl bwControl = getSubWindowControl("Certification");
CertificateAndEfficiencyStatementController efficiencyStatementController = new CertificateAndEfficiencyStatementController(addToHistory(ureq, bwControl), ureq, getRepositoryEntry());
listenTo(efficiencyStatementController);
efficiencyStatementController = pushController(ureq, translate("command.efficiencystatement"), efficiencyStatementController);
currentToolCtr = efficiencyStatementController;
setActiveTool(efficiencyStatementsLink);
} else {
delayedClose = Delayed.efficiencyStatements;
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doAssessmentTool.
private Activateable2 doAssessmentTool(UserRequest ureq) {
if (delayedClose == Delayed.assessmentTool || requestForClose(ureq)) {
OLATResourceable ores = OresHelper.createOLATResourceableType("assessmentToolv2");
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
boolean admin = reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_ASSESSMENT);
boolean nonMembers = reSecurity.isEntryAdmin();
boolean repositoryEntryMembers = reSecurity.isCourseCoach();
boolean businessGoupMembers = reSecurity.isGroupCoach();
List<BusinessGroup> coachedGroups = null;
if (businessGoupMembers) {
coachedGroups = getUserCourseEnvironment().getCoachedGroups();
}
AssessmentToolSecurityCallback secCallBack = new AssessmentToolSecurityCallback(admin, nonMembers, repositoryEntryMembers, businessGoupMembers, coachedGroups);
removeCustomCSS();
AssessmentToolController ctrl = new AssessmentToolController(ureq, swControl, toolbarPanel, getRepositoryEntry(), getUserCourseEnvironment(), secCallBack);
ctrl.activate(ureq, null, null);
listenTo(ctrl);
assessmentToolCtr = pushController(ureq, translate("command.openassessment"), ctrl);
assessmentToolCtr.assessmentModeMessage();
currentToolCtr = assessmentToolCtr;
setActiveTool(assessmentLink);
ctrl.initToolbar();
return assessmentToolCtr;
} else {
delayedClose = Delayed.assessmentTool;
}
return null;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doMembers.
@Override
protected Activateable2 doMembers(UserRequest ureq) {
if (delayedClose == Delayed.members || requestForClose(ureq)) {
if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT) || hasCourseRight(CourseRights.RIGHT_MEMBERMANAGEMENT)) {
removeCustomCSS();
if (currentToolCtr instanceof MembersManagementMainController) {
((MembersManagementMainController) currentToolCtr).activate(ureq, null, null);
} else {
WindowControl bwControl = getSubWindowControl("MembersMgmt");
MembersManagementMainController ctrl = new MembersManagementMainController(ureq, addToHistory(ureq, bwControl), toolbarPanel, getRepositoryEntry(), getUserCourseEnvironment(), reSecurity.isEntryAdmin(), hasCourseRight(CourseRights.RIGHT_GROUPMANAGEMENT), hasCourseRight(CourseRights.RIGHT_MEMBERMANAGEMENT));
listenTo(ctrl);
membersCtrl = pushController(ureq, translate("command.opensimplegroupmngt"), ctrl);
setActiveTool(membersLink);
currentToolCtr = membersCtrl;
}
}
} else {
delayedClose = Delayed.members;
}
return membersCtrl;
}
Aggregations