From e743ac6d28a811a62e52e8a96264d084e7f0f763 Mon Sep 17 00:00:00 2001 From: Anders Rasmussen Date: Tue, 18 Mar 2025 11:31:49 +0100 Subject: [PATCH] MDL-84112 bigbluebuttonbn: Added user output only if bbactivity is set --- mod/bigbluebuttonbn/classes/local/helpers/roles.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; }