Enrolment: Enrol by user profile fields

Maintained by Picture of Nicolas Dunand Nicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
484 sites
33 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.


Screenshot #0


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 Nicolas Dunand
    Wed, 21 Dec 2016, 4:25 PM
    Dear Nathan,

    Please check the plugin's main settings page. You have to select at lease one item for the "Profile fields to be used in the selector" setting or the plugin won't be enabled.
  • Picture of Nathan Stevenson
    Thu, 22 Dec 2016, 5:50 AM

    We get an option to set Enrol by user profile fields: Default Role (Set to student currently). That's the only option we have Site Admin > Plugins > Enrolments > Enrol by user profile fields
  • Picture of Zoltán Szalay
    Thu, 22 Dec 2016, 5:42 PM
    Dear Nicolas,

    I could try the plugin. If I fill the customized profile field manualy the pluging works properly. So the problem is with the mapping during the shibboleth authentication. As I described before, only the first course ID is mapped. I think there is a little bug in the PHP code handling the semicolons. However, unfortunately I am not a skilled PHP programmer. I have tried to find a forum post or anything else which deal with the problem but I could not find any.
    Could you please help me regarding this issue or suggest someone who can?

    Best regards,
    Zoltán Szalay

  • Picture of Oguzhan Ahiskali
    Thu, 19 Jan 2017, 6:15 PM
    Users who are subsequently added in bulk will be forced to "force the user to assign"..
    Can we provide automatic attendance for a certain period of time as a scheduled task?

  • Picture of Gemma Lesterhuis
    Thu, 26 Jan 2017, 2:54 AM
    Hi Nicolas,

    I am working on Moodle 3.1 with this plugin and I am trying to figure out if it's a cron issue or something else that is causing people not to auto enrol. If I use "force" it works fine. It's just 1 rule that need to be checked.

    You mentioned the plug-in works for auto-enrolment on:
    - enrol as user logs into Moodle (if it matches, obviously)
    - enrol during cron job, every 6 hours

    I have set the plugin with my rule, and forced the cron job, but I don't see the enrollment happening with those who have the profile field checked. I am looking at /admin/tool/task/scheduledtasks.php to see if I can find the "6 hour cron job" so I can check if this is the issue, but can't find it for this plug-in. Is the plug-in running at the same time with a different cron task?

    Thank you Gemma
  • Picture of Nicolas Dunand
    Thu, 26 Jan 2017, 4:44 PM
    Hi Gemma,

    Actually this plugin uses the "legacy" cron system, not the scheduled tasks yet – that's why it's not listed there.

    On the actual rule definition, with debugging turned on in Moodle, you can see the actual query and number of user accounts matched ("coutusers"), which might help you diagnose why your rule is not working.
  • Picture of Paweł Gaw
    Mon, 20 Feb 2017, 6:54 PM
    hello, i have this plugin and I enabled this method in administration >>>> site administration >>>> plugins >>>> enrollments >>>> manage enroll plugins but i don't see this method in course administration >>>> users >>>> enrollment methods. Please help. My moodle is Moodle 3.1.2+ (Build: 20161020)
  • Picture of Nicolas Dunand
    Mon, 20 Feb 2017, 7:05 PM
    Hello Paweł,

    Ditto my comment above from Dec. 21. You have to have at least one profile field selected in the plugin settings to have the enrolment method available in your courses.
  • Picture of Ricardo Méndez
    Wed, 15 Mar 2017, 8:13 AM

    I can´t use the plugin over moodle 3.2, the buttons to add or delete rules doesn't show correctly.

    I Installed the plugin over Moodle 3.2.1 and 3.2.2 with php 5.6.5 and php 7.0 and I have the same problem.
  • Picture of Nicolas Dunand
    Wed, 15 Mar 2017, 3:19 PM
    Hello Ricardo,

    Thanks for reporting this – which theme are you using?
  • Picture of Ricardo Méndez
    Wed, 15 Mar 2017, 8:52 PM
    Hi Again,

    I was using the default theme that come with the 3.2 version, which is "Boost". After your comment I changed it to the "Clean" theme and the pluging now look's good. Thanks a lot!!!!
  • Picture of Nicolas Dunand
    Thu, 16 Mar 2017, 3:03 PM
    Thanks for checking this Ricardo,
    I'll make sure this is corrected in the next release – probably for when Moodle 3.3 gets released.
  • Picture of Craig Millward
    Tue, 21 Mar 2017, 5:33 PM

    We're having issues with auto enrolments when the criteria is slightly more complex, we're using Moodle 3.0.1 and are trying to auto enrol using 4 custom profile fields. I've set the requirements, but when a user creates an account they are not automatically enrolled. However if i go into the settings and select "force enrolments" the desired users are enrolled. This only seems to happen when all 4 critieria are required, my other courses with 3 or less are all fine. Anyone got any ideas?
  • Picture of Nicolas Dunand
    Wed, 22 Mar 2017, 3:03 PM
    Hi Craig,

    Thanks for reporting this. Is it possible that in some way the 4th profile fiels – is it always the same? – would not be set when the user first creates his account?
  • Picture of Craig Millward
    Wed, 22 Mar 2017, 4:43 PM
    Hi Nicolas,
    Thanks for your reply.
    All 4 fields are definitely set when the account is created, we've tested all possible ways of creating an account (manually -user, manually- admin, bulk upload) all of which have the same outcome.

    Our 4 profile fields look like this,

    Field1 – 1 option
    field2 - 10 options
    field3 - 3 options
    field4 - 3 options
1 2 3 4 5 6 7 8 9
Please login to post comments