use of org.olat.modules.lecture.model.LectureBlockIdentityStatistics 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.LectureBlockIdentityStatistics in project OpenOLAT by OpenOLAT.
the class LecturesStatisticsExport method addContentAggregated.
private void addContentAggregated(OpenXMLWorksheet exportSheet, OpenXMLWorkbook workbook) {
List<LectureBlockIdentityStatistics> aggregatedStatistics = lectureService.groupByIdentity(statistics);
for (LectureBlockIdentityStatistics statistic : aggregatedStatistics) {
Row row = exportSheet.newRow();
int pos = 0;
pos = addContentUser(statistic, row, pos);
addContentStatistics(statistic, row, pos, workbook);
}
}
use of org.olat.modules.lecture.model.LectureBlockIdentityStatistics in project OpenOLAT by OpenOLAT.
the class LecturesStatisticsExport method addContentDetailled.
private void addContentDetailled(OpenXMLWorksheet exportSheet, OpenXMLWorkbook workbook) {
for (LectureBlockIdentityStatistics statistic : statistics) {
Row row = exportSheet.newRow();
int pos = 0;
pos = addContentUser(statistic, row, pos);
row.addCell(pos++, statistic.getExternalRef());
row.addCell(pos++, statistic.getDisplayName());
addContentStatistics(statistic, row, pos, workbook);
}
}
use of org.olat.modules.lecture.model.LectureBlockIdentityStatistics in project OpenOLAT by OpenOLAT.
the class LecturesListController method formInnerEvent.
@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
if (source == tableEl) {
if (event instanceof SelectionEvent) {
SelectionEvent se = (SelectionEvent) event;
String cmd = se.getCommand();
if ("open.course".equals(cmd)) {
LectureBlockIdentityStatistics row = tableModel.getObject(se.getIndex());
doOpenCourseLectures(ureq, row);
}
}
} else if (source == exportButton) {
doExportStatistics(ureq);
}
super.formInnerEvent(ureq, source, event);
}
use of org.olat.modules.lecture.model.LectureBlockIdentityStatistics 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);
}
Aggregations