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.
this problem is not managed from autoenrol plugin but by moodle core that setups user data before finish user enrolments.
Today I worked hard to try to find a workaround to this problem and now I hope I found it.
I've already posted on Github a commit that seems to solve the problem. Please test it and let me know.
HTH,
Roberto
is it possible to enter OR values in the "allow only" field?
I'd like to set up this:
Group by: email
Allow only: @xy.de OR @yz.com
you can't do it in that field.
If you need to permit access with a OR logic you can setup more autoenrol instances with a single rule in each one.
Implement more complex rules is in the roadmap but I don't know when it will be released.
can you explain what doesn't work? What's your expected behaviour?
I installed the plugin in a moodle version 3.9, defined a course and associated with the course the enrollment mode "Auto Enrol", then that of the plugin.
In the plugin configuration, I defined in the "User Filtering" the "Group By" => "Department" and the "Allow Only" field => "3".
In the moodle there is a user where the Department field is = "3", but unfortunately when I do the login with that user, the course is not displayed. Did I forget to configure anything?
Thanks!
if you set the autoenrol on login, the course is not shown at the first login in user Dashboard.
This happens because moodle call autoenrol after the Dashboard setup.
There is no way to change it so user will see new autoenrol course from the second login.
HTH
thanks for the answer, but what you mean with "set the autoenrol on login", because I didn't done any explicitely action for that?
Anyway, even after the second/third...logins, the user don't see the course because it doesn't become enrolled.
Did you have any idea what I can check?
Thanks!
if you did not set autoenrol on login, autoenrol works on course access.
You can set this and other advanced feature clicking on Expand All or Show more... links in autoenrol settings page.
in the autoenrol settings page, I've set the following fields:
Role Student
Enrol When Logging into Site
Always Enrol Yes
and then Filtering:
Group By Department
Allow Only TestDip
Soft Match Yes
Limit 0
It's correctly configured?
Autoenrol is an enrolment plugin, it set the role in a course for users that match the rule.
If I understand what you ask this is not possible because users do not have a role in a course before the enrolment.
HTH,
Roberto
Managers can enter into courses without enrolment so no enrolment procedure is called.
Manual enrolment is the only way you can use to enrol them in a course.
Sorry,
Roberto
Is it safe to use in 3.10?
Thank you!