diff --git a/mod/bigbluebuttonbn/classes/local/helpers/roles.php b/mod/bigbluebuttonbn/classes/local/helpers/roles.php index 5f0ce97f399..5811324805c 100644 --- a/mod/bigbluebuttonbn/classes/local/helpers/roles.php +++ b/mod/bigbluebuttonbn/classes/local/helpers/roles.php @@ -219,8 +219,15 @@ class roles { ]; $data['user'] = [ 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), - 'children' => self::get_users_array($context, $bbactivity), + 'children' => [], ]; + + if (empty($bbactivity)) { + return $data; + } + + $data['user']['children'] = self::get_users_array($context, $bbactivity); + return $data; }