Merge branch 'MDL-64194-37_block_myoverview_incorrect_pagination' of https://github.com/tomdickman/moodle

This commit is contained in:
Jake Dallimore 2019-04-01 14:36:01 +08:00
commit 9f32a85852
2 changed files with 2 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

@ -499,7 +499,7 @@ function(
} }
// Set the last page to either the current or next page // Set the last page to either the current or next page
if (loadedPages[currentPage].courses.length < pageData.limit) { if (loadedPages[currentPage].courses.length < pageData.limit || !remainingCourses.length) {
lastPage = currentPage; lastPage = currentPage;
actions.allItemsLoaded(currentPage); actions.allItemsLoaded(currentPage);
} else if (loadedPages[currentPage + 1] != undefined } else if (loadedPages[currentPage + 1] != undefined