We have courses that are used by different schools. When a teacher needs to assign a role to a student for a specific course, Moodle shows all the users. We only want to show the users from the same school (using field institution).
To show only the users when calling course settings/users/enrolling users it shows the users from a certain institution. I changed that into ../enrol/locallib.php into the function get_total_users(). I added a condition
.. AND u.institution=$spec_instution..
But then when you click on the button enrol users, a form is showed with ALL the users. My question is:
Where or in which file/function I can add this condition? I haven't been able to find it after 4 hours of searching .
We are using latest moodle 2.3.2.