The pagination was found to be incorrect due to the all the items event not being triggered if the amount
of courses the user has is equal to the amount set via pagination.
The condition could not just be changed to `>=` as this would trigger the event when there were further
pages to display.
A check of `remainingCourses` was added to condition so if the amount of courses on the current loaded
page is less than the pagination amount, or there are no remaining courses, the all items event is
triggered and the pagination bar hidden correctly.