Affects Version/s: 3.5, 3.5.1, 3.5.5, 3.6.2, 3.7.2
Log in as admin Create 4 new users: Bob Smith Jane Smith Jim Smith Jim Brown Navigate to " Users > Permissions > User policies " in site administration Set " Maximum users per page " to 2 Create a new course Visit course participants page Press Enrol users button Search for "Smith" in the "Select users" field Confirm you see the text "Too many users (>2) to show" Search for "Jim" Confirm both "Jim Smith" & "Jim Brown" are listed in results
- Log in as admin
- Create 4 new users:
- Bob Smith
- Jane Smith
- Jim Smith
- Jim Brown
- Navigate to "Users > Permissions > User policies" in site administration
- Set "Maximum users per page" to 2
- Create a new course
- Visit course participants page
- Press Enrol users button
- Search for "Smith" in the "Select users" field
- Confirm you see the text "Too many users (>2) to show"
- Search for "Jim"
- Confirm both "Jim Smith" & "Jim Brown" are listed in results
Affected Branches:MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
Fixed Branches:MOODLE_36_STABLE, MOODLE_37_STABLE
Pull from Repository:
Pull 3.7 Branch:
Pull Master Branch:
Pull Master Diff URL:
On the new course Participant-page in Moodle 3.5;
when you use "enrol users"-button and type a part of a participant lastname to "select users" search-field and wait, you will get an en error "too many users (>100) to show" if you have more then 100 user accounts in Moodle that has the same lastname.
But on the same Moodle-site if you navigate to Participants -> Users -> Enrolled users;
and type the same part of the lastname to the search pane on the right, you can see all the matching participants available to choose from in the right pane.
Why doesn't the new Participant-page use the same logic and show us all the matching names?
This leads to an situtation if you have more than 100 people in Moodle with the same last name that you cannot add any of them to the course at all with this method since it allways shows the error even if you type in the full last name.
I think Ajax user selector should use the same setting $CFG->maxusersperpage as the traditional manual enrolment form, please see:
Also Moodle system setting "Maximum users per page | maxusersperpage" doesn't affect the new course Participant-page search-field listing, it only affects the "manual enrolments" page.