Enrol by user profile fields

Enrolment ::: enrol_attributes
Maintained by Nicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
Latest release:
1345 sites
333 downloads
110 fans
Current versions available: 4

This plugin allows users to be enrolled according to any value stored in their user profile. If you use an external authentication scheme (LDAP, Shibboleth), you can store values in hidden user fields of the users' Moodle profile, and then use these values to automatically enrol users if some courses.

Screenshots

Screenshot #0

Contributors

Nicolas Dunand (Lead maintainer)
RISET Université de Lausanne: Supporting institution
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Fri, Feb 2, 2018, 6:00 PM
    Dear Rolf,
    By default, only the Manager role in Moodle can set up an enrolment method with this plugin. Did you check this as the Moodle administrator? If you want to change this behaviour, you can change this permission in your Moodle's role definitions.
  • Fri, Feb 2, 2018, 6:21 PM
    Nicolas, I really apprechiate your assistance! As I mentioned, I my moodle 3.3 it works, in a moodle 3.4 it doesn't. In both Installation I am active as primary admin only... 3.3 OK, 3.4 not working
  • Fri, Feb 2, 2018, 7:43 PM
    Thanks Rolf. I'm really wondering now, but I quickly spun up a Moodle 3.4 here and the plugin shows up as expected. Please PM me so we can sort this out.
  • Wed, Feb 7, 2018, 9:45 PM
    Hi Nicolas, firstly thanks for this awesome plugin. i did use it in my version 3.3, but once i installed on version 3.4, it did install but once i created the profile field and new user insert information that matches the enrollment method it does not enroll the user, any help?
  • Thu, Feb 8, 2018, 2:35 PM
    Hi nicolas,
    When a user logged and update his profile custom fields, he cannot access the course that I have previously configure for the custom field. He has to log off and log on again so he can access the course. What code can I modify so the user after updating his profile will be automatically able to access the course. Do you know what code to add to resolve this issue?
    Thanks!
  • Fri, Feb 9, 2018, 8:51 PM
    Hi Ibrahim,
    I guess you could listen to some event fired when the profile is modified, but I don't know whether such an event exists.
  • Fri, Feb 9, 2018, 8:52 PM
    Posting back here after solving Rolf's problem. If the course enrolment method does not show up, the first thing to try is whether, in the plugin settings page, at lease one value is set for the field "Profile fields to be used in the selector".
  • Fri, Feb 9, 2018, 11:13 PM
    This is a really useful plugin. It would be even better if you could assign enrolled participants to a group as well, as you can with the Course meta link enrolment plugin.
  • Fri, Feb 9, 2018, 11:16 PM
    Regarding Ibrahim Fadis request above, the plugin https://moodle.org/plugins/local_autogroup seems to use events to automatically assign participants to groups when profile fields change, so perhaps the code for that might be useful.
  • Wed, Feb 21, 2018, 6:19 PM
    Hi Nicolas,

    Thank you for your reply. Just wondering, is it possible to have that the criteria matches any word found in the user profile field, instead of must be exactly the same as the profile field? For example I want the user profile field to contain the word Engineering, but it can be any type of Engineering.
  • Thu, Mar 8, 2018, 3:14 AM
    Hi,
    after two days investigation I need your help guys.
    My enrolls by profile fields stopped working and I can't find what is wrong. It's not starting automatically, but if I press "force enrolment now" - everything run smoothly. Any ideas?
    Moodle - 3.3 / Plugin - (2017050100)
  • Ricardo Caiado
    Sat, Mar 17, 2018, 11:11 PM
    Hi,

    Any update to Moodle 3.4?

    Ricardo
  • Mon, Mar 19, 2018, 3:13 PM
    Hi Ricardo,

    This plugin should work on Moodle 3.4.
  • Tue, Mar 20, 2018, 11:01 PM
    Hi,

    I have the same question as Sofia:

    "Just wondering, is it possible to have that the criteria matches any word found in the user profile field, instead of must be exactly the same as the profile field? For example I want the user profile field to contain the word Engineering, but it can be any type of Engineering."

    Thank you.
  • Tue, Mar 20, 2018, 11:20 PM
    Hi Beto,

    The login of field content comparison is in the lib.php file, more precisely see https://github.com/ndunand/moodle-enrol_attributes/blob/master/lib.php#L177

    You could change this to affect the behaviour to match your intended purpose.
Please login to post comments