Skip to content

Commit

Permalink
adds unenrolment notification back in.
Browse files Browse the repository at this point in the history
  • Loading branch information
stopfstedt committed Oct 1, 2024
1 parent d3a5518 commit 134c4d5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 134c4d5

Please sign in to comment.