Skip to content

Commit

Permalink
Merge pull request #55 from stopfstedt/52_check_offering_instructor_g…
Browse files Browse the repository at this point in the history
…roups_during_instructor_sync

check offering instructor groups before falling back to default instructors during sync.
  • Loading branch information
stopfstedt authored Oct 1, 2024
2 parents 255444d + b7523d0 commit ca7fefb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ private function get_instructor_ids_from_group($grouptype, $groupid): array {
$offerings = $apiclient->get_by_ids($accesstoken, 'offerings', $group->offerings);

foreach ($offerings as $offering) {
if (empty($offering->instructors)) {
if (empty($offering->instructors) && empty($offering->instructorGroups)) {
// No instructor AND no instructor groups have been set for this offering.
// Fall back to the default instructors/instructor-groups defined for the learner group.
$instructorids = array_merge($instructorids, $group->instructors);
Expand Down

0 comments on commit ca7fefb

Please sign in to comment.