Enrolment: Course completed enrolment

Maintained by Renaat Renaat Debleu
Enrol users upon completion of a course.
280 sites
29 fans

With this plugin it is possible to create a chain of courses. After completion of a course, the student is automatically enrolled in one or more other courses. But it is also possible to give a user another role in the same course when he/she completes the course.


As a teacher go to the course in which students will be enrolled in the future.  Navigate to Course Administration > Users > Enrollment Methods and add the Course Completed Enrollment method. Fill in the role - duration - start date - end date, and search for the course that needs to be completed.  Save your changes and do an extra check if course completion is enabled and working in the required course.

Sample use

If you want to enroll users in course2 after they complete course1, you have to add the enrolment method to course2 and choose course1 as the course parameter.

If you want to enroll users in course2 and coure3 after they complete course1, you have to add the enrolment method to course2 and course3, with course1 as the course parameter.

If you want to enroll users in course3 after they complete course1 OR course2,  you have to add 2 instances to course3, one with course1 as requirement, one with course2 as requirement.

If you want to enroll users in course 3 after they complete course1 AND course2,  you can add the enrolment method to course3 and choose course2 as the course parameter. Add in course2 the completion of course1 (course completion - Condition: Completion of other courses) as a course completion requirement.

If you want to give a user a new role in a course1, add the enrolment method to course1, choose course1 as the course parameter and pick the new role for the participant.


  • copy the content of the package into the enrol/coursecompleted directory under the root of Moodle.
  • log in as administrator and complete the installation
  • enable the plugin under Settings, Site administration, Plugins, Enrolments
  • configure the default settings for this enrolment method when it is added to a course
Read the Plugin installation guide for complete steps about installing a new plugin in Moodle.



Screenshot #0
Screenshot #1


