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.

Thank you Nicolas
My idea is, then enrollment with one certain user profile field shout have a time, when it expires.
those users enroled by a certain field would be enroled for a certain time only. So the enrolment "lasts" for a short time only. When newly enrolled with a special key, Enrolement is valid for 30/45 days only. My thoughts wrong anywhere?
Hi Rolf,
It is not possible at the moment. However, how would this work ? If the user profile field values stay the same, after the end of the enrolment period the user would be enrolled again ?
Hello Nicolas again. Is it possible to set enrolmentperiod by any means with this plugin?
Rolf
Hi Rolf,
If the plugin is not configurer correctly at the site level, it won't show in the enrolment methods in a cours.
Hi Nicolas, the latest Version of this plugin for up to Moodle 3.6 does not work. It is activated (eye open) but it does not appear on possible enrol-methodes for any course within the respective dropdown-menue (enrolemethodes)! What may I do wrong here?
Hi Nicolas, I know this great plugin from earlier versions, but are there any Plans and dates for an update to use this plugin with Moodle 3.6 soon, really need it?
Hi Georg,
Thanks for reporting back. Without more information about the exact database error it will be difficult to debug any further. However, as forcing the scheduled task to run again solved the issue it is likely that what caused this was a temporary database condition.
Glad to hear all is fine, cheers!
Hi again, I finally found the issue in the database table "mdl_task_scheduled/processenrolments_task". "faildelay" was set to "86400" and I changed it to "0". Now everything works fine! smile
No idea why this happened at all.
Kind regards,
George
Hi, thank you for your kind answer!
I'm using the latest build of your plugin (2018092300) with the latest build of Moodle 3.5.3+! "Enrol users immediately at login" is checked. "Force enrolments" is working well, but executing the scheduled task "processenrolments_task" failed because of database write error! So I guess this is causing the issue, right? Is there anything I can do to get this process working again? The other task "invalidatecache_task" is working smoothly.
Kind regards,
George
Hi, which version of the plugin are you using? We've recently added a "Enrol users immediately at login" setting (no change, as it's "On" by default), to improve login speed.
Things to check:
1. Does "force enrolments" work as expected?
2. If using the latest version, if "Enrol users immediately at login" is not checked, then enrolments are only processed when clicking "Force" or by cron, but not at each login anymore.
3. Try to manually start this plugin's scheduled tasks (in Moodle admin > Server > Scheduled tasks).
Hi, this plugin was working like a charm until a couple of days ago the automatic enrolment by user fields stopped at all! All settings remained untouched, the enrolment logic is working well when testing it with "force enrolment now", cronjob does work properly, no other plugins as well as Moodle updates installed until today when I was updating to the latest release 3.5.3+ (from older build 3.5.3+).
May I ask if you could provide me with some tips or hints as I actually have no idea what the problem is?!
Kind regards,
George
Hi Nicolas, I'm working on Moodle 3.3 and I am using the theme adaptable.
I installed your plugin but when i go to configurations, it showme nothing.
Hello, glad that i find this forum. im facing the same problem. I've made an enrollment by user profile, and according to this forum i have to wait for 6 hours, but after waiting for 1 day, it doesnt seem workout. can you help me? is there anything that i have to do? using moodle 3.4
Thank you
Thank you for your reply. Its's a php script in the root of moodle. I haven't got the knowledge yet to a accomplished that. I think i have to build a plugin by myself to understand the code in moodle. THX.
Hello Koen,
You should be able to simply call enrol_attributes_plugin::process_enrolments() to force the plugin enrolments routine to run.