Enrolment: AutoEnrol

Maintained by Picture of Mark WardMark Ward, RobertoRoberto Pinna
Adds functionality to automatically enrol users onto a course, either as they log into your Moodle site or as they acess a course. This plugin is primarily intended for use on courses which you want all users to be able to access but can also be configured for more advanced purposes.
2544 sites
109 fans
Moodle 2.0, 2.1, 2.2, 2.3, 2.4, 2.5

When added to a course this enrolment plugin can enrol users onto a course automatically, either as they log into your Moodle site or as they click on the course. It is intended for use on site-wide courses such as "Moodle Help" or "Learner Voice".

In addition the plugin has advanced functionality to support autmatically grouping and filtering users based upon their attributes. Depending on how your user accounts are set
up this may help you to give access to certain user groups.

Configuration of the plugin is managed by two permissions which allow administrators to easily control who has access to the plugin.


Screenshot #0
Screenshot #1


Picture of Mark Ward
Mark Ward (Lead maintainer)
Roberto Pinna: Maintainer
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Roberto
    Tue, Oct 13, 2020, 11:17 PM
    Hello James,
    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.

  • Picture of Natalie .
    Fri, Dec 4, 2020, 7:26 PM
    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
  • Roberto
    Fri, Dec 4, 2020, 11:04 PM
    Hi Natalie,
    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.
  • Picture of Paul Beckwith
    Tue, Dec 8, 2020, 4:51 AM
    Tried using this in 3.9, it works on a single activity format however causes the activity to launch straight away. When changes to any other course format doesn't work.
  • Roberto
    Wed, Dec 9, 2020, 6:04 PM
    Hello Paul,
    can you explain what doesn't work? What's your expected behaviour?
  • Picture of Bruno Piu
    Thu, Jan 21, 2021, 11:29 PM
    Hello Mark and Roberto,
    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?
  • Roberto
    Fri, Jan 22, 2021, 6:01 PM
    Hello Bruno,
    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.

  • Picture of Bruno Piu
    Fri, Jan 22, 2021, 8:31 PM
    Hello Roberto,
    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?
  • Roberto
    Fri, Jan 22, 2021, 8:54 PM
    Hello Bruno,
    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.
  • Picture of Bruno Piu
    Fri, Jan 22, 2021, 9:49 PM
    Hello Roberto,
    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?
  • Picture of Joanna Beaver
    Wed, Feb 24, 2021, 8:34 PM
    Hello, in the configuration of an autoenrol instance, is it possible to Allow only [role]?
  • Roberto
    Wed, Feb 24, 2021, 8:39 PM
    Hello Joanna,
    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.

  • Picture of Joanna Beaver
    Wed, Feb 24, 2021, 8:58 PM
    Thanks Roberto, I was thinking of manager role at system level. We need the managers actually enrolled in the course as opposed to just being able to view without participation. On that note, I am trying instead to Allow by email, but even setting to a specific email address it is not enrolling the Manager. I have set Always enrol to Yes, in case that was required.
  • Roberto
    Thu, Feb 25, 2021, 12:17 AM
    I think that Manager role has capabilities that do not permit auto enrolment.
    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.

  • Picture of Paulo Paiva Paiva
    Sat, Feb 27, 2021, 12:04 AM
    Is it safe to use in 3.10?

    Thank you!
1 2 3 4 5 6 7 8 9 10 11
Please login to post comments