use of org.olat.modules.lecture.model.LectureStatisticsSearchParameters in project OpenOLAT by OpenOLAT.
the class LecturesSearchController method doSearch.
private void doSearch(UserRequest ureq) {
LectureStatisticsSearchParameters params = searchForm.getSearchParameters();
List<UserPropertyHandler> userPropertyHandlers = searchForm.getUserPropertyHandlers();
List<LectureBlockIdentityStatistics> statistics = lectureService.getLecturesStatistics(params, userPropertyHandlers, getIdentity(), admin);
Set<Long> identities = statistics.stream().map(LectureBlockIdentityStatistics::getIdentityKey).collect(Collectors.toSet());
Controller ctrl;
if (identities.size() <= 1) {
listCtrl = new LecturesListController(ureq, getWindowControl(), statistics, userPropertyHandlers, LecturesSearchFormController.PROPS_IDENTIFIER, true, true);
listenTo(listCtrl);
ctrl = listCtrl;
} else {
multipleUsersCtrl = new LecturesListSegmentController(ureq, getWindowControl(), statistics, userPropertyHandlers, LecturesSearchFormController.PROPS_IDENTIFIER);
listenTo(multipleUsersCtrl);
ctrl = multipleUsersCtrl;
}
stackPanel.popUpToRootController(ureq);
stackPanel.pushController(translate("results"), ctrl);
}
use of org.olat.modules.lecture.model.LectureStatisticsSearchParameters in project OpenOLAT by OpenOLAT.
the class LecturesSearchFormController method getSearchParameters.
public LectureStatisticsSearchParameters getSearchParameters() {
LectureStatisticsSearchParameters params = new LectureStatisticsSearchParameters();
String type = dateTypesEl.getSelectedKey();
if ("none".equals(type)) {
params.setStartDate(null);
params.setEndDate(null);
params.setLifecycle(null);
} else if ("public".equals(type)) {
params.setStartDate(null);
params.setEndDate(null);
if (publicDatesEl.isOneSelected() && StringHelper.isLong(publicDatesEl.getSelectedKey())) {
RepositoryEntryLifecycle lifecycle = lifecycleDao.loadById(new Long(publicDatesEl.getSelectedKey()));
params.setLifecycle(lifecycle);
} else {
params.setLifecycle(null);
}
} else if ("private".equals(type)) {
params.setStartDate(startDateEl.getDate());
params.setEndDate(endDateEl.getDate());
params.setLifecycle(null);
}
params.setLogin(getLogin());
params.setBulkIdentifiers(getBulkIdentifiers());
params.setUserProperties(getSearchProperties());
return params;
}
use of org.olat.modules.lecture.model.LectureStatisticsSearchParameters in project openolat by klemens.
the class LecturesSearchController method doSearch.
private void doSearch(UserRequest ureq) {
LectureStatisticsSearchParameters params = searchForm.getSearchParameters();
List<UserPropertyHandler> userPropertyHandlers = searchForm.getUserPropertyHandlers();
List<LectureBlockIdentityStatistics> statistics = lectureService.getLecturesStatistics(params, userPropertyHandlers, getIdentity(), admin);
Set<Long> identities = statistics.stream().map(LectureBlockIdentityStatistics::getIdentityKey).collect(Collectors.toSet());
Controller ctrl;
if (identities.size() <= 1) {
listCtrl = new LecturesListController(ureq, getWindowControl(), statistics, userPropertyHandlers, LecturesSearchFormController.PROPS_IDENTIFIER, true, true);
listenTo(listCtrl);
ctrl = listCtrl;
} else {
multipleUsersCtrl = new LecturesListSegmentController(ureq, getWindowControl(), statistics, userPropertyHandlers, LecturesSearchFormController.PROPS_IDENTIFIER);
listenTo(multipleUsersCtrl);
ctrl = multipleUsersCtrl;
}
stackPanel.popUpToRootController(ureq);
stackPanel.pushController(translate("results"), ctrl);
}
use of org.olat.modules.lecture.model.LectureStatisticsSearchParameters in project openolat by klemens.
the class LecturesSearchFormController method getSearchParameters.
public LectureStatisticsSearchParameters getSearchParameters() {
LectureStatisticsSearchParameters params = new LectureStatisticsSearchParameters();
String type = dateTypesEl.getSelectedKey();
if ("none".equals(type)) {
params.setStartDate(null);
params.setEndDate(null);
params.setLifecycle(null);
} else if ("public".equals(type)) {
params.setStartDate(null);
params.setEndDate(null);
if (publicDatesEl.isOneSelected() && StringHelper.isLong(publicDatesEl.getSelectedKey())) {
RepositoryEntryLifecycle lifecycle = lifecycleDao.loadById(new Long(publicDatesEl.getSelectedKey()));
params.setLifecycle(lifecycle);
} else {
params.setLifecycle(null);
}
} else if ("private".equals(type)) {
params.setStartDate(startDateEl.getDate());
params.setEndDate(endDateEl.getDate());
params.setLifecycle(null);
}
params.setLogin(getLogin());
params.setBulkIdentifiers(getBulkIdentifiers());
params.setUserProperties(getSearchProperties());
return params;
}
Aggregations