Search in sources :

Example 71 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.

the class RunMainController method activate.

@Override
public void activate(UserRequest ureq, List<ContextEntry> entries, StateEntry state) {
    if (entries == null || entries.isEmpty()) {
        if (currentNodeController != null) {
            addToHistory(ureq, currentNodeController);
        } else {
            addToHistory(ureq, this);
        }
        return;
    }
    ContextEntry firstEntry = entries.get(0);
    String type = firstEntry.getOLATResourceable().getResourceableTypeName();
    if ("CourseNode".equalsIgnoreCase(type) || "Part".equalsIgnoreCase(type)) {
        CourseNode cn = course.getRunStructure().getNode(firstEntry.getOLATResourceable().getResourceableId().toString());
        if (currentCourseNode == null || !currentCourseNode.equals(cn)) {
            getWindowControl().makeFlat();
            // add logging information for case course gets started via jump-in
            // link/search
            addLoggingResourceable(LoggingResourceable.wrap(course));
            if (cn != null) {
                addLoggingResourceable(LoggingResourceable.wrap(cn));
            }
            // consume our entry
            if (entries.size() > 1) {
                entries = entries.subList(1, entries.size());
            }
            updateTreeAndContent(ureq, cn, null, entries, firstEntry.getTransientState());
        } else if (currentCourseNode.equals(cn)) {
            // consume our entry
            if (entries.size() > 1) {
                entries = entries.subList(1, entries.size());
            }
            // the node to be activated is the one that is already on the screen
            if (currentNodeController instanceof Activateable2) {
                Activateable2 activateable = (Activateable2) currentNodeController;
                activateable.activate(ureq, entries, state);
            }
        }
    }
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CourseNode(org.olat.course.nodes.CourseNode) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 72 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.

the class BusinessGroupMainRunController method doWiki.

private Activateable2 doWiki(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLWIKI, OlatResourceableType.wiki));
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLWIKI);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapWikiOres(ce.getOLATResourceable()));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createWikiController(ureq, bwControl);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 73 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.

the class BusinessGroupMainRunController method doCalendar.

private Activateable2 doCalendar(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLCAL, OlatResourceableType.calendar));
    // calculate the new businesscontext for the forum clicked
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLCAL);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ce.getOLATResourceable()));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createCalendarController(ureq, bwControl, businessGroup, isAdmin, true);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 74 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.

the class BusinessGroupMainRunController method doFolder.

private Activateable2 doFolder(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFOLDER, OlatResourceableType.sharedFolder));
    SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFOLDER);
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFOLDER);
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ce.getOLATResourceable()));
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createFolderController(ureq, bwControl, businessGroup, isAdmin, sc);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) SubscriptionContext(org.olat.core.commons.services.notifications.SubscriptionContext) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Example 75 with Activateable2

use of org.olat.core.gui.control.generic.dtabs.Activateable2 in project openolat by klemens.

the class BusinessGroupMainRunController method doForum.

private Activateable2 doForum(UserRequest ureq) {
    addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFORUM, OlatResourceableType.forum));
    SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFORUM);
    // calculate the new businesscontext for the forum clicked
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFORUM);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
    addToHistory(ureq, bwControl);
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(businessGroup);
    collabToolCtr = collabTools.createForumController(ureq, bwControl, isAdmin, ureq.getUserSession().getRoles().isGuestOnly(), sc);
    listenTo(collabToolCtr);
    mainPanel.setContent(collabToolCtr.getInitialComponent());
    return (Activateable2) collabToolCtr;
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) CollaborationTools(org.olat.collaboration.CollaborationTools) SubscriptionContext(org.olat.core.commons.services.notifications.SubscriptionContext) WindowControl(org.olat.core.gui.control.WindowControl) ContextEntry(org.olat.core.id.context.ContextEntry)

Aggregations

Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)78 ContextEntry (org.olat.core.id.context.ContextEntry)44 Controller (org.olat.core.gui.control.Controller)28 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)22 TreeNode (org.olat.core.gui.components.tree.TreeNode)16 WindowControl (org.olat.core.gui.control.WindowControl)16 BasicController (org.olat.core.gui.control.controller.BasicController)14 CourseNode (org.olat.course.nodes.CourseNode)12 CollaborationTools (org.olat.collaboration.CollaborationTools)10 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)10 MainLayoutBasicController (org.olat.core.gui.control.controller.MainLayoutBasicController)10 AssessableCourseNode (org.olat.course.nodes.AssessableCourseNode)10 GTACourseNode (org.olat.course.nodes.GTACourseNode)10 FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)8 GenericTreeNode (org.olat.core.gui.components.tree.GenericTreeNode)8 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)6 ChiefController (org.olat.core.gui.control.ChiefController)6 VetoableCloseController (org.olat.core.gui.control.VetoableCloseController)6 BornSiteInstance (org.olat.core.gui.control.navigation.BornSiteInstance)6 OLATResourceable (org.olat.core.id.OLATResourceable)5