Moodle 2.7 search users

Moodle 2.7 search users

by Владимир Зотов -
Number of replies: 2

Hello!


I want to filter userlist available to manual enrol - only users assing to specialised mentor must be displayed. I found that code in /enrol/manual/manage.php


<td id="potentialcell">

          <p><label for="addselect"><?php print_string('enrolcandidates', 'enrol'); ?></label></p>

          <?php $potentialuserselector->display() ?>

      </td>


how can I pass search criteria to display only users, assigned to current mentor?

Average of ratings: -
In reply to Владимир Зотов

Re: Moodle 2.7 search users

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Vladimir,

how exactly did you implement "assigning" users to the mentor? If you did it with cohorts you can choose cohort members. Especially if you have the same value (or substring) in teacher user idnumber and cohort idnumber it can be implemented very easily in enrolment plugin.

In reply to Marina Glancy

Re: Moodle 2.7 search users

by Владимир Зотов -

Hello, Marina!

Thank you for reply! I want to devide my students into "groups" by assigning them to different mentors. In my case, mentor means organisation (a company)  and students are enployees of the organisation.

Mentor is able to manually enrol some students assigned to him into courses.

As I understand cohort is not my way - it is enrollment instrument, while I need logical groupping of my students.