Merge branch 'MDL-78370-403' of https://github.com/junpataleta/moodle into MOODLE_403_STABLE
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -547,7 +547,11 @@ const itemsPerPageFunc = (pagingLimit, root) => {
|
||||
// Filter out all pagination options which are too large for the amount of courses user is enrolled in.
|
||||
const totalCourseCount = parseInt(root.find(SELECTORS.courseView.region).attr('data-totalcoursecount'), 10);
|
||||
return itemsPerPage.filter(pagingOption => {
|
||||
return pagingOption.value < totalCourseCount || pagingOption.value === 0;
|
||||
if (pagingOption.value === 0 && totalCourseCount > 100) {
|
||||
// To minimise performance issues, do not show the "All" option if the user is enrolled in more than 100 courses.
|
||||
return false;
|
||||
}
|
||||
return pagingOption.value < totalCourseCount;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user