Skip to content

Commit

Permalink
settings: get_groups returns array
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchamp authored Dec 23, 2024
1 parent e81fcae commit 23711ed
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,18 @@
// Only call to the web services and load the setting if the connection is OK.
if (isset($status) && $status === 'connectionok') {
$zoomgroups = [];
$groupobj = zoom_webservice()->get_groups();
if ($groupobj) {
foreach ($groupobj->groups as $group) {
$zoomgroups[$group->id] = $group->name;
}
$groups = zoom_webservice()->get_groups();
foreach ($groups as $group) {
$zoomgroups[$group->id] = $group->name;
}

$protectedgroups = new admin_setting_configmultiselect(
'zoom/protectedgroups',
get_string('protectedgroups', 'mod_zoom'),
get_string('protectedgroups_desc', 'mod_zoom'),
[],
$zoomgroups);
$zoomgroups
);
$settings->add($protectedgroups);
}

Expand Down

0 comments on commit 23711ed

Please sign in to comment.