MDL-81333 core_communication: Coding style fixups

- Remove superflous coverage information
 - Use language string for group room name format
This commit is contained in:
Huong Nguyen 2024-04-09 10:24:05 +07:00
parent 2ec967e12b
commit e168c1d089
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
3 changed files with 5 additions and 3 deletions

View File

@ -559,6 +559,9 @@ class helper {
string $baseroomname,
string $groupname
): string {
return "{$groupname} ({$baseroomname})";
return get_string('communicationgrouproomnameformat', 'core_communication', [
'groupname' => $groupname,
'baseroomname' => $baseroomname,
]);
}
}

View File

@ -223,8 +223,6 @@ class helper_test extends \advanced_testcase {
/**
* Test format_group_room_name.
*
* @covers ::format_group_room_name
*/
public function test_format_group_room_name(): void {
$baseroomname = 'Course A';

View File

@ -29,6 +29,7 @@ $string['communicationroomname'] = 'Room name';
$string['communicationroomnameinfo'] = 'If the field is left blank, the course name is used as the room name.';
$string['communicationroompending'] = 'Your {$a} room will be ready soon.';
$string['communicationroomready'] = 'Your {$a} room is ready.';
$string['communicationgrouproomnameformat'] = '{$a->groupname} ({$a->baseroomname})';
$string['managecommunicationproviders'] = 'Manage communication providers';
$string['nocommunicationinstance'] = 'No communication instance found.';
$string['nocommunicationprovider'] = 'No communication provider found.';