Enrolment: Enrol by user profile fields

enrol_attributes
Maintained by Picture of Nicolas Dunand Nicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
605 sites
273 downloads
42 fans

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

Picture of Nicolas Dunand
Nicolas Dunand (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Juan Du Plessis
    Wed, 7 Feb 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?
  • Picture of Ibrahim Fadl
    Thu, 8 Feb 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!
  • Picture of Nicolas Dunand
    Fri, 9 Feb 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.
  • Picture of Nicolas Dunand
    Fri, 9 Feb 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".
  • Picture of Eoin Campbell
    Fri, 9 Feb 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.
  • Picture of Eoin Campbell
    Fri, 9 Feb 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.
  • Picture of Sofia Rehan Ramli
    Wed, 21 Feb 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.
  • Picture of Mantas Šedys
    Thu, 8 Mar 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, 17 Mar 2018, 11:11 PM
    Hi,

    Any update to Moodle 3.4?

    Ricardo
  • Picture of Nicolas Dunand
    Mon, 19 Mar 2018, 3:13 PM
    Hi Ricardo,

    This plugin should work on Moodle 3.4.
  • Picture of Beto de Oliveira
    Tue, 20 Mar 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.
  • Picture of Nicolas Dunand
    Tue, 20 Mar 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.
  • Picture of shivshankar kesha
    Wed, 4 Apr 2018, 11:31 PM
    Hi Mantas Šedys,

    I am facing same issue in 3.1 did you get any solutions for this, please suggest if you fixed.
    Bug: My enrolls by profile fields not working , It's not starting automatically, but if I press "force enrollment now" - everything run smoothly. Any ideas?
  • Picture of Matias Kapoble
    Tue, 10 Apr 2018, 12:05 AM
    Hi Nicolas Dunand,

    I want to know what happend if i change a user profile. Does the plugin unenrol the user? That would be very useful.

    Or if there is a way to manually unenrol the user.

    Thanks,
  • Picture of Nicolas Dunand
    Thu, 19 Apr 2018, 2:52 PM
    Hi Matias,

    Yes, if you check the "Unenrol after attributes expiration" box in the enrolment method, then the person whose attributes no longer match the rule would be unenrolled after their next login.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Please login to post comments