diff --git a/admin/settings/courses.php b/admin/settings/courses.php index a691f933b39..b4f1bb34979 100644 --- a/admin/settings/courses.php +++ b/admin/settings/courses.php @@ -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)); diff --git a/communication/classes/api.php b/communication/classes/api.php index 2fc9162f5c7..8973d22b4c3 100644 --- a/communication/classes/api.php +++ b/communication/classes/api.php @@ -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); } } diff --git a/communication/provider/customlink/tests/behat/custom_link.feature b/communication/provider/customlink/tests/behat/custom_link.feature index 066cab93cc9..ab75d8258c7 100644 --- a/communication/provider/customlink/tests/behat/custom_link.feature +++ b/communication/provider/customlink/tests/behat/custom_link.feature @@ -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 | diff --git a/communication/provider/matrix/classes/matrix_user_manager.php b/communication/provider/matrix/classes/matrix_user_manager.php index 6b5b1b77f04..38323c70f0a 100644 --- a/communication/provider/matrix/classes/matrix_user_manager.php +++ b/communication/provider/matrix/classes/matrix_user_manager.php @@ -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, diff --git a/communication/provider/matrix/lang/en/communication_matrix.php b/communication/provider/matrix/lang/en/communication_matrix.php index 356e2d160b6..aa23679c140 100644 --- a/communication/provider/matrix/lang/en/communication_matrix.php +++ b/communication/provider/matrix/lang/en/communication_matrix.php @@ -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.'; diff --git a/communication/provider/matrix/settings.php b/communication/provider/matrix/settings.php index 7fb817d31a8..52080ed4e10 100644 --- a/communication/provider/matrix/settings.php +++ b/communication/provider/matrix/settings.php @@ -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, '', '')); } diff --git a/communication/provider/matrix/tests/behat/matrix_room_banner.feature b/communication/provider/matrix/tests/behat/matrix_room_banner.feature index 7b25c9e04bd..e8a94764340 100644 --- a/communication/provider/matrix/tests/behat/matrix_room_banner.feature +++ b/communication/provider/matrix/tests/behat/matrix_room_banner.feature @@ -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" diff --git a/course/tests/behat/course_communication_defaults.feature b/course/tests/behat/course_communication_defaults.feature index 0dacd2e99eb..309eb2a6f5a 100644 --- a/course/tests/behat/course_communication_defaults.feature +++ b/course/tests/behat/course_communication_defaults.feature @@ -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" diff --git a/lang/en/admin.php b/lang/en/admin.php index e93a0cfc57e..1225c05b7fc 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -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 Plugins.'; $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'; diff --git a/lang/en/communication.php b/lang/en/communication.php index 1c2c0fa5265..b896a7be039 100644 --- a/lang/en/communication.php +++ b/lang/en/communication.php @@ -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.'; diff --git a/lang/en/course.php b/lang/en/course.php index f0f6212af70..19b2b101270 100644 --- a/lang/en/course.php +++ b/lang/en/course.php @@ -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'] = '
{$a->moduletypename} {$a->modulename} is new in the course {$a->coursename}.
';