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