From d7b605be20cd8fa043d228becd00a9605ff851f7 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Wed, 6 Mar 2024 17:00:07 -0500 Subject: [PATCH 1/7] Group: Fix page to add user to group --- public/main/admin/add_users_to_usergroup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/main/admin/add_users_to_usergroup.php b/public/main/admin/add_users_to_usergroup.php index b7d9722755..ba1fdb589e 100644 --- a/public/main/admin/add_users_to_usergroup.php +++ b/public/main/admin/add_users_to_usergroup.php @@ -143,7 +143,7 @@ if (isset($_GET['action']) && 'export' === $_GET['action']) { ['UserName', 'ClassName'], ]; foreach ($users as $user) { - $data[] = [$user['username'], $groupInfo['name']]; + $data[] = [$user['username'], $groupInfo['title']]; } $filename = 'export_user_class_'.api_get_local_time(); Export::arrayToCsv($data, $filename); @@ -345,7 +345,7 @@ echo Display::toolbarAction('add_users', [$actions]); echo ''; -echo Display::page_header($tool_name.': '.$data['name']); +echo Display::page_header($tool_name.': '.$data['title']); ?>
add( + $qb->expr()->orX( + $qb->expr()->eq("$alias.subscriptionVisibility", ':visibility_class'), + $qb->expr()->in("$alias.subscriptionItemId", ':item_id_list') + ) + ); + + $qb->setParameter('visibility_class', CCalendarEvent::SUBSCRIPTION_VISIBILITY_CLASS); + $qb->setParameter('item_id_list', $groupIdList); + } + + $qb + ->orWhere($expr) + ->setParameter(':visibility_all', CCalendarEvent::SUBSCRIPTION_VISIBILITY_ALL) + ; } } From e2d1d8d2f709a604ae98515393363d2a05ba095a Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 7 Mar 2024 01:44:11 -0500 Subject: [PATCH 5/7] Minor: Format code --- src/CoreBundle/Entity/User.php | 9 +++++---- src/CoreBundle/ServiceHelper/CidReqHelper.php | 3 +-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CoreBundle/Entity/User.php b/src/CoreBundle/Entity/User.php index 2d9a8d3bac..c673340621 100644 --- a/src/CoreBundle/Entity/User.php +++ b/src/CoreBundle/Entity/User.php @@ -931,16 +931,17 @@ class User implements UserInterface, EquatableInterface, ResourceInterface, Reso }*/ /** - * Get a bool on whether the user is active or not. Active can be "-1" which means pre-deleted, and is returned as false (not active) + * Get a bool on whether the user is active or not. Active can be "-1" which means pre-deleted, and is returned as false (not active). + * * @return bool True if active = 1, false in any other case (0 = inactive, -1 = predeleted) */ public function getIsActive(): bool { - if ($this->active == 1) { + if (1 == $this->active) { return true; - } else { - return false; } + + return false; } public function isEnabled(): bool diff --git a/src/CoreBundle/ServiceHelper/CidReqHelper.php b/src/CoreBundle/ServiceHelper/CidReqHelper.php index 4218fd8c79..713fcb461b 100644 --- a/src/CoreBundle/ServiceHelper/CidReqHelper.php +++ b/src/CoreBundle/ServiceHelper/CidReqHelper.php @@ -20,8 +20,7 @@ class CidReqHelper { public function __construct( private readonly RequestStack $requestStack, - ) { - } + ) {} private function getRequest(): ?Request { From 9e3721df6e518f3928a24674510ea62e519f4042 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Thu, 7 Mar 2024 04:13:06 -0500 Subject: [PATCH 6/7] Calendar: Fix event information with invitations --- .../ccalendarevent/CCalendarEventInfo.vue | 12 +++--- .../vue/composables/calendar/calendarEvent.js | 38 +++++++++++++++++++ .../ccalendarevent/CCalendarEventList.vue | 19 +++------- .../ApiResource/AbstractResource.php | 5 +++ src/CoreBundle/ApiResource/CalendarEvent.php | 18 ++++++++- .../CalendarEventTransformer.php | 8 ++++ src/CourseBundle/Entity/CCalendarEvent.php | 20 +++++----- 7 files changed, 88 insertions(+), 32 deletions(-) create mode 100644 assets/vue/composables/calendar/calendarEvent.js diff --git a/assets/vue/components/ccalendarevent/CCalendarEventInfo.vue b/assets/vue/components/ccalendarevent/CCalendarEventInfo.vue index c43c3af100..63120f2b72 100644 --- a/assets/vue/components/ccalendarevent/CCalendarEventInfo.vue +++ b/assets/vue/components/ccalendarevent/CCalendarEventInfo.vue @@ -1,5 +1,5 @@