Moodle
  1. Moodle
  2. MDL-21427

Make Front page setting 'courses per page' paginate the my course listing on the front page

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9.7, 1.9.8, 1.9.9, 1.9.10
    • Fix Version/s: None
    • Component/s: Accessibility, Usability
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      There can be users on a Moodle instance who are enrolled on a large number of courses. If the the front page is set to list a users courses then that list can be very long and cause the front page to take a long time to render for them.
      In the Front page settings of the administrator panel there is a setting called 'courses per page' which, I believe, should change the number of courses displayed on the front page but does not. It would be useful if this setting could trigger pagination to occur on the front page which would allow the page to load faster for users assigned to a lot of courses. I have developed a patch that will allow this to work but requires changes to core Moodle code in course/lib.php and lib/datalib.php. The patch and screen shots of the working pagination in the latest weekly build of Moodle 1.9.7 is attached. Note that the patch code takes into account local and remote courses and places the remote courses on the pages after the local courses.

        Gliffy Diagrams

        1. frontPagePaginate19.patch
          13 kB
          Steve Clay
        2. patch.txt
          12 kB
          John Ennew
        1. frontpage_pagination_remotecourses.png
          181 kB
        2. frontpage_pagination.png
          211 kB

          Activity

          Hide
          Stephen added a comment -

          We have a user role for helpdesk staff that isn't admin, but can see all modules. Default behaviour is to list all modules on the same page, and this gets crazy slow! Paginating would be a perfect solution.

          Show
          Stephen added a comment - We have a user role for helpdesk staff that isn't admin, but can see all modules. Default behaviour is to list all modules on the same page, and this gets crazy slow! Paginating would be a perfect solution.
          Hide
          David Mudrak added a comment -

          +1 for the pagination. For admins (and other roles having all courses available) the front page can even become blank if the number of course is higher than 200.

          Show
          David Mudrak added a comment - +1 for the pagination. For admins (and other roles having all courses available) the front page can even become blank if the number of course is higher than 200.
          Hide
          Steve Clay added a comment -

          git patch from 050504c371db27020f15e96012987b9e1085b4b2 (converted from John Ennew's CVS patch)

          Show
          Steve Clay added a comment - git patch from 050504c371db27020f15e96012987b9e1085b4b2 (converted from John Ennew's CVS patch)
          Hide
          Steve Clay added a comment -

          Sad to say this patch does not take into account category ordering and probably other factors, so while the correct courses are visible and separated into pages, with our settings the overall order of the entire set was completely wonky. I.e. if we simply concatenated the individual pages, we'd get a wildly different order than before we applied the patch.

          Show
          Steve Clay added a comment - Sad to say this patch does not take into account category ordering and probably other factors, so while the correct courses are visible and separated into pages, with our settings the overall order of the entire set was completely wonky. I.e. if we simply concatenated the individual pages, we'd get a wildly different order than before we applied the patch.
          Hide
          Shirley VerStraete added a comment -

          We use Moodle 2.2.4.
          Have attempted setting the Courses per page to 36 and still only 21 courses display.
          We have NOT installed the pagination patch and probably won't since the scenario where we need more than 21 courses is not our standard.
          It would be nice to see this incorporated into core.

          Show
          Shirley VerStraete added a comment - We use Moodle 2.2.4. Have attempted setting the Courses per page to 36 and still only 21 courses display. We have NOT installed the pagination patch and probably won't since the scenario where we need more than 21 courses is not our standard. It would be nice to see this incorporated into core.
          Hide
          David Mudrak added a comment -

          This issue was assigned to me, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

          Show
          David Mudrak added a comment - This issue was assigned to me, however I will not be able to work on this issue in the immediate future. In order to create a truer sense of the state of this issue and to allow other developers to have chance to become involved, I am removing myself as the assignee of this issue. For more information, see http://docs.moodle.org/dev/Changes_to_issue_assignment

            People

            • Votes:
              7 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: