diff --git a/src/main/java/org/olat/modules/lecture/ui/AbstractTeacherOverviewController.java b/src/main/java/org/olat/modules/lecture/ui/AbstractTeacherOverviewController.java index f639b41ec8389e992ce93e825fb02ef56383d946..ec251745600f0fb5b3e1dc2f0a084ed81c564c67 100644 --- a/src/main/java/org/olat/modules/lecture/ui/AbstractTeacherOverviewController.java +++ b/src/main/java/org/olat/modules/lecture/ui/AbstractTeacherOverviewController.java @@ -125,24 +125,22 @@ public abstract class AbstractTeacherOverviewController extends BasicController mainVC.put("search", searchCtrl.getInitialComponent()); currentLecturesBlockCtrl = new TeacherLecturesTableController(ureq, getWindowControl(), - admin, "empty.table.current.lectures.blocks", false, "current", withRepositoryEntry, withTeachers, withAssessment); + admin, "empty.table.current.lectures.blocks", false, "current", 20, withRepositoryEntry, withTeachers, withAssessment); listenTo(currentLecturesBlockCtrl); mainVC.put("currentLectures", currentLecturesBlockCtrl.getInitialComponent()); pendingLecturesBlockCtrl = new TeacherLecturesTableController(ureq, getWindowControl(), - admin, "empty.table.lectures.blocks", false, "pending", withRepositoryEntry, withTeachers, withAssessment); + admin, "empty.table.lectures.blocks", false, "pending", 20, withRepositoryEntry, withTeachers, withAssessment); listenTo(pendingLecturesBlockCtrl); mainVC.put("pendingLectures", pendingLecturesBlockCtrl.getInitialComponent()); nextLecturesBlockCtrl = new TeacherLecturesTableController(ureq, getWindowControl(), - admin, "empty.table.lectures.blocks", true, "next", withRepositoryEntry, withTeachers, withAssessment); - nextLecturesBlockCtrl.setTablePageSize(5); + admin, "empty.table.lectures.blocks", true, "next", 5, withRepositoryEntry, withTeachers, withAssessment); listenTo(nextLecturesBlockCtrl); mainVC.put("nextLectures", nextLecturesBlockCtrl.getInitialComponent()); closedLecturesBlockCtrl = new TeacherLecturesTableController(ureq, getWindowControl(), - admin, "empty.table.lectures.blocks", false, "closed", withRepositoryEntry, withTeachers, false); - closedLecturesBlockCtrl.setTablePageSize(10); + admin, "empty.table.lectures.blocks", false, "closed", 10, withRepositoryEntry, withTeachers, false); listenTo(closedLecturesBlockCtrl); mainVC.put("closedLectures", closedLecturesBlockCtrl.getInitialComponent()); } diff --git a/src/main/java/org/olat/modules/lecture/ui/TeacherLecturesTableController.java b/src/main/java/org/olat/modules/lecture/ui/TeacherLecturesTableController.java index 9b32a36ea8d1fac66e8f379278cc6a5ac06f30c3..af135c7f0a0a16ec37804874adf04bc04a1e1c79 100644 --- a/src/main/java/org/olat/modules/lecture/ui/TeacherLecturesTableController.java +++ b/src/main/java/org/olat/modules/lecture/ui/TeacherLecturesTableController.java @@ -111,6 +111,7 @@ public class TeacherLecturesTableController extends FormBasicController implemen private final String id; private final boolean admin; private final boolean sortAsc; + private final int defaultPageSize; private final String emptyI18nKey; private final boolean withTeachers; private final boolean withAssessment; @@ -129,7 +130,7 @@ public class TeacherLecturesTableController extends FormBasicController implemen private AssessmentModeManager assessmentModeMgr; public TeacherLecturesTableController(UserRequest ureq, WindowControl wControl, - boolean admin, String emptyI18nKey, boolean sortAsc, String id, + boolean admin, String emptyI18nKey, boolean sortAsc, String id, int defaultPageSize, boolean withRepositoryEntry, boolean withTeachers, boolean withAssessment) { super(ureq, wControl, "teacher_view_table"); this.id = id; @@ -138,6 +139,7 @@ public class TeacherLecturesTableController extends FormBasicController implemen this.emptyI18nKey = emptyI18nKey; this.withTeachers = withTeachers; this.withAssessment = withAssessment; + this.defaultPageSize = defaultPageSize; this.withRepositoryEntry = withRepositoryEntry; authorizedAbsenceEnabled = lectureModule.isAuthorizedAbsenceEnabled(); @@ -178,7 +180,7 @@ public class TeacherLecturesTableController extends FormBasicController implemen columnsModel.addFlexiColumnModel(toolsCol); tableModel = new TeacherOverviewDataModel(columnsModel, getLocale()); - tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, 20, false, getTranslator(), formLayout); + tableEl = uifactory.addTableElement(getWindowControl(), "table", tableModel, defaultPageSize, false, getTranslator(), formLayout); FlexiTableSortOptions sortOptions = new FlexiTableSortOptions(); sortOptions.setDefaultOrderBy(new SortKey(TeachCols.date.name(), sortAsc));