“You cannot enrol yourself in this course” sounds final, but it is really Moodle saying that no currently available enrolment method accepts this user under these conditions. The useful response is not to weaken every site setting. It is to inspect the chain from the global plugin down to the one course and one learner.
Account registration and course enrolment are separate
Authentication: creates or validates the Moodle user account.
Email-based self-registration: may let a visitor create an account, if institutional policy allows it.
Self enrolment: lets an authenticated account join a particular course.
Guest access: can permit viewing without creating normal course membership or Student capabilities.
Enable the plugin at site level
Sign in as a site administrator.
Open Site administration → Plugins → Enrolments → Manage enrol plugins.
Find Self enrolment and ensure it is enabled.
Open its settings and review defaults rather than changing every value reflexively.
Confirm Manual enrolments remains enabled, because current Moodle documentation requires it in the course alongside self-enrolment.
Global settings are defaults and policy controls
Require enrolment key can force every course instance to define a key.
Password policy can enforce stronger course and group enrolment keys.
Default duration, expiry notification, inactivity removal, maximum users, and welcome messages influence new methods.
A globally enabled plugin still does nothing for a course until that course has an enabled method.
Add or enable Self enrolment in the course
Open the target course with a role allowed to configure enrolments.
Choose Participants in course navigation.
Open its action menu and select Enrolment methods.
If Self enrolment exists with a closed eye, enable it. If it does not exist, add Self enrolment from the method selector.
Open the method settings and review every restriction before saving.
The settings that decide whether the button appears
Allow existing enrolments and Allow new enrolments must match the intended lifecycle.
Enrolment start and end dates determine when new learners may join.
Max enrolled users blocks new enrolments when the configured capacity is reached.
Assign role should normally be Student, not Teacher or another privileged role.
Enrolment duration controls how long membership remains active after joining.
Decide whether the course needs a key
Leave the enrolment key empty only when every eligible authenticated user may join. A key is a lightweight distribution control for a known cohort; it is not a substitute for authentication, authorization, payment, or identity verification.
Key behavior that often surprises administrators
If the site requires a key, the course method may not save until one is provided.
Use Moodle’s password-policy option for keys and distribute them through an approved channel.
Changing a leaked key affects future enrolments but does not automatically remove existing members.
A blank course key permits enrolment without a key if no other restriction blocks the learner.
Use group enrolment keys only with a master key
Group keys can enrol a learner and place the account directly into an existing course group. Moodle requires a course-level master enrolment key as well; without it, users may enrol without a key and group placement will not work as intended.
A clean group-key design
Create the groups before distributing their keys.
Give each group a unique key.
Enable Use group enrolment keys in the Self enrolment method.
Test both a valid group key and an invalid or blank key with a disposable learner account.
Test as the learner who will use it
Use a normal authenticated test account that is not already enrolled.
Open the course from the same entry point learners receive.
Confirm the enrolment page and Enrol me control appear.
Enter the key if configured and complete enrolment.
Verify the account appears under Participants with an active Student role and the expected group.
Why an administrator is a poor test user
Administrators can access courses without following the learner enrolment path.
An already enrolled account cannot reproduce first-time self-enrolment.
Role switching does not reproduce authentication, account suspension, method eligibility, or all context effects.
A test learner provides an auditable end-to-end result.
Diagnose “You cannot enrol yourself” in order
Plugin unavailable: enable Self enrolment under site enrolment plugins.
Method missing or hidden: add it to the course or open its eye icon.
New enrolments disabled: edit the method rather than merely allowing existing members.
Outside the date window: correct start/end dates or wait for the intended opening.
Course full: increase capacity deliberately or remove an invalid limit.
Wrong role or capability: set the intended Student role and inspect local role changes.
Account already enrolled or suspended: review Participants and enrolment status.
Another method conflicts with policy: payment, cohort, or external enrolment may require a different route.
Security and lifecycle choices
Set an opening window rather than leaving a temporary course permanently open.
Use capacity and expiry settings when licences, supervision, or term dates require them.
Review inactivity-based unenrolment carefully because it can affect progress and reporting.
Rotate exposed keys and audit unexpected enrolments.
Do not use self-enrolment without a key alongside a paid-enrolment method unless free access is intentional.
Primary Moodle references
Current Moodle self-enrolment documentation covers plugin and course configuration.
Enrolment methods explains method management and multiple instances.
Enrolment keys documents course keys, group keys, and global requirements.
Comments and corrections