Search in sources :

Example 1 with LectureRepositoryAdminController

use of org.olat.modules.lecture.ui.LectureRepositoryAdminController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doLecturesAdmin.

private LectureRepositoryAdminController doLecturesAdmin(UserRequest ureq) {
    if (delayedClose == Delayed.lecturesAdmin || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
            removeCustomCSS();
            OLATResourceable ores = OresHelper.createOLATResourceableType("LecturesAdmin");
            WindowControl swControl = addToHistory(ureq, ores, null);
            LectureRepositoryAdminController ctrl = new LectureRepositoryAdminController(ureq, swControl, toolbarPanel, getRepositoryEntry());
            listenTo(ctrl);
            lecturesAdminCtrl = pushController(ureq, translate("command.options.lectures.admin"), ctrl);
            setActiveTool(lecturesAdminLink);
            currentToolCtr = lecturesAdminCtrl;
            return lecturesAdminCtrl;
        } else {
            return null;
        }
    } else {
        delayedClose = Delayed.lecturesAdmin;
        return null;
    }
}
Also used : LectureRepositoryAdminController(org.olat.modules.lecture.ui.LectureRepositoryAdminController) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 2 with LectureRepositoryAdminController

use of org.olat.modules.lecture.ui.LectureRepositoryAdminController in project openolat by klemens.

the class CourseRuntimeController method doLecturesAdmin.

private LectureRepositoryAdminController doLecturesAdmin(UserRequest ureq) {
    if (delayedClose == Delayed.lecturesAdmin || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
            removeCustomCSS();
            OLATResourceable ores = OresHelper.createOLATResourceableType("LecturesAdmin");
            WindowControl swControl = addToHistory(ureq, ores, null);
            LectureRepositoryAdminController ctrl = new LectureRepositoryAdminController(ureq, swControl, toolbarPanel, getRepositoryEntry());
            listenTo(ctrl);
            lecturesAdminCtrl = pushController(ureq, translate("command.options.lectures.admin"), ctrl);
            setActiveTool(lecturesAdminLink);
            currentToolCtr = lecturesAdminCtrl;
            return lecturesAdminCtrl;
        } else {
            return null;
        }
    } else {
        delayedClose = Delayed.lecturesAdmin;
        return null;
    }
}
Also used : LectureRepositoryAdminController(org.olat.modules.lecture.ui.LectureRepositoryAdminController) OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)2 OLATResourceable (org.olat.core.id.OLATResourceable)2 LectureRepositoryAdminController (org.olat.modules.lecture.ui.LectureRepositoryAdminController)2