Please test this, in particular, on Oracle and MS SQL server.
1. On Users > Permissions > User policies, add idnumber to the selected Show user identity fields.
2. Create a user with idnumber s, and full name Students ZZZ. Then create a lot of other accounts with idnumbers s1, ... s100, with last names that come in alphabetical order before ZZZ.
(Actually, 100 users here is excessive. A few is enough to see the effect of the change.)
3. Now, try to enrol the user with idnumber s, by searching for 's' in the manual enrolment pop-up.
4. Verify that Students ZZZ is listed first in the list of matching users.
You need to do similar checks in other places where users are searched for or just displayed sorted (obviously fewer checks to do when there is no search):
5. Both user selectors on the assign roles page at system level.
6. Both user selectors on the assign other users page at course level.
7. Both user selectors on the assign roles page at activity level.
8. Both user selectors on the assign admins screen.
9. In the web service admin UI, on the form where you create a token for a user.
10. Both user selectors on the manage cohort members screen.
11. Both user selectors on the non-javascript manage enrolments page (enrol/manual/manage.php, go to Manage enrolments, then click on the two face icon for the manual enrolment plugin.)
12. Check the list of teachers is still correctly displayed beside each course in the course list.
13. Check that mnet enrolment still works. (Sorry, I am not sure of how this is supposed to work.)
14. For self-enrolment, check that the from address of the welcome email is one of the teachers in the course.
15. In gradebook import:
15a. Create an import file with the idnumbers of some users who do exist, but who are not enrolled in the course.
15b. Try to import this file. At some point in the process, you should see a list of users who are not enrolled. Make sure that is displayed correctly, and that the users are in the right order.
16. On the front page of the groups UI, the list of users where you select one group.
17. Lists of users on the groups overview page.
18. Both user selectors on the page where you add/remove users from a group.
19. Find at least one admin setting using admin_setting_users_with_capability, e.g. the list of users to notify about course requests on Site administration, Courses, Course request. Test that.
20. I don't know what mnet/service/enrol/course.php does, but I changed it, so it should be tested. In fact, there are several user selectors in the mnet UI. Wherever they are, they need to be tested.
21. Sort order where users are listed in the choice module.
22. Forum show and manage subscribers page. That is, turn editing on when looking at the list of subscribers. Also check a forum with forced subscription on.
23. Lesson module essay qtype UI. (Sorry, this is another area I don't know much about.)
24. Sorting of lesson reports.
25. Quiz module, when viewing user overrides, check the sort order. When editing them the list of users in the form select menu.
26. Lots of places users are listed in the workshop module.
27. Logs report.
28. Security report.
29. Stats report.