Auto enrolment in Moodle course is useful when you want to save yourself from a lot of manual work. Here’s the use case: an institute offers a course to students. This course has two sections, Section 1 is available for any student while Section 2 is available to students who paid the fees. Let’s see how to do it in simple steps:
Creating Cohorts
Cohort is a site wide group of student in MOODLE. In this case, we want to create only one cohort named “FREE” and it will be the set of student who has a account on MOODLE unless the student is removed from the cohort manually. (when someone pay the fees we will remove him/her from FREE cohort).
You can create cohorts by going to
Site Administration > Users > Accounts > Cohorts
Enable Cohort-sync Enrolment Method in course
Next step is to enable cohort-sync enrolment method in course and select which cohort will sync with this course, this will enroll a student automatically in course if he/she is part of select cohort. Don’t forget to assign role to “student”. There is no need to create groups in course as we will use cohorts for access restriction.
Create Paid section in course
There is nothing known as FREE or Paid section in course but you can decide to allow or restrict access to some sections based on cohort using “Restrict access” option of section.
Create a section and edit its settings. (Make sure to enable edit mode in course to see these options).
FREE section will be available to all students so there is no need to apply any access restriction on free section. Only paid section require access restriction so students from free cohort can not access it. This can be done by following settings
With these three steps now any student whom you add manually in FREE cohort will become student in this course and will get access to all FREE sections and will not be able to access any paid section in the course.
Install Dynamic Cohorts plugin
Final step is to add students in FREE cohort as soon as he/she create an account on website. For this we need to install Dynamic Cohorts plugin. Dynamic cohorts plugin allow to automatically add students to selected cohorts based on some rules.
Create Rule for Dynamic Cohorts
Final step is to create a rule that allow automatically adding a user into dynamic cohorts as soon as he/she creates a account on website. This can be achieved by visitng
Site Administration > Users > Accounts > Dynamic Cohorts > Manage rules
Add a new rule, give it a name, select “FREE” cohort and click on “Add a condition” button.
Create rule with following setting-
Add following condition
With these settings as soon as a user creates an account using email based self registration method, he/she will be added to “FREE” cohort automatically. With the settings given from step 1 to step 3, students from FREE cohorts will be enrolled in the course automatically with cohort-sync enrolment method and they will not get access to paid sections.
In case you are facing any issue or want to implement something more complex on your MOODLE LMS website. We can help, just let us know your requirements and we will implement it for you.