Moodle plugins directory: AutoEnrol | Moodle.org
AutoEnrol
When added to a course this enrolment plugin can enrol users onto a course automatically, either as they log in to your Moodle site or as they access to the course.
It was at first intended for use on site-wide courses such as "Moodle Help" or "Learner Voice".
In addition the plugin has advanced functionality to support automatically grouping and filtering users based upon their profile fields. Depending on how your user accounts are setup this may help you to give access to certain user groups.
Configuration of the plugin is managed by two capabilities which allow administrators to easily control who has access to the plugin.
Autoenrol filter use moodle standard availability interface that adds great flexibility in user filtering.
You can filter access to your courses using core availability plugins like date, user profile and sets of them or use additional availability plugins like: badge, other course completion, payments, etc...
The only limit is that the availability plugin rule should evaluate elements available outside courses.
The Moodle availability plugin for user profile fields unfortunately does not include language and authentication.
If you need them, you can install additional availability plugins like Restriction by language and Restriction by authentication.
Thanks for such a cool plugin.
Tell me, please, how can I add the "position" field in the application, because when choosing fields, it is not there and is most likely not available on the platform either.
It turns out that you first need to add this field through the administration panel so that timing data is recorded there? And then it is already expected in the course auto-assignment add-on?
I'm sorry but I didn't find any reference to a "position" field in Moodle.
The user database table does not include it, and if you don't have a user profile custom field called position I don't think you can manage it without an additional availability plugin.
I suggest to you to search for an availability plugin that check the "position" field in order to use it with autoenrol.
HTH,
Roberto
Can you tell me more about the accessibility plugin.
I have LDAP connected on Moodle, and all employees have a position field. I created a custom field "position", but I don't know how to automatically pull it into this field, maybe you know how to do it?
if you have created a custom field for "position", you just need to map it from your LDAP connection.
You can look at https://docs.moodle.org/402/en/LDAP_authentication#Custom_User_profile_fields for details.
If users position change time by time I suggest to update local on login so each time the user login Moodle gets data from LDAP.
After that you can add a user filter with the custom filed to Autoenrol with without any other availability plugin.
HTH,
Roberto
I try to enrol today but I will enrolled from tomorrow.
You can't do that with autoenrol, you need an other enrolment plugin to do that.
I don't know if someone has already developed something like that but it could be done so if not you can develop it by yourself.
HTH,
Roberto
you can use custom field with auto enrol but profile field availability plugin does not support date custom fields.
I submitted an issue in Moodle Tracker (MDL-72083) a couple of years ago but it still opened.
You can vote for it in order to promote the development.
Cheers,
Roberto
User Filtering --> Group By (User Filter) --> Group Name (some value)
It should not try to make an entry to the group every time the user logs in.
Error Message:
[Sun Nov 12 03:32:37.028814 2023] [php:notice] [pid 3214911] [client 76.66.101.94:53101] Default exception handler: Error writing to database Debug: Duplicate entry '3-618' for key 'm_groumemb_usegro_uix'\nINSERT INTO m_groups_members (groupid,userid,timeadded,component,itemid) VALUES(?,?,?,?,?)\n[array (\n 0 => '618',\n 1 => '3',\n 2 => 1699759957,\n 3 => '',\n 4 => 0,\n)]\nError code: dmlwriteexception\n* line 497 of /lib/dml/moodle_database.php: dml_write_exception th
Thanks for this great plugin.
Could there be another option to "enrol by link" (a randomly generated link) which can be automatically emailed or shared with users?
- Loading to course
- Login to site
- Enrol by link
For example:
(moodle site.com/enroll=XCDFS)
.... OR...
(moodle site .com/course/view.php?id=7&enrol=XCDFS)
adding this feature is not easy as adding an option to a dropdown menu.
I think is better to use other enrolment plugins like enrol_invitation or enrol_easy that do something like you need.
HTH,
Roberto
I have a question concerning the option Enrol When - Loading the Course. Could you please clarify, how does it work? I configured it, but I just don't see my course, if I'm not enrolled. What should student/admin do to see the course and enroll then? What means loading here?
Also I would like to ask, how to configure Auto enrol in the following case.
The filter set by user profile field - email. Only those, whose email contains @company.com, can be enrolled. But how to extend this filter only to new users? Not for all, who already have such email.
Thank you in advance!
sorry for the bad traslation.
"Loading" means the student load the course page.
I changed the traslation to "Entering the course".
HTH,
Roberto
https://my.moodle.edu/bhrplms/course/view.php?id=1068&group=groupa
This would / could let certain links be built, that would place learners into designated groups, just through URL
Just my though - thank you for your work on this.
with AutoEnrol you can manage user groups using user filter or user profile fields.
I understand the reason for your idea but I see possible problems related to malicious use of the feature you suggest adding.
I think could be better to use a different plugin to manage it.
HTH,
Roberto