Enrol by user profile fields

Maintained by Nicolas Dunand
This plugin allows users to be enrolled according to any value stored in their user profile.
Price option: Free

Supports Moodle 2.1-5.0 See all versions
Latest release: 1 year ago
Installations: 1874
Downloads (last 90 days): 314

Frankenstyle name: enrol_attributes
Enrolment

Comments

Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.

Michael,
Once, installed, you need to activate this plugin by going to Site administration > Plugins > Enrolments and activate this plugin from the table displaying all enrolment plugins available in your Moodle.
Then, you need to make sure the plugin itself is configured properly.
Hi Nicolas,
its shown in the plugin list under the enrollment methods, but Availability assign to Disabled !!!
Hi, Michael,
Are you sure the plugin is actually installed (is it visible in the plugins list within Moodle) ? And is it configured ? You have to at least select which user profile fields you're using in the plugin settings.
thanks for your reply,
but i can't add this enrolment method to course enrolment methods, or there are another ways to use it,
Hi Michael,
If your LDAP integration somehow stores user information in the Moodle database about user's profle (for instance, "department" = "chemistry"), then this plugin could use that information to enroll users automatically (for instance, enroll all users from "chemistry" department in some courses).
Dear Nicolas,
i want to know more about this Enrollment method, we integrate our LDAP with Moodle to import users, also we has about 10 department.
so now we want to make a self-access course to specific department not to all users.
thanks will do
Roger, plain text fields should work in all cases. If you go into the enrollment method you mention, what is the debugging code displayed at the bottom? Maybe PM me instead of posting it here as it may contain some information that could be considered sensitive.
Many thanks for your reply Nicolas, I'm not sure of the physical value stored in the db for the drop down profile field, however I tried using a plain text input field with a simple text value but I'm afraid that did not work either.
Hi Roger,
Sorry about this code, I should remove it in the next release, as indeed the "mdl_" prefix should not be hard-coded.
As for the drop-down values, I have not investigated a lot about it yet. Could you check in your Moodle database what the actual value for that field would be? Is is the value that's actually displayed in Moodle, or is it some other value somehow?
Hi
Thanks for this plug-in, I am struggling to get it to work however sad
When I installed and ran an enrolment instance I got a database access error as it was looking for the wrong user name field trying for mdl_user, whereas my db prefix is nmdo.
So I changed line 102 in the attributes/edit.php (changing 'SELECT DISTINCT u.id FROM mdl_user u ' to 'SELECT DISTINCT u.id FROM nmdo_user u ' )
The error has gone but the plug-in still will not work, I am trying to enrol based on a drop down profile field value.
Any ideas or suggestions to investigate much appreciated.
Thanks
Roger
Justin, thanks for your feedback. Could you elaborate on how you would see the plugin work with group enrolment keys? I'm not sure to understand.
Tyler, indeed there is no such functionality yet.
Tyler, it looks like there's no ability to define duration (with expected UI interactions) with this plugin unfortunately.
Nicolas, great work here thank you! It's plugins like this that add basic functionality yet drastically improve efficiency that I enjoy using. No duration/expiration feature aside, still an excellent plugin.
Could this functionality be extended to work with group enrolment keys also?
Or what about some method to assign a role to a category, such as listing them along with the role in relation to a defined custom profile field?
Hello, where do I set the duration of enrollment? When I look at the student in enrolled users, I do not see an enrollment end date.