Search in sources :

Example 1 with CourseCalendarController

use of org.olat.course.run.calendar.CourseCalendarController in project OpenOLAT by OpenOLAT.

the class CourseRuntimeController method launchCalendar.

private void launchCalendar(UserRequest ureq) {
    ControllerCreator ctrlCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(getRepositoryEntry());
            WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
            CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, getUserCourseEnvironment());
            // use a one-column main layout
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, calendarController);
            layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), course.getCourseEnvironment()));
            // dispose calendar on layout dispose
            layoutCtr.addDisposableChildController(calendarController);
            return layoutCtr;
        }
    };
    // wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
    // open in new browser window
    PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    pbw.open(ureq);
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ICourse(org.olat.course.ICourse) WindowControl(org.olat.core.gui.control.WindowControl) CourseCalendarController(org.olat.course.run.calendar.CourseCalendarController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 2 with CourseCalendarController

use of org.olat.course.run.calendar.CourseCalendarController in project openolat by klemens.

the class CourseRuntimeController method launchCalendar.

private void launchCalendar(UserRequest ureq) {
    ControllerCreator ctrlCreator = new ControllerCreator() {

        @Override
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
            ICourse course = CourseFactory.loadCourse(getRepositoryEntry());
            ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(getRepositoryEntry());
            WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
            CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, getUserCourseEnvironment());
            // use a one-column main layout
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, calendarController);
            layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), course.getCourseEnvironment()));
            // dispose calendar on layout dispose
            layoutCtr.addDisposableChildController(calendarController);
            return layoutCtr;
        }
    };
    // wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
    // open in new browser window
    PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    pbw.open(ureq);
}
Also used : PopupBrowserWindow(org.olat.core.gui.control.generic.popup.PopupBrowserWindow) LayoutMain3ColsController(org.olat.core.commons.fullWebApp.LayoutMain3ColsController) ICourse(org.olat.course.ICourse) WindowControl(org.olat.core.gui.control.WindowControl) CourseCalendarController(org.olat.course.run.calendar.CourseCalendarController) ControllerCreator(org.olat.core.gui.control.creator.ControllerCreator) UserRequest(org.olat.core.gui.UserRequest) ContextEntry(org.olat.core.id.context.ContextEntry)

Aggregations

LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 UserRequest (org.olat.core.gui.UserRequest)2 WindowControl (org.olat.core.gui.control.WindowControl)2 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)2 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)2 ContextEntry (org.olat.core.id.context.ContextEntry)2 ICourse (org.olat.course.ICourse)2 CourseCalendarController (org.olat.course.run.calendar.CourseCalendarController)2