Skip to content

Commit

Permalink
Merge pull request #562 from armccoy/fix/breakout-human-names
Browse files Browse the repository at this point in the history
Display user first/last name in breakout room participants selector
  • Loading branch information
jrchamp authored Jan 19, 2024
2 parents 54313db + 3a362ff commit 090eb08
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
5 changes: 4 additions & 1 deletion mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,10 @@ public function definition() {
// Getting Course participants.
$courseparticipants = [];
foreach ($participants as $participant) {
$courseparticipants[] = ['participantid' => $participant->id, 'participantemail' => $participant->email];
$courseparticipants[] = [
'participantid' => $participant->id,
'participantname' => fullname($participant) . ' <' . $participant->email . '>',
];
}

// Getting Course groups.
Expand Down
2 changes: 1 addition & 1 deletion templates/breakoutrooms_room_data.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"courseparticipants": [
{
"participantid": "2",
"participantemail": "[email protected]",
"participantname": "John Doe",
"selected": true
}
],
Expand Down
2 changes: 1 addition & 1 deletion templates/breakoutrooms_room_datatoclone.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"courseparticipants": [
{
"participantid": "2",
"participantemail": "[email protected]",
"participantname": "John Doe",
"selected": true
}
],
Expand Down
4 changes: 2 additions & 2 deletions templates/breakoutrooms_room_participants.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"courseparticipants": [
{
"participantid": "2",
"participantemail": "[email protected]",
"participantname": "John Doe",
"selected": true
}
]
Expand All @@ -39,7 +39,7 @@
<div class="card-body">
<select id="participants-{{roomid}}" class="room-participants" name="{{toclone}}roomsparticipants[{{roomid}}][]" multiple>
{{#courseparticipants}}
<option value="{{participantid}}" {{#selected}}selected{{/selected}}>{{participantemail}}</option>
<option value="{{participantid}}" {{#selected}}selected{{/selected}}>{{participantname}}</option>
{{/courseparticipants}}
</select>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/breakoutrooms_rooms.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"courseparticipants": [
{
"participantid": "2",
"participantemail": "[email protected]",
"participantname": "John Doe",
"selected": true
}
],
Expand All @@ -52,7 +52,7 @@
"courseparticipants": [
{
"participantid": "2",
"participantemail": "[email protected]"
"participantname": "John Doe"
}
],
"coursegroups": [
Expand Down

0 comments on commit 090eb08

Please sign in to comment.