Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Enrolment key.

Enrolment key

From MoodleDocs

A course enrolment (or enrollment) key is one method to restrict Internal enrolment (student self enrolments) to a smaller group. The default setting is not to set a key.

An enrolment key is often used as a simple method of having someone else beside the teacher determine if a particular student can self enrol in the course. The idea is that one or more people will supply the course key to authorized people. Sometimes this distrubution is private email, snail mail, on the phone or even verbally in a face to face meetings such as a class or counselor's office.

Setting an enrolment key (up until Moodle 1.9)

The enrolment key is a Moodle setting that any teacher or admin user can set on a course by course basis.

To locate and use this setting:

  1. Login to Moodle as an admin or teacher
  2. Navigate to the desired course
  3. Locate the Course Administration block
  4. Click on Settings in that block
  5. Scroll down and locate the Enrolment key field
  6. Enter the key in the adjacent text field ("bratwurst" in the example)
  7. Scroll to the bottom of the page and click "Save changes"
The enrolment key area in course settings

Setting an enrolment key (Moodle 2+)

See https://docs.moodle.org/en/Course_settings#Enrolments

Tips and Tricks

  • If the enrolment key for a course "gets out" and unwanted people self enrol:
    • Change the key. Currently enrolled students will not need the key again.
    • Unenrol the unwanted users via Assign roles in the course administration block.
  • Changing or placing a key does not impact currently enrolled students, nor does it impact students who may also be enrolled by an enrolment plugin.
  • Guests may (optionally) be required to supply the enrolment key (as specified on the Course Settings page). They will be required to supply the code every time they enter the course.
  • The "No" or "Date range" options in the "Course available" setting effectively disables the enrolment key feature, even if it is set.
  • In Moodle 1.8.3 onwards, you can control who is named as supplying the key in the Internal enrolment settings.
  • In Moodle 1.9.3 onwards, the enrolment key hint may be disabled in the Internal enrolment settings.
  • In Moodle 1.9.4 onwards, enrolment key usage and/or complexity may be enforced in the Internal enrolment settings.

See also

  • Internal enrolment - to set the role of the people who hold the course enrolment key
  • Create group - for information on setting group enrolment keys
  • Keyholder role - for an administrator to set the person named as holding the course enrolment key