Renaat Debleu (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Renaat
    Fri, 9 Feb 2018, 12:10 AM
    With the plugin only, you cannot, because it is an OR situation.

    But in core Moodle it is possible to make the completion of course 2 dependent on the completion of other courses (course completion - Condition: Completion of other courses). So, you make the completion of course 2 dependent on the completion of course 1, and add the plugin to course 3 with course 2 as parameter. So as long as course 1 is not finished, course 2 will not be considered completed and the user will not be enrolled. The moment both course 1 and course 2 are completed, the user will be enrolled into course 3.
  • Picture of Talita Uys
    Mon, 12 Feb 2018, 2:28 PM
    Thanks, Renaat Debleu, been hoping and praying for something like this for a while. Much less complicated than using cohorts and learning plans. Just installed, set-up and tested the process and it works beautifully.
  • Picture of Sami Atieh
    Wed, 14 Mar 2018, 1:01 AM
    Does the course have to have a start and end date? Can a student complete all of the activities in a course, then be enrolled into the next course?
  • Renaat
    Wed, 14 Mar 2018, 4:36 PM
    Hello Sami,

    the course does not need a start or end date. Please read https://docs.moodle.org/34/en/Course_completion where all reasons why a student can complete a course are listed.
  • Picture of Uriel Vázquez Ríos
    Thu, 17 May 2018, 1:55 AM
    He hecho lo que se sugiere, sin embargo el curso no se bloquea cuando un usuario no ha terminado, me podrian indicar cual es el problema?
  • Renaat
    Thu, 17 May 2018, 10:54 AM
    Bloquear el acceso a un curso? La idea es precisamente dar acceso a otros cursos. Pero si el usuario ya tiene acceso al curso como visitante, o porque ha pagado, no se bloqueará.
  • Picture of Uriel Vázquez Ríos
    Sat, 19 May 2018, 12:43 AM
    Muchas gracias por la información, en realidad lo dije mal. Te cuento, la situación es que el usuario se matricula en el curso b, pero despues de aprox 5 minutos, no lo hace inmediatamente, sabes que puuede ser?
  • Picture of Uther Roi
    Thu, 24 May 2018, 8:09 PM
    Hello, is there a way with this plugin to enrol a student in a cohort depending on the quizz result/grade
  • Renaat
    Fri, 25 May 2018, 3:30 PM

    Nunca sera immediatemente. Pero hay 2 cosas para acelerar el processo:
    1. Cron cada minuto
    2. Cambiar el valor de 'priority' en enrol/coursecompleted/db/events.php de 50 a 999
  • Picture of Progchin M Lover
    Thu, 19 Jul 2018, 3:46 PM
    Hi. I installed this plugin but i cannot make it do what it was supposed to do.
    I followed instruction but it doesn't work.
    I wanted that the student who will have completed activity x of the course A will be automatically unenrolled to course A and enrolled automatically to course B.
    Unfortunately, all the students who have completed activity x (which is feedback for my case) are still enrolled in course A.
    In course B settings, I add enrolment method (after completing course A), but it doesn't seem to work.
    What did i miss?
  • Renaat
    Thu, 19 Jul 2018, 4:41 PM
    Hello Jimmy,

    this plugin is called enrolment upon course completion and NOT enrolment upon activity completion. While the 2 are related, they are not the same. Please check Moodle docs about course completion (https://docs.moodle.org/35/en/Course_completion_settings) to have the enrolment working:

    All you have to do is:
    - Course A: enable course completion
    - Course A: configure course completion when students complete the feedback

    As a result, all users who complete the feedback will complete the course, and a bit later they will be enrolled automatically in course B.

  • Picture of Sarah Ruth Finkel
    Wed, 24 Oct 2018, 1:13 AM
    Hi Renaat,

    Thank you for this plugin! I did notice an issue with my use case and I'm not sure it's a bug but wanted to let you know about it.

    I have Courses (1-8) and a separate certification course which should only be accessible if students complete all 8 courses. The certification course includes a brief required survey that needs to be completed before receiving the certification. Also, the client wants the courses to be accessible non-sequentially.

    Following your instructions, I activated your plugin in the certification course and made the pre-requisite Course #1. In Course #1, I activated course completion dependent on the completion of all other courses (#2-8). I did this because when I activated your plugin, I noticed that it took a while for the enrollment to kick in so I decided to place the course completion requirements in Course 1. I tested the timing of the enrollment by both manually running the cron and testing setting the cron to run every minute. In each situation, it took about 5+ minutes for the enrollment to happen. Perhaps I am reaching the limit of # of courses able to be set for course completion because in your examples, it's only about 3 levels, not 8.

    Also, we have a custom certificate plugin for the certificate. I noticed that once users were automatically enrolled in the certificate course via this plugin, they received the certificate automatically bypassing the restrictions set on the certificate activity that requires them to complete the survey first. I was able to confirm this by looking at the logs.

    For now, I've had to disable the plugin for this use case. Perhaps I set up something incorrectly? Any tips or suggestions? I think it's a great plugin and thank you for it!

  • Renaat
    Wed, 24 Oct 2018, 6:00 PM
    Hello Sarah,

    I think the problem seems to be with the fact that your client wants the courses to be accessible non-sequential. The enrolment is not the problem, but the availability. So this enrolment plugin is not the right solution for your problems.

    I would solve your problem this way:
    - enrol all users in all courses
    - enable course completion in all courses
    - in the certification course:
    + make the completion of this course happen when the users have completed all other courses (AND condition)
    + use the availabiltiy_coursecompleted plugin (https://moodle.org/plugins/availability_coursecompleted) to show the survey only when they have completed the course
    + use the standard availability_completion plugin to show the certificate only when they finish the survey
    As a result, people can access all courses, the survey will only be visible when they completed all courses, and the certificate will only be accessible when they complete the survey.


  • Picture of Eduardo García Blanco
    Tue, 6 Nov 2018, 4:38 PM
    Justo lo que andaba buscando. Solo una pregunta... ¿Se contempla la opción de desmatricular del curso anterior una vez matriculado en el nuevo? Si no es así quizás sea interesante para una nueva versión.
  • Renaat
    Tue, 6 Nov 2018, 5:53 PM
    Hello Eduardo,

    THX for your message.

    I'm not convinced about adding an unroll option: the un-enrolment of a user is a complete different thing with lots of strings attached. Let's say someone payed for a course, the person finishes the course and the plugin starts to do the job, here we do not want that the payment is cancelled! The moment I would add un-enrolment support, I would need to add support for all possible enrolment methods (database - profile field - cohorts - ....) and this is far more complicated than one man can handle.

    In your case I would write a local plugin or modify your theme to do the un-enrolment in the background. In one specific environment where you know all enrolment methods, this can work fine.

1 2
Please login to post comments