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;
}
}
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;
}
}
Aggregations