Search in sources :

Example 1 with CourseLayoutGeneratorController

use of org.olat.course.config.ui.courselayout.CourseLayoutGeneratorController in project openolat by klemens.

the class CourseRuntimeController method doLayout.

private void doLayout(UserRequest ureq) {
    if (delayedClose == Delayed.layout || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
            removeCustomCSS();
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            boolean managedLayout = RepositoryEntryManagedFlag.isManaged(getRepositoryEntry(), RepositoryEntryManagedFlag.layout);
            CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig().clone();
            CourseLayoutGeneratorController ctrl = new CourseLayoutGeneratorController(ureq, getWindowControl(), getRepositoryEntry(), courseConfig, course.getCourseEnvironment(), !managedLayout);
            listenTo(ctrl);
            courseLayoutCtrl = pushController(ureq, translate("command.layout"), ctrl);
            setActiveTool(layoutLink);
            currentToolCtr = courseLayoutCtrl;
        }
    } else {
        delayedClose = Delayed.layout;
    }
}
Also used : CourseLayoutGeneratorController(org.olat.course.config.ui.courselayout.CourseLayoutGeneratorController) ICourse(org.olat.course.ICourse) CourseConfig(org.olat.course.config.CourseConfig)

Example 2 with CourseLayoutGeneratorController

use of org.olat.course.config.ui.courselayout.CourseLayoutGeneratorController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method doLayout.

private void doLayout(UserRequest ureq) {
    if (delayedClose == Delayed.layout || requestForClose(ureq)) {
        if (reSecurity.isEntryAdmin() || hasCourseRight(CourseRights.RIGHT_COURSEEDITOR)) {
            removeCustomCSS();
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            boolean managedLayout = RepositoryEntryManagedFlag.isManaged(getRepositoryEntry(), RepositoryEntryManagedFlag.layout);
            CourseConfig courseConfig = course.getCourseEnvironment().getCourseConfig().clone();
            CourseLayoutGeneratorController ctrl = new CourseLayoutGeneratorController(ureq, getWindowControl(), getRepositoryEntry(), courseConfig, course.getCourseEnvironment(), !managedLayout);
            listenTo(ctrl);
            courseLayoutCtrl = pushController(ureq, translate("command.layout"), ctrl);
            setActiveTool(layoutLink);
            currentToolCtr = courseLayoutCtrl;
        }
    } else {
        delayedClose = Delayed.layout;
    }
}
Also used : CourseLayoutGeneratorController(org.olat.course.config.ui.courselayout.CourseLayoutGeneratorController) ICourse(org.olat.course.ICourse) CourseConfig(org.olat.course.config.CourseConfig)

Aggregations

ICourse (org.olat.course.ICourse)2 CourseConfig (org.olat.course.config.CourseConfig)2 CourseLayoutGeneratorController (org.olat.course.config.ui.courselayout.CourseLayoutGeneratorController)2