Autoenrol Parents

Authentication ::: auth_enrolmentor
Maintained by Virgil Ashruf
Auto assign parents, mentors or managers a role to users based on a custom profile field.
Latest release:
47 sites
23 fans
Current versions available: 2

Many parents, mentors or managers want to have easy access to the learner progress of their peers and relations. And we want to be able to easily give them this access. Based on a piece of information in a custom profile field in the learners profile, their parents, mentors or managers can easily be assigned automatically.

There is a basic configuration screen that let's you select the role to assign, and which information you want to compare against.

This plugin is a work in progress. Currently it is able to automatically assign a role to a user but not unassign this role.

This plug-in is not maintained and therefore does not support the latest Moodle versions.

There is a possibility to use cohorts for large scale mentor assignments since Moodle 3.8.


Screenshot #0


Virgil Ashruf (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • སྤེན་, 1 ཟླ་༢ 2014, 7:57 AM
    Virgil, please help me, how to make to operate this plugin, because I installed it, but I don´t understand how should function.
  • མིར་, 11 ཟླ་༢ 2014, 11:02 PM
    Hi Virgil,

    Thank you for making this plugin available to the Moodle community. I really appreciate all your efforts in developing this plugin.

    I just installed the plugin in Moodle 2.6. Haven't done much with it other than activating it however, when I login with debugging set to developer mode and debugging display turned on, I get the following notice message each time I login:

    Notice: Undefined property: stdClass::$profile_field in /auth/enrolmentor/auth.php on line 199.

    I've reported the issue on GitHub:

    Please let me know if you have any questions and when a fix will be available for me to test.

    Best regards,

    Michael Milette
  • སྤེན་, 15 ཟླ་༢ 2014, 6:35 PM
    Thanks for this plugin. It looks promising, but I'm not sure where to go after installing it and adding the user profile field. What happens next?
  • མིར་, 18 ཟླ་༢ 2014, 12:19 AM
    Hello Heather,
    The plug-in works autonomously once you've installed and configured the plugin/profile fields. When a user logs in, the plugin checks whether this user is a manager in someone else's profile. If so, the user is enrolled in that profile.

    The plugin now also checks whether or not the user is no longer a parent of someone, in that case the plugin automatically unenrols the user.
  • པུར་, 13 ཟླ་༡༡ 2014, 8:45 AM
    Looks promising.
    Is this compatible with 2.7/2.8? Thanks!
  • པུར་, 13 ཟླ་༡༡ 2014, 4:47 PM
    Hi Lael, yes. This should be compatible with 2.7 and 2.8. As it does not contain any code that is affected by any changes. Please let me know if you find out otherwise.
  • སངས་, 27 ཟླ་༢ 2015, 12:07 AM
    Hi Virgil,

    I am facing an error with this plugin on 2.7.5. There are some user who are just not able to login to the site. They get invalid user error. If I disable your plugin they are able to, I have no clue why this is happening. Everything is ok for these users in their profiles, the database and even the profile fields are all normal. I am not a developer and I don't know what in your code is causing this.
  • པུར་, 18 ཟླ་༦ 2015, 2:35 PM
    Works perfectly, thanks! Is there any way to all TWO parents to be enrolled?

    William Michael, Director
    Classical Liberal Arts Academy
  • མིར་, 23 ཟླ་༦ 2015, 5:56 PM
    Hello William,

    Thank you for your interest! Sadly there is no functionality available yet in the plug-in that allows for two parents to be enrolled automatically. As only one unique identifier for an account is actively looked for. I am putting this on the feature request list on my GitHub!
  • ལྷག་, 24 ཟླ་༦ 2015, 11:00 AM
    Problem has arisen...please help me understand this.

    We use Google OAuth 2.0 so that our students can login to Moodle with their Google Apps accounts. When I first installed the "AutoEnrol Parents" block, it seems that it worked. However, It now seems that the parents and students have been disconnected throughout our system. Fortunately, we're on summer break, so it's no major crisis.

    Any idea why this would happen and what I should do?

    Thank you,
    William Michael

  • མིར་, 13 ཟླ་༡༠ 2015, 3:25 PM
    Hello William, the only reason I can imagine that users are disconnected would be that the profile field containing the connecting info was somehow altered. The plug-in checks the current enrolled children, and the children in which the parent should be enrolled. Then compares these lists. Only when the parent is enrolled in more children than he/she is supposed to, will the plugin unenrol. For instance when there are no matches.
  • མིར་, 30 ཟླ་༧ 2019, 9:29 PM
    Hi, is there a new version of this plugin for moodle 3.5 and higher?
  • ལྷག་, 31 ཟླ་༧ 2019, 5:36 PM
    Hi Natalie, this version is not yet supported for Moodle 3.5. I haven't yet planned any time to update the plug-in. Can I advise you to look into adapting
  • མིར་, 10 ཟླ་༩ 2019, 10:08 PM
    Hi Virgil,

    that's too bad. I am sure there are several institutions who might need this plugin. But nevertheless, I have looked into the documentation you have linked above and this will help us, too for the time being.

    Here's what I've done:
    We have a custom profile field, where we enter the name of a user's mentor. I'd have to select the mentees or children by filtering the users according to that field and put them in a cohort ( Then I can assign the mentor role on the user context level to all the users of my cohort (

    This still requires some manual work (create cohorts, assign the role, update if there are changes) but still, it will save us some of the work. So thank you smile

    I still hope, that the plugin will be updated eventually.
  • ཟླ་, 2 ཟླ་༣ 2020, 6:22 PM
    I am also finding some way to add student,parent relation in bulk than adding seperately in parent role for each student. if there is any way to do bulk linking of student and mentee please let me know
1 2
Please login to post comments