Completion Auto-Suspend
Automatically switch a student's enrolment from active to suspended the moment they complete a course — with a premium dashboard to control exactly which courses and categories it applies to. See the plugin archive for release-specific requirements and feature availability.
⭐ Why this plugin is unlike anything else available
Automatically manages enrolment lifecycle on course completion
▸ No native Moodle enrolment plugin responds to course completion events. When a learner finishes a course, their enrolment stays active indefinitely — they keep full access, seat licenses remain consumed, and rosters become cluttered with past completions. Completion Auto-Suspend bridges 'finished learning' to 'end of enrolment' automatically, no manual action required.
▸ Event-driven suspension: a course-completion event triggers suspension immediately, and a scheduled reconciliation task catches any completions the event missed.
▸ Generates a completion suspension log accessible to admins. Every suspension is recorded with the learner, course, completion date, and suspension date — audit trail without manual tracking.
- Moodle → Site administration → Plugins → Install plugins → upload the ZIP.
- Validate and upgrade the database.
- Open Site administration → Plugins → Local plugins → Completion Auto-Suspend.
Requires course completion enabled and Moodle cron running (for backfill and re-activation).
A course is in scope if either:
- it is selected directly on the Courses tab, or
- it belongs to a selected category. With Include sub-categories on, a course also qualifies when any ancestor category is selected.
Category scope is evaluated live, so new courses created later inside an enabled category are covered automatically.
Master switch — nothing runs until it is on.
Courses / Categories tabs — live search and per-item toggles, with enrolment and completion counts.
Activity tab — a live audit log, plus Run reconciliation now.
Settings tab — the behaviour switches below.
| Setting | Default | What it does |
|---|---|---|
| Enable Completion Auto-Suspend (master) | Off | Master switch. While off, no enrolments are ever changed. |
| Never suspend teachers, managers or admins | On | Skips anyone who can edit the course (moodle/course:update) — completing a course never suspends staff. |
| Re-activate on completion reset | On | If completion is reset/removed, switch the plugin-suspended enrolments back to active. |
| Include sub-categories | On | When a category is selected, also apply to courses in all of its sub-categories. |
| Retroactively suspend already-completed | On | The scheduled task suspends students who completed before the course was enabled. |
| Simulation mode (dry run) | Off | Log what would happen without changing any enrolment. |
Immediate: an observer on \core\event\course_completed suspends via each method's update_user_enrol().
Reconcile task (every 30 min): retroactive backfill and auto re-activation on completion reset.
Data: local_completionsuspend_target (selections) and local_completionsuspend_log (audit trail).
Access is controlled by local/completionsuspend:manage (Managers by default). A full privacy provider covers GDPR export and deletion of the audit log.
This is a utility plugin — it consumes no AI credits and makes no portal API calls. It appears in the Quick Links block under the Manage dropdown.
