From 71727a616ed54732c2c4366ff064e88ac2d42897 Mon Sep 17 00:00:00 2001 From: Hana Zaraa Date: Mon, 24 Jul 2023 15:20:08 +0100 Subject: [PATCH] Breakout rooms Group --- bbbeasy-backend/app/src/Data/PresetData.php | 11 +++++++++-- .../app/src/Enum/Presets/BreakoutRooms.php | 2 +- bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php | 2 +- .../app/src/Enum/Presets/LearningDashboard.php | 2 +- bbbeasy-backend/app/src/Enum/Presets/LockSettings.php | 2 +- .../app/src/Enum/Presets/UserExperience.php | 2 +- bbbeasy-backend/app/src/Utils/PresetProcessor.php | 3 ++- 7 files changed, 16 insertions(+), 8 deletions(-) diff --git a/bbbeasy-backend/app/src/Data/PresetData.php b/bbbeasy-backend/app/src/Data/PresetData.php index 351354fb..08aaf1cb 100644 --- a/bbbeasy-backend/app/src/Data/PresetData.php +++ b/bbbeasy-backend/app/src/Data/PresetData.php @@ -22,15 +22,22 @@ namespace Data; + + class PresetData { private array $data = []; public function setData($category, $subCategory, $value): void { - if (null !== $value || (\is_string($value) && !empty($value))) { - $this->data[$category][$subCategory] = $value; + + + if ( is_string($value) && empty($value) ) { + $value=null; } + + $this->data[$category][$subCategory] = $value; + } public function getData($category, $subCategory) diff --git a/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php b/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php index 0d431865..0f401dc3 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php +++ b/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php @@ -26,7 +26,7 @@ class BreakoutRooms extends Enum { - public const GROUP_NAME = 'BreakoutRooms'; + public const GROUP_NAME = 'Breakout Rooms'; public const CONFIGURABLE = 'configurable'; public const PRIVATE_CHAT = 'private_chat'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php b/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php index d5c8a2ee..75b68791 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php +++ b/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php @@ -26,7 +26,7 @@ class GuestPolicy extends Enum { - public const GROUP_NAME = 'GuestPolicy'; + public const GROUP_NAME = 'Guest Policy'; public const CONFIGURABLE = 'configurable'; public const POLICY = 'policy'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php b/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php index b5985146..15a3f487 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php +++ b/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php @@ -26,7 +26,7 @@ class LearningDashboard extends Enum { - public const GROUP_NAME = 'LearningDashboard'; + public const GROUP_NAME = 'Learning Dashboard'; public const CONFIGURABLE = 'configurable'; public const CLEANUP_DELAY = 'cleanup_delay'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php b/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php index 77de4f42..4ac2b6e1 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php +++ b/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php @@ -26,7 +26,7 @@ class LockSettings extends Enum { - public const GROUP_NAME = 'LockSettings'; + public const GROUP_NAME = 'Lock Settings'; public const WEBCAMS = 'webcams'; public const MICROPHONES = 'microphones'; public const PRIVATE_CHAT = 'private_chat'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php b/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php index 185b7128..acfcb972 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php +++ b/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php @@ -26,7 +26,7 @@ class UserExperience extends Enum { - public const GROUP_NAME = 'UserExperience'; + public const GROUP_NAME = 'User Experience'; public const KEYBOARD_SHORTCUTS = 'keyboard_shortcuts'; public const ASK_FOR_FEEDBACK = 'ask_for_feedback'; diff --git a/bbbeasy-backend/app/src/Utils/PresetProcessor.php b/bbbeasy-backend/app/src/Utils/PresetProcessor.php index 15127b5c..6f8c98b9 100644 --- a/bbbeasy-backend/app/src/Utils/PresetProcessor.php +++ b/bbbeasy-backend/app/src/Utils/PresetProcessor.php @@ -108,7 +108,8 @@ public function toCreateMeetingParams($preset, $createParams) // $createParams->setUseAvatars($presetsData->getData(Branding::GROUP_NAME, Branding::USE_AVATARS)); $createParams->setBreakoutRoomsEnabled($presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::CONFIGURABLE)); - $createParams->setBreakoutRoomsRecord($presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::RECORDING)); + + $createParams->setBreakoutRoomsRecord(null !== $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::RECORDING) ? $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::RECORDING) : true); $createParams->setBreakoutRoomsPrivateChatEnabled(null !== $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::PRIVATE_CHAT) ? $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::PRIVATE_CHAT) : true);