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): 312

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.

When might we be able to expect a Moodle 4.5 (LTS) compatible release of this very useful plugin?
Hi all,
I installed the plugin in Moodle 4.1 and where I add this enrolment method to a course I enter the in page where you can change the rules based on profile fields. It proposes the URL field and is not possible to modify it with other field. Perhaps I'm missing some steps. May you can help me ?
Thanks
Hi, just like Tim I am also unable to get the plugin to unenrol students based on a change in enrolment conditions (e.g. they are correctly enrolled based on a value in a profile field but if that value changes / is deleted then the plugin doesn't respond based on the change in profile field value and unenrol the users).
If you could add the option to unenrol students if they no longer fit the criteria based on a profile field value that would be hugely appreciated!
Hi,
We have the plug-in running on Moodle 4.1.9+ and it's set to unenrol students if the user profile field that was used to enrol them no longer matches the enrolment conditions - but, even after a couple of hours, test students remain enrolled. Manually purging enrolments clears them, as does manually forcing enrolments but I don't want to have to do that every time somebody's details change. Is there a setting somewhere that I'm missing?
Thank you,
Tim
@Nicolas Dunand
This is the output of the task failure:
Execute scheduled task: Process all rules and enrolments for Enrol by user profile fields (enrol_attributes\task\processenrolments_task)
... started 16:46:45. Current memory use 6.4 MB.
Debugging increased temporarily due to faildelay of 86400
--------------------------
Yes, as per the dscription above, this plugin works on Moodle 4.4. What happens if you run the scheduled task manually?
Has this plugin been updated to work with moodle 4.4+? I'm getting some notifications from moodle that tasks are failing now that I'm running moodle 4.4
Fail delay: 1 day - Process all rules and enrolments for Enrol by user profile fields (enrol_attributes\task\processenrolments_task)
Hi, thanks for this great plugin.
I have used it to enrol users based on a numerical value from a drop down field in the user's profile (i.e. if value = 2).
This worked (but not automatically, I had to click "Force enrolments now), however when the value of that field changes (e.g. new value = 0) the user is not unenrolled from the course even though I chose the option to "Unenroll user" in the "Behaviour after attributes expiration" field.
Three questions:
1) Does this plugin not recognise changes to drop down fields? If it does, how can I use this plugin to automatically unenroll users who no longer match that profile field value?
2) Can the plugin automatically add users who match the profile field conditions or do I have to click "Force enrolments now" every time new users are added to moodle / user fields are updated?
3) If using values from a checkbox, what do I enter in "User profile fields rules"? I've tried "yes" and "true" and neither work.
Thanks!
Hello Nicolas,
I use FilterCodes https://moodle.org/plugins/filter_filtercodes it is very versatile.
It allows you to auto populate using plain text tags. I've just done a load more testing and I don't think this plug in does pick up the filter codes values. Or I could be doing it wrong. It would be amazing if this plugin could pick up plain text tags.
Am using Moodle 4.0
Many thanks
Marie
_______________
I have tested the following
I want to be able to enrol my users to a course using your plugin if they meet the criteria 'is member' and 'has paid' The 'is member' criteria changes and is dynamic, the 'has paid' state is static and a one off. Both are decided in a different course.
So I have created two custom user profile fields
The first field 'is member' uses the filter code
{ifhasarolename roleshortname}{/ifhasarolename}: Displays enclosed content if the user has been assigned the specified role anywhere in the Moodle site within any context.
which i change to
{ifhasarolename member}Member{/ifhasarolename}
So if this condition is met, the text in the custom profile field displays Member
The second custom profile field is 'has paid'. I manually fill this in with 'yes'.
When I set up your plug in I use the user profile rules
'is member' = Member
AND
'has paid' = yes
With testing in various combinations and using different types of custom profile fields, I can not get this plug in to recognise the the filer code returned value 'Member'
Everyone,
Sorry for keeping your questions unanswered.
Brian,
Now multi-valued arguments are supported in the latest version, make sure to check it out.
Marie,
I'm not sure which Filter Codes plugin you're referring, to. Could you elaborate?
Can I use Filter Codes plugin to auto populate the custom profile fields for this plug in? Potentially fantastic plug in for us where a complex logic is used to determine access to a course. Thank you.
Finally, I found out that the interface to use this plugin is INSIDE of each course, under participants/enrolment method. It is quite buried.
Brilliant plugin! yet, impossible to configure. Where is the menu to define enrollment rules a shown in the screenshot? There should be steps in the instructions on how to configure it once installed.
Is there any method to manage rollovers? So academic year 2023_4 year 1 student then gets 2024_5 year 2. However, it looks like each field is a singular item e.g. cannot be comma or semi colon separated. One profile field can enrol in many different courses, but we seem to need multiple profile fields per academic year. Plus the complexity of different strands in HE suggest needing very complex enrolment by fields filtering per course.
Where you can set: Profile fields to be used in the selector, it may look like your custom profile field is selected but i had to press it again and save changes to be able to see the enrollment method.