Search in sources :

Example 31 with StateSite

use of org.olat.core.id.context.StateSite in project openolat by klemens.

the class AdminSite method createController.

@Override
protected MainLayoutController createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(AdminSite.class, 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
    return new SystemAdminMainController(ureq, bwControl);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) StateSite(org.olat.core.id.context.StateSite) SystemAdminMainController(org.olat.admin.SystemAdminMainController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 32 with StateSite

use of org.olat.core.id.context.StateSite in project openolat by klemens.

the class BaseFullWebappController method back.

protected void back(UserRequest ureq, HistoryPoint cstate) {
    List<ContextEntry> entries = cstate.getEntries();
    if (entries.isEmpty())
        return;
    entries = new ArrayList<ContextEntry>(entries);
    ContextEntry state = entries.remove(0);
    // no red screen for this
    if (state == null)
        return;
    OLATResourceable ores = state.getOLATResourceable();
    if (ores != null && "HomeSite".equals(ores.getResourceableTypeName())) {
        activateSite(userTools, ureq, entries, false);
    } else {
        DTab dt = getDTab(ores);
        if (dt != null) {
            doActivateDTab(dt);
            if (dt.getController() instanceof Activateable2) {
                ((Activateable2) dt.getController()).activate(ureq, entries, null);
            }
            updateBusinessPath(ureq, dt);
        } else {
            StateEntry s = state.getTransientState();
            if (s instanceof StateSite && ((StateSite) s).getSite() != null && sites != null) {
                SiteInstance site = ((StateSite) s).getSite();
                for (SiteInstance savedSite : sites) {
                    if (savedSite != null && site.getClass().equals(savedSite.getClass())) {
                        activateSite(savedSite, ureq, entries, false);
                    }
                }
            }
        }
    }
}
Also used : DTab(org.olat.core.gui.control.generic.dtabs.DTab) StateEntry(org.olat.core.id.context.StateEntry) BornSiteInstance(org.olat.core.gui.control.navigation.BornSiteInstance) SiteInstance(org.olat.core.gui.control.navigation.SiteInstance) Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) OLATResourceable(org.olat.core.id.OLATResourceable) StateSite(org.olat.core.id.context.StateSite) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 33 with StateSite

use of org.olat.core.id.context.StateSite in project openolat by klemens.

the class GroupsSite method createController.

@Override
protected Controller createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(GroupsSite.class, 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
    // MainLayoutController c = new BusinessGroupMainController(ureq, bwControl);
    return new OverviewBusinessGroupListController(ureq, bwControl);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) StateSite(org.olat.core.id.context.StateSite) OverviewBusinessGroupListController(org.olat.group.ui.main.OverviewBusinessGroupListController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 34 with StateSite

use of org.olat.core.id.context.StateSite in project openolat by klemens.

the class CoachSite method createController.

@Override
protected MainLayoutController createController(UserRequest ureq, WindowControl wControl, SiteConfiguration config) {
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(CoachSite.class, 0l);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ureq, ores, new StateSite(this), wControl, true);
    CoachMainController mainController = new CoachMainController(ureq, bwControl);
    return mainController;
}
Also used : CoachMainController(org.olat.modules.coach.ui.CoachMainController) OLATResourceable(org.olat.core.id.OLATResourceable) StateSite(org.olat.core.id.context.StateSite) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

StateSite (org.olat.core.id.context.StateSite)34 WindowControl (org.olat.core.gui.control.WindowControl)32 OLATResourceable (org.olat.core.id.OLATResourceable)30 Controller (org.olat.core.gui.control.Controller)4 MainLayoutController (org.olat.core.gui.control.generic.layout.MainLayoutController)4 SystemAdminMainController (org.olat.admin.SystemAdminMainController)2 UserAdminMainController (org.olat.admin.UserAdminMainController)2 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)2 UserRequest (org.olat.core.gui.UserRequest)2 TooledStackedPanel (org.olat.core.gui.components.stack.TooledStackedPanel)2 Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)2 DTab (org.olat.core.gui.control.generic.dtabs.DTab)2 BornSiteInstance (org.olat.core.gui.control.navigation.BornSiteInstance)2 SiteInstance (org.olat.core.gui.control.navigation.SiteInstance)2 ContextEntry (org.olat.core.id.context.ContextEntry)2 StateEntry (org.olat.core.id.context.StateEntry)2 UserSession (org.olat.core.util.UserSession)2 ICourse (org.olat.course.ICourse)2 AssessmentMode (org.olat.course.assessment.AssessmentMode)2 CourseNode (org.olat.course.nodes.CourseNode)2