Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-4655

Make number of summaries per page limit configurable

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Test pre-requisites

      • 5 courses (in the same category) with summaries on each of them
      • The new setting courseswithsummarieslimit set to 10
      • The setting coursesperpage set to 20

      Test steps

      1. Go to the course listing page and in the category containing 5 courses (editing off)
      2. Make sure the 5 courses display their summary in one page
      3. Change the setting courseswithsummarieslimit to 3
      4. Make sure the 5 courses are displayed as a simpler list in one page
      5. Change the setting coursesperpage to 3
      6. Make sure the 5 courses are displayed as a simple list, over 2 pages
      7. Make sure the pagination works
      Show
      Test pre-requisites 5 courses (in the same category) with summaries on each of them The new setting courseswithsummarieslimit set to 10 The setting coursesperpage set to 20 Test steps Go to the course listing page and in the category containing 5 courses (editing off) Make sure the 5 courses display their summary in one page Change the setting courseswithsummarieslimit to 3 Make sure the 5 courses are displayed as a simpler list in one page Change the setting coursesperpage to 3 Make sure the 5 courses are displayed as a simple list, over 2 pages Make sure the pagination works
    • Affected Branches:
      MOODLE_15_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-4655-master

      Description

      Controlling how many courses are displayed in full versus short mode is done through COURSE_MAX_SUMMARIES_PER_PAGE defined in course/lib.php.

      It sseems to me it would be beneficial to have instead $CFG->course_summaries_per_page = 10; in the config.php file, so moodlers can tune their sites easier.

      This constant is used only in a single place: in course/category.php, so the change in the code is trivial. However, it would also be prudent to add this to moodle database in the config table and preset before calling config.php to ensure that it is set.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  3/Dec/12