MDL-79100 core_communication: Update communication-related lang strings

This commit is contained in:
meirzamoodle 2023-09-08 09:31:51 +07:00
parent 83b4c96cad
commit 6246db3d30
11 changed files with 35 additions and 31 deletions

View File

@ -259,7 +259,7 @@ if ($hassiteconfig or has_any_capability($capabilities, $systemcontext)) {
get_enabled_providers_and_default();
$temp->add(new admin_setting_configselect('moodlecourse/coursecommunicationprovider',
new lang_string('seleccommunicationprovider', 'communication'),
new lang_string('selectcommunicationprovider', 'communication'),
new lang_string('coursecommunication_desc', 'course'),
$defaulprovider, $communicationproviders));

View File

@ -207,11 +207,11 @@ class api {
$mform->addElement(
'select',
'selectedcommunication',
get_string('seleccommunicationprovider', 'communication'),
get_string('selectcommunicationprovider', 'communication'),
$communicationproviders,
['data-communicationchooser-field' => 'selector'],
);
$mform->addHelpButton('selectedcommunication', 'seleccommunicationprovider', 'communication');
$mform->addHelpButton('selectedcommunication', 'selectcommunicationprovider', 'communication');
$mform->setDefault('selectedcommunication', $defaulprovider);
$mform->registerNoSubmitButton('updatecommunicationprovider');
@ -245,9 +245,18 @@ class api {
),
'addcommunicationoptionshere'
);
$mform->addHelpButton('communicationroomname', 'communicationroomname', 'communication');
$mform->setType('communicationroomname', PARAM_TEXT);
$mform->insertElementBefore(
$mform->createElement(
'static',
'communicationroomnameinfo',
'',
get_string('communicationroomnameinfo', 'communication'),
),
'addcommunicationoptionshere',
);
processor::set_provider_specific_form_definition($provider, $mform);
}
}

View File

@ -23,9 +23,9 @@ Feature: Communication custom link
Given I am on the "Course 1" "Course" page logged in as "teacher1"
And "Chat to course participants" "button" should not be visible
When I navigate to "Communication" in current page administration
And the "Communication service" select box should contain "Custom link"
And the "Provider" select box should contain "Custom link"
And I should not see "Custom link URL"
And I select "Custom link" from the "Communication service" singleselect
And I select "Custom link" from the "Provider" singleselect
And I should see "Custom link URL"
And I set the following fields to these values:
| communicationroomname | Test URL |
@ -57,7 +57,7 @@ Feature: Communication custom link
Given I am on the "Course 1" "Course" page logged in as "teacher1"
And "Chat to course participants" "button" should not be visible
When I navigate to "Communication" in current page administration
And I select "Custom link" from the "Communication service" singleselect
And I select "Custom link" from the "Provider" singleselect
And I set the following fields to these values:
| communicationroomname | Test URL |
| customlinkurl | #wwwroot#/communication/provider/customlink/tests/behat/fixtures/custom_link_test_page.php |
@ -65,14 +65,14 @@ Feature: Communication custom link
And "Chat to course participants" "button" should be visible
And I run all adhoc tasks
And I navigate to "Communication" in current page administration
And I select "None" from the "Communication service" singleselect
And I select "None" from the "Provider" singleselect
And I press "Save changes"
And "Chat to course participants" "button" should not be visible
And I run all adhoc tasks
And I am on the "Course 1" course page
And "Chat to course participants" "button" should not be visible
And I navigate to "Communication" in current page administration
And I select "Custom link" from the "Communication service" singleselect
And I select "Custom link" from the "Provider" singleselect
And I set the following fields to these values:
| communicationroomname | Test URL |
| customlinkurl | #wwwroot#/communication/provider/customlink/tests/behat/fixtures/custom_link_test_page.php |

View File

@ -94,7 +94,7 @@ class matrix_user_manager {
public static function get_formatted_matrix_home_server(): string {
$homeserver = get_config('communication_matrix', 'matrixhomeserverurl');
if ($homeserver === false) {
throw new \moodle_exception('Unknown matrix home server url');
throw new \moodle_exception('Unknown matrix homeserver url');
}
$homeserver = parse_url($homeserver)['host'];
@ -150,8 +150,6 @@ class matrix_user_manager {
'shortname' => 'matrixuserid',
'name' => get_string('matrixuserid', 'communication_matrix'),
'datatype' => 'text',
'description' => get_string('matrixuserid_desc', 'communication_matrix'),
'descriptionformat' => 1,
'categoryid' => $categoryid,
'forceunique' => 1,
'visible' => 0,

View File

@ -24,17 +24,15 @@
$string['cachedef_serverversions'] = 'Matrix server version information for running servers';
$string['matrixuserid'] = 'Matrix user ID';
$string['matrixuserid_desc'] = 'The user ID to be used for Matrix';
$string['matrixhomeserverurl'] = 'Home server URL';
$string['matrixhomeserverurl_desc'] = 'The URL of the Synapse home server to connect to, for user and room creation.';
$string['matrixhomeserverurl'] = 'Homeserver URL';
$string['matrixhomeserverurl_desc'] = 'The URL of the Synapse homeserver to connect to, for user and room creation.';
$string['matrixaccesstoken'] = 'Access token';
$string['matrixaccesstoken_desc'] = 'Admin access token to authenticate against the Synapse Home server.';
$string['matrixaccesstoken_desc'] = 'Access token for the account which will perform actions on the homeserver.';
$string['matrixrefreshtoken'] = 'Refresh token';
$string['matrixrefreshtoken_desc'] = 'Admin refresh token to associated with the access token.';
$string['matrixelementurl'] = 'Element web URL';
$string['matrixelementurl_desc'] = 'The URL to Element Web instance.';
$string['matrixroomtopic'] = 'Room topic';
$string['matrixroomtopic_help'] = 'A short description of what this room is for.';
$string['matrix:moderator'] = 'Matrix moderator';
$string['pluginname'] = 'Matrix';
$string['privacy:metadata'] = 'Matrix communication plugin does not store any personal data.';
$string['privacy:metadata'] = 'The Matrix communication plugin does not store any personal data.';

View File

@ -42,6 +42,5 @@ if ($hassiteconfig) {
// Element web URL.
$name = new lang_string('matrixelementurl', 'communication_matrix');
$desc = new lang_string('matrixelementurl_desc', 'communication_matrix');
$settings->add(new admin_setting_requiredtext('communication_matrix/matrixelementurl', $name, $desc, ''));
$settings->add(new admin_setting_requiredtext('communication_matrix/matrixelementurl', $name, '', ''));
}

View File

@ -31,10 +31,10 @@ Feature: Display communication room status banner
# Then I should see "Your Matrix room is ready!" in the "page-content" "region"
# # This is a one time message per user.
# When I reload the page
# Then I should not see "Your Matrix room is ready!" in the "page-content" "region"
# Then I should not see "Your Matrix room is ready." in the "page-content" "region"
# # Not for students to see.
# When I am on the "Test course" "Course" page logged in as "student1"
# Then I should not see "Your Matrix room is ready!" in the "page-content" "region"
# Then I should not see "Your Matrix room is ready." in the "page-content" "region"
Scenario: Enabling or disabling the matrix plugin hides the banner accordingly
Given I am on the "Test course" "Course" page logged in as "teacher1"

View File

@ -20,9 +20,9 @@ Feature: Course communication
| Course short name | C2 |
And I press "Save and display"
When I navigate to "Communication" in current page administration
Then the field "Communication service" matches value "None"
Then the field "Provider" matches value "None"
Scenario: I should have communication disabled by default for existing courses
Given I am on "Course 1" course homepage
When I navigate to "Communication" in current page administration
Then the field "Communication service" matches value "None"
Then the field "Provider" matches value "None"

View File

@ -585,8 +585,8 @@ $string['enableanalytics'] = 'Analytics';
$string['enableblogs'] = 'Enable blogs';
$string['enablecalendarexport'] = 'Enable calendar export';
$string['enablecomments'] = 'Enable comments';
$string['enablecommunicationsubsystem'] = 'Enable communication subsystem';
$string['enablecommunicationsubsystem_desc'] = 'This setting enables the new communication subsystem. This new subsystem allow teachers and students to more easily communicate while using Moodle for teaching and learning';
$string['enablecommunicationsubsystem'] = 'Enable communication providers';
$string['enablecommunicationsubsystem_desc'] = 'Allow integration with communication providers such as Matrix so teachers and students can communicate more easily. You can manage these integrations in <a href="settings.php?section=managecommunicationproviders">Plugins</a>.';
$string['enablecourserelativedates'] = 'Enable course relative dates';
$string['enablecourserelativedates_desc'] = 'Allow courses to be set up to display dates relative to the user\'s start date in the course.';
$string['enablecourserequests'] = 'Enable course requests';

View File

@ -26,9 +26,9 @@ $string['communication'] = 'Communication';
$string['communicationdisabled'] = 'Communication is disabled.';
$string['communicationprovidernotfound'] = 'The \'{$a}\' communication provider doesn\'t exist or is not recognised.';
$string['communicationroomname'] = 'Room name';
$string['communicationroomname_help'] = 'The name that participants see when they visit the room. If you leave this blank, a default room name will be automatically set.';
$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['communicationroomready'] = 'Your {$a} room is ready.';
$string['managecommunicationproviders'] = 'Manage communication providers';
$string['nocommunicationinstance'] = 'No communication instance found.';
$string['nocommunicationprovider'] = 'No communication provider found.';
@ -37,5 +37,5 @@ $string['privacy:metadata:communication_user'] = 'The communication user table s
$string['privacy:metadata:communication_user:commid'] = 'The communication ID for user mapping';
$string['privacy:metadata:communication_user:userid'] = 'The user ID for communication provider mapping for users';
$string['privacy:metadata:communication_user:synced'] = 'The user is synced with the provider or not';
$string['seleccommunicationprovider'] = 'Communication service';
$string['seleccommunicationprovider_help'] = 'The tool available for chat and related communication methods.';
$string['selectcommunicationprovider'] = 'Provider';
$string['selectcommunicationprovider_help'] = 'The tool available for chat and related communication methods.';

View File

@ -65,7 +65,7 @@ $string['completion_setby:manual:markdone'] = '{$a->activityname} is marked by {
$string['completionrequirements'] = 'Completion requirements for {$a}';
$string['courseaccess'] = 'Course access';
$string['coursealreadyfinished'] = 'Course already finished';
$string['coursecommunication_desc'] = 'The default communication service for new courses. Existing courses will not have any default provider selected.';
$string['coursecommunication_desc'] = 'The default communication service for new courses. Existing courses will not have any provider selected by default.';
$string['coursecontentnotification'] = 'Send content change notification';
$string['coursecontentnotifnew'] = '{$a->coursename} new content';
$string['coursecontentnotifnewbody'] = '<p>{$a->moduletypename} <a href="{$a->link}">{$a->modulename}</a> is new in the course <a href="{$a->courselink}">{$a->coursename}</a>.</p><p><a href="{$a->notificationpreferenceslink}">Change your notification preferences</a></p>';