Controlling access to your Moodle courses is easy with ‘Enrolment Key’ plugin.

28 April 2023 by Catalyst

If you’re an educator or administrator using Moodle, you know that enroling new users can be a cumbersome and time-consuming process. With the ‘Moodle Enrolment key based self-registration’ plugin, you can streamline the process and make it easier for new users to both create their new account and enrol in courses.

Developed by Catalyst IT, a premier Moodle Partner, the ‘Moodle Enrolment key based self-registration’ plugin is designed to simplify the new user account creation and self-enrolment process, while also enhancing security.

In this post, we’ll explore the benefits of the plugin, provide a step-by-step guide for administrators to install and configure it, explain how teachers can enable it in their courses, and outline the user experience for new users seeking to self-enrol in courses using the plugin.

Benefits of the ‘Moodle Enrolment key based self-registration’ plugin:

The ‘Moodle Enrolment key based self-registration’ plugin offers numerous benefits for both administrators and users. Most notably, the plugin makes it easier to enrol in courses and access course content, improves the overall user experience and increases both efficiency and security. By using this plugin you will achieve the following:

  • Simplified self-enrolment process – The plugin streamlines the process for new users to create their account and self-enrol directly into a course by allowing them to enter an enrolment key.
  • Increased efficiency – The plugin automates the enrolment process, which saves time for administrators and teachers. Additional functionality allows previously suspended users of this plugin to be automatically un-suspended.
  • Enhanced security – The plugin adds an extra layer of security by requiring an enrolment key to be entered for self-registration. This prevents unauthorised users from creating new accounts as in the case of standard self-registration, which could lead to subsequent information disclosure or privilege escalation.
  • Modern anti-spam functionality – Features include a reCAPTCHA visual/audio confirmation form element to the sign-up page for self-registering users, and email options which can require email confirmation, or provide partial access until next login without it.

Can’t I just register an account and self-enrol without the plugin?

Yes, but you will be risking the following:

  • Confusing user experience – For new users, the self-enrolment process can be confusing without an enrolment key, as they may not know which courses to enrol in, how to enrol, or where to find the course they were looking at prior to creating their account.
  • Time-wasting – Without the plugin, administrators and teachers must manually enrol each user, which can be time-consuming.
  • Potential for errors – Manually enrolling users increases the chances of errors occurring.

How to:

Administrators – How to install and configure the plugin for your Moodle site:

To install and configure the plugin, follow these steps:

  1. Download the plugin from the Moodle plugins directory
  2. Install the plugin on your Moodle site
  3. Optionally, install the block enrolment key companion plugin on your Moodle site
  4. Enable the plugin by navigating to Site administration > Plugins > Authentication > Manage Authentication and enabling ‘Enrolment key based self-registration’ with the eye icon
  5. Enable self registration with the plugin under ‘Common settings’ in the ‘Site administration > Plugins > Authentication > Manage Authentication’ drop-down and select the ‘Enrolment key based self-registration’ option; save your changes
  6. Enable Email confirmation if you like – the great thing about using the plugin is you can skip this step which will streamline the process and offer a better user experience

Teachers – How to enable the plugin for your course:

To enable the plugin in your course, follow these steps:

  1. Navigate to the course and click on the ‘Participants’ menu tab
  2. In the drop-down under ‘Enrolments’, select ‘Enrolment methods’
  3. Enable an existing ‘Self enrolment’ method or add a new one
  4. Enter an enrolment key for that course enrolment method and save your changes

New Users – How to self-register and enrol using the ‘Enrolment Key’ plugin:

To self-enrol using the plugin, follow these steps:

  1. Navigate to the Moodle site where the course is hosted
  2. Click on the course you wish to enrol in
  3. If you’re new, click the ‘Create the account’ button
  4. Enter your details in the self-registration form, including your name, email address, and a password of your choice
  5. Enter the enrolment key provided by the teacher in the ‘Enrolment key’ field
  6. Click on the ‘Create my new account’ button
  7. You may receive an email with a confirmation link, which you will need to visit to confirm your email address
  8. Once you are logged in with your new account, you will be already enrolled in the course you provided the key for, which will be available in your course list

Best practices for using the ‘Moodle Enrolment key based self-registration’ plugin:

To use the plugin effectively, consider implementing these best practices:

  1. Enable email validation and reCAPTCHA options to validate real users
  2. Create unique enrolment keys for each course to enhance security
  3. Periodically update enrolment keys to maintain security
  4. Communicate the self-enrolment process to new users to avoid confusion and provide a positive user experience
  5. Carefully review your Moodle site’s authentication settings and self-registration configuration and ensure you understand them

In conclusion:

The Enrolment Key plugin is an essential plugin for any Moodle site that values security, flexibility, scalability and a smooth user experience. The plugin:

  • Significantly improves the new user experience, combining the user account creation and enrolment step
  • Provides an additional layer of security to the enrolment process, ensuring that only authorised students can access the course
  • Allows teachers to set an expiry date for the key – educators are provided with greater control and ownership over the enrolment process

By using the ‘Enrolment Key’ plugin, educational institutions can reduce their administrative workload and provide an improved user experience for their students and staff.


At the moment, the ‘Enrolment Key’ plugin in is only supported in Moodle versions 3.9, 3.10 and 3.11. We are currently looking into upgrading this plugin to suit newer versions of Moodle and are seeking contributions / funding to make this possible.

If you are interested to contribute to upgrading the Enrolment Key plugin please let us know. Your decision to contribute will benefit your stakeholders, the wider community and your name will be credited in the Moodle plugin directory.

Catalyst IT are proud to have a strong track record of delivering high-quality Moodle plugins that are well-designed, well-documented, and easy to use.