From d4fdf32c4144fc512a597dd014e6ba5616ac96ba Mon Sep 17 00:00:00 2001 From: Alan McCoy Date: Thu, 11 Jan 2024 15:55:33 -0500 Subject: [PATCH 1/2] Display user first/last name in breakout room participants selector --- mod_form.php | 2 +- templates/breakoutrooms_room_data.mustache | 2 +- templates/breakoutrooms_room_datatoclone.mustache | 2 +- templates/breakoutrooms_room_participants.mustache | 4 ++-- templates/breakoutrooms_rooms.mustache | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mod_form.php b/mod_form.php index 3441f7d6..5cce761a 100644 --- a/mod_form.php +++ b/mod_form.php @@ -422,7 +422,7 @@ public function definition() { // Getting Course participants. $courseparticipants = []; foreach ($participants as $participant) { - $courseparticipants[] = ['participantid' => $participant->id, 'participantemail' => $participant->email]; + $courseparticipants[] = ['participantid' => $participant->id, 'participantname' => $participant->firstname . ' ' . $participant->lastname]; } // Getting Course groups. diff --git a/templates/breakoutrooms_room_data.mustache b/templates/breakoutrooms_room_data.mustache index 91976615..1cbe4603 100644 --- a/templates/breakoutrooms_room_data.mustache +++ b/templates/breakoutrooms_room_data.mustache @@ -30,7 +30,7 @@ "courseparticipants": [ { "participantid": "2", - "participantemail": "p@example.com", + "participantname": "John Doe", "selected": true } ], diff --git a/templates/breakoutrooms_room_datatoclone.mustache b/templates/breakoutrooms_room_datatoclone.mustache index 64f9e076..23b43418 100644 --- a/templates/breakoutrooms_room_datatoclone.mustache +++ b/templates/breakoutrooms_room_datatoclone.mustache @@ -30,7 +30,7 @@ "courseparticipants": [ { "participantid": "2", - "participantemail": "p@example.com", + "participantname": "John Doe", "selected": true } ], diff --git a/templates/breakoutrooms_room_participants.mustache b/templates/breakoutrooms_room_participants.mustache index ca5e613f..2868b7df 100644 --- a/templates/breakoutrooms_room_participants.mustache +++ b/templates/breakoutrooms_room_participants.mustache @@ -29,7 +29,7 @@ "courseparticipants": [ { "participantid": "2", - "participantemail": "a@example.com", + "participantname": "John Doe", "selected": true } ] @@ -39,7 +39,7 @@
diff --git a/templates/breakoutrooms_rooms.mustache b/templates/breakoutrooms_rooms.mustache index 815f200b..16540b41 100644 --- a/templates/breakoutrooms_rooms.mustache +++ b/templates/breakoutrooms_rooms.mustache @@ -33,7 +33,7 @@ "courseparticipants": [ { "participantid": "2", - "participantemail": "p@example.com", + "participantname": "John Doe", "selected": true } ], @@ -52,7 +52,7 @@ "courseparticipants": [ { "participantid": "2", - "participantemail": "p@example.com" + "participantname": "John Doe", } ], "coursegroups": [ From 3a362ff216c4d8e60675f13b4409e47eb12e2cba Mon Sep 17 00:00:00 2001 From: Jonathan Champ Date: Thu, 18 Jan 2024 12:01:37 -0500 Subject: [PATCH 2/2] breakout rooms: use fullname(); fix JSON trailing comma --- mod_form.php | 5 ++++- templates/breakoutrooms_rooms.mustache | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mod_form.php b/mod_form.php index 5cce761a..77174495 100644 --- a/mod_form.php +++ b/mod_form.php @@ -422,7 +422,10 @@ public function definition() { // Getting Course participants. $courseparticipants = []; foreach ($participants as $participant) { - $courseparticipants[] = ['participantid' => $participant->id, 'participantname' => $participant->firstname . ' ' . $participant->lastname]; + $courseparticipants[] = [ + 'participantid' => $participant->id, + 'participantname' => fullname($participant) . ' <' . $participant->email . '>', + ]; } // Getting Course groups. diff --git a/templates/breakoutrooms_rooms.mustache b/templates/breakoutrooms_rooms.mustache index 16540b41..60d332be 100644 --- a/templates/breakoutrooms_rooms.mustache +++ b/templates/breakoutrooms_rooms.mustache @@ -52,7 +52,7 @@ "courseparticipants": [ { "participantid": "2", - "participantname": "John Doe", + "participantname": "John Doe" } ], "coursegroups": [