Skip to content

Commit

Permalink
fix room membership
Browse files Browse the repository at this point in the history
  • Loading branch information
mickhawkins committed Oct 5, 2023
1 parent 77d46ed commit 499dfd7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2530,10 +2530,19 @@ function update_course($data, $editoroptions = NULL) {
instanceid: $data->id,
provider: $provider,
);

$addusersrequired = true;
$queuememberstask = false;
} else if ($addusersrequired) {
// For providers that already exist, add members to the room if required.
// Newly created providers automatically add members.
$communication->add_members_to_room($enrolledusers);
// Existing room that requires users can queue the members task now.
$queuememberstask = true;
}

// Complete room membership tasks if required.
// Newly created providers complete the user mapping but do not queue the task
// (it will be handled by the room creation task).
if ($addusersrequired) {
$communication->add_members_to_room($enrolledusers, $queuememberstask);
}
}
}
Expand Down

0 comments on commit 499dfd7

Please sign in to comment.