user was automatically added just after creating a new course

user was automatically added just after creating a new course

by Jerry Lau -
Number of replies: 1

Hello folks.

We are on moodle 3.9.x

We just created a new shell, and it has already enrolled one student via the auto-enrol.  It happened instantly.  Not overnight using our external database enrolment. 

 If the script runs once a day, at night, how could this have happened? 

My guess is that the enrolments were already there even before the course was created and at the fraction of the second once the course is created and shortly thereafter, a subroutine scans to see if there are any users that are already in the system and which course id they are enrolled in once they click on "Apply | Save | Create or similar" when they create the course correct?

Average of ratings: -
In reply to Jerry Lau

Re: user was automatically added just after creating a new course

by Randy Thornton -
Picture of Documentation writers
Jerry,

By "via the auto-enrol" do you mean you are using one of the auto enrol plugins such as https://moodle.org/plugins/enrol_autoenrol or https://moodle.org/plugins/enrol_auto ? If so, that would make sense.

When you create a new course shell, what enrolment methods are already included in it by default? Was this created from scratch or by copying a template course? Either way, I would look into the settings for the enrolment method that your first user used to get enrolled.