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

MAX_USERS_PER_PAGE used inconsistently/not at all

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: DEV backlog
    • Component/s: General
    • Labels:
    • Database:
      Any
    • Affected Branches:
      MOODLE_22_STABLE

      Description

      The user selectors used in various parts of Moodle (enrolments, cohort members, etc.) will not display search results where a the number of results returned by a search is more than 100.

      const MAX_USERS_PER_PAGE = 100 is defined in a couple of different places in an some cases this constant isn't even used when checking that the number of search results is less than 100. The constant isn't defined in the user_select_base class, but instead a couple of its sub classes even though the value is the same in all of them. Sometimes instead of referencing the constant theres just a literal magic number 100 (e.g. around line 130 in /enrol/manual/locallib.php). It'd be good if we tidied this up so this value was configured in just one place. I've attached a patch that does this. It might even be worthwhile having the maximum number of users as a configurable setting. In some cases the current value of 100 is a bit limiting.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              moodle.com moodle.com
              Reporter:
              nmares Nathan Mares
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: