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.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
great plugin that saves our trainer some time
It would really be great, if it would work with the standard Moodle profile fields as well
Regards, Dietmar
let me join Jürgen's idea, and hope you will have that moment soon
András
Thanks for your feedback – yeah it would be great, I really have to look into this as soon as I have a moment.
It is :
- enrol as user logs into Moodle (if it matches, obviously)
- enrol during cron job, every 6 hours
A *VERY* silly question: does this plugin automatically enrols anyone matching conditions, or is it "enroling as user accesses" - kind of the Self Enrolment builtin plugin? Because I believed it was the second option, and unfortunately all my students share the same extended profile field value ("Student") so all of sudden, in every course that uses your plugin, we have around 3,000 people enroled, to my teacher's dismay lol!
Thanks, but this has been corrected in recent versions. Which version of the plugin are you using?
I'm currently working on this, and will hopefully provide a new release addressing this issue soon.
For more information, see https://github.com/ndunand/moodle-enrol_attributes/issues
I've just sent you a private message to sort this out. Once this is sorted I'll post back here if some relevant info came up for other users of this plugin.
thanks in advance
I added and set up the plugin (latest version), and have an issue. As you can see from your debug message your plugin finds two cases when the the enrolment should happen:
sqlquery= SELECT DISTINCT u.id FROM mdl3_user u RIGHT JOIN mdl3_user_info_data d1 ON d1.userid = u.id WHERE (d1.fieldid = 4 AND ( d1.data = 'aaaaa' OR d1.data LIKE '%;aaaaa' OR d1.data LIKE 'aaaaa;%' OR d1.data LIKE '%;aaaaa;%' ))
line 102 of \enrol\attributes\edit.php: call to debugging()
countusers= 2
line 104 of \enrol\attributes\edit.php: call to debugging()
However when I push the force enrollment button nothing happens, even when a user log in no enrolment is happening. When the loged in user wants to enroll manualy Moodle says: you can not enrol yourself ... which is right as your plugin is the only one added to the course.
Please help what is going wrong.
thanks,
András
also with regards b) what is the name of the cron job that runs?
Cheers
Peter
Official Moodle 3.1 support is available as of now.