I would like to know under what conditions Database Enrolment appears under the list of enrolment methods for a course.
I understand that Database never appears as an option from the drop-down of selectable methods to add to a course. This is explained here: https://docs.moodle.org/25/en/External_database_enrolment#Database_enrolment_does_not_appear_in_the_course_enrolment_drop_down_menu._Why.3F
But in some courses, Database appears under the list of active enrolment methods and in others it doesn't. I can see in the code that this is based on finding a record in the mdl_enrol table (matching the course id and method) - but can't find the point at which this would have been added.
My guess is that it appears whenever there has been at least one student enrolled to the course through the external database. Can anyone confirm if that's correct?