Search in sources :

Example 1 with CustomDBMainController

use of org.olat.course.db.CustomDBMainController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doDatabases.

private void doDatabases(UserRequest ureq) {
    if (delayedClose == Delayed.databases || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_DB)) {
            removeCustomCSS();
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            CustomDBMainController ctrl = new CustomDBMainController(ureq, getWindowControl(), course, getUserCourseEnvironment().isCourseReadOnly());
            listenTo(ctrl);
            databasesCtrl = pushController(ureq, translate("command.opendb"), ctrl);
            setActiveTool(dbLink);
            currentToolCtr = databasesCtrl;
        }
    } else {
        delayedClose = Delayed.databases;
    }
}
Also used : CustomDBMainController(org.olat.course.db.CustomDBMainController) ICourse(org.olat.course.ICourse)

Example 2 with CustomDBMainController

use of org.olat.course.db.CustomDBMainController in project openolat by klemens.

the class CourseRuntimeController method doDatabases.

private void doDatabases(UserRequest ureq) {
    if (delayedClose == Delayed.databases || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_DB)) {
            removeCustomCSS();
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            CustomDBMainController ctrl = new CustomDBMainController(ureq, getWindowControl(), course, getUserCourseEnvironment().isCourseReadOnly());
            listenTo(ctrl);
            databasesCtrl = pushController(ureq, translate("command.opendb"), ctrl);
            setActiveTool(dbLink);
            currentToolCtr = databasesCtrl;
        }
    } else {
        delayedClose = Delayed.databases;
    }
}
Also used : CustomDBMainController(org.olat.course.db.CustomDBMainController) ICourse(org.olat.course.ICourse)

Aggregations

ICourse (org.olat.course.ICourse)2 CustomDBMainController (org.olat.course.db.CustomDBMainController)2