From 134c4d59152633657606ba0b05f852a77de891ae Mon Sep 17 00:00:00 2001 From: Stefan Topfstedt Date: Tue, 1 Oct 2024 10:49:33 -0700 Subject: [PATCH] adds unenrolment notification back in. --- lib.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib.php b/lib.php index 9887ea3..5f6593b 100644 --- a/lib.php +++ b/lib.php @@ -382,6 +382,16 @@ public function sync($trace, $courseid = null): int { $this->update_user_enrol($instance, $ue->userid, ENROL_USER_SUSPENDED); } + // Unenrol as necessary. + $trace->output( + "Unenrolling users from Course ID " + . $instance->courseid." with Role ID " + . $instance->roleid + . " that no longer associate with Ilios Sync ID " + . $instance->id + . "." + ); + $sql = "SELECT ue.* FROM {user_enrolments} ue WHERE ue.enrolid = $instance->id";