use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class OverviewAuthoringController method doOpenMark.
private AuthorListController doOpenMark(UserRequest ureq) {
if (markedCtrl == null) {
SearchAuthorRepositoryEntryViewParams searchParams = new SearchAuthorRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
searchParams.setMarked(Boolean.TRUE);
searchParams.setOwnedResourcesOnly(false);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Favorits", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
markedCtrl = new AuthorListController(ureq, bwControl, "search.mark", searchParams, false, true);
listenTo(markedCtrl);
} else if (favoritDirty) {
markedCtrl.reloadRows();
} else {
markedCtrl.reloadDirtyRows();
}
favoritDirty = false;
currentCtrl = markedCtrl;
addToHistory(ureq, markedCtrl);
mainVC.put("segmentCmp", markedCtrl.getStackPanel());
return markedCtrl;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class OverviewAuthoringController method doSearchEntries.
private AuthorListController doSearchEntries(UserRequest ureq) {
if (searchEntriesCtrl == null) {
SearchAuthorRepositoryEntryViewParams searchParams = new SearchAuthorRepositoryEntryViewParams(getIdentity(), ureq.getUserSession().getRoles());
searchParams.setOwnedResourcesOnly(false);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Search", 0l);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
searchEntriesCtrl = new AuthorListController(ureq, bwControl, "search.generic", searchParams, true, false);
listenTo(searchEntriesCtrl);
}
currentCtrl = searchEntriesCtrl;
addToHistory(ureq, searchEntriesCtrl);
mainVC.put("segmentCmp", searchEntriesCtrl.getStackPanel());
return searchEntriesCtrl;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CatalogNodeController method selectCatalogEntry.
private CatalogNodeController selectCatalogEntry(UserRequest ureq, CatalogEntry entry) {
if (entry != null && entry.getType() == CatalogEntry.TYPE_NODE) {
removeAsListenerAndDispose(childNodeController);
OLATResourceable ores = OresHelper.createOLATResourceableInstance("CatalogEntry", entry.getKey());
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, rootwControl);
childNodeController = new CatalogNodeController(ureq, bwControl, rootwControl, entry, stackPanel, wrapInMainPanel);
listenTo(childNodeController);
stackPanel.pushController(entry.getName(), childNodeController);
addToHistory(ureq, childNodeController);
}
return childNodeController;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doLectures.
private TeacherOverviewController doLectures(UserRequest ureq) {
if (delayedClose == Delayed.lectures || requestForClose(ureq)) {
removeCustomCSS();
OLATResourceable ores = OresHelper.createOLATResourceableType("lectures");
WindowControl swControl = addToHistory(ureq, ores, null);
TeacherOverviewController ctrl = new TeacherOverviewController(ureq, swControl, toolbarPanel, getRepositoryEntry(), reSecurity.isEntryAdmin());
lecturesCtrl = pushController(ureq, translate("command.lectures"), ctrl);
setActiveTool(lecturesLink);
currentToolCtr = lecturesCtrl;
return lecturesCtrl;
} else {
delayedClose = Delayed.lectures;
return null;
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class CourseRuntimeController method doAssessmentStatistics.
/**
* Only an helper method for the 2 methods above. Don't call it directly, there is no request on close guard.
* @param ureq
* @param i18nCrumbKey
* @param typeName
* @param tool
* @param types
* @return
*/
private Activateable2 doAssessmentStatistics(UserRequest ureq, String i18nCrumbKey, String typeName, Link tool, QTIType... types) {
OLATResourceable ores = OresHelper.createOLATResourceableType(typeName);
ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapBusinessPath(ores));
WindowControl swControl = addToHistory(ureq, ores, null);
if (reSecurity.isEntryAdmin() || reSecurity.isCourseCoach() || reSecurity.isGroupCoach() || hasCourseRight(CourseRights.RIGHT_STATISTICS)) {
removeCustomCSS();
UserCourseEnvironmentImpl uce = getUserCourseEnvironment();
StatisticCourseNodesController ctrl = new StatisticCourseNodesController(ureq, swControl, toolbarPanel, reSecurity, uce, types);
listenTo(ctrl);
statsToolCtr = pushController(ureq, translate(i18nCrumbKey), ctrl);
currentToolCtr = statsToolCtr;
setActiveTool(tool);
return statsToolCtr;
}
return null;
}
Aggregations