We are having an issue whereby we are unable to remove students enrolled on a course when using external database enrolments with External unenrol action = Keep user enrolled.
When a user is removed from the external database, the enrolment is kept in Moodle - this is expected because of the External unenrol action = Keep user enrolled. However, we have found that there is no option thereafter to manually remove the enrolment, if we wish to do so on an adhoc basis.
We are on Moodle 3.4 after upgrading over the summer from Moodle 3.2 and seem to remember it working differently. In Moodle 3.2 once the user was removed from the external database, and the enrolment sync script run, the option became available to delete them manually from the course (option did not exist while in the external database), i.e. the student now had an x when viewed in the enrolled users in the course.
Does anyone know how to unenrol a student from a course when they were:
1. Enrolled by external database AND
2. Have the following set in Moodle on the external database enrolment settings: External unenrol action = Keep user enrolled AND
3. Have been removed from the external source database?
Our environment is:
- Moodle 3.4.4+(Build 20180720)
- MariaDB 10.2.16
- PHP 7.1.19
Any help is much appreciated