From 828047672806cfc64f70e262c2ae7f2fd010e138 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Fri, 6 Jan 2023 11:02:33 +0800 Subject: [PATCH] MDL-76803 lang: Update usages of reworded email display options --- enrol/lti/tests/behat/basic_settings.feature | 8 ++++---- lib/form/templates/element-select.mustache | 4 ++-- user/externallib.php | 4 ++-- user/tests/behat/set_email_display.feature | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/enrol/lti/tests/behat/basic_settings.feature b/enrol/lti/tests/behat/basic_settings.feature index c01b0115c42..90d864e2c80 100644 --- a/enrol/lti/tests/behat/basic_settings.feature +++ b/enrol/lti/tests/behat/basic_settings.feature @@ -20,7 +20,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin And I click on "Enable" "link" in the "Publish as LTI tool" "table_row" And I navigate to "Plugins > Enrolments > Publish as LTI tool" in site administration And I set the following fields to these values: - | Email display | Allow everyone to see my email address | + | Email visibility | Visible to everyone | | City/town | Perth | | Select a country | Australia | | Timezone | Australia/Perth | @@ -33,20 +33,20 @@ Feature: Check that settings are adhered to when creating an enrolment plugin And I am on the "Course 1" "enrolment methods" page And I select "Publish as LTI tool" from the "Add method" singleselect When I expand all fieldsets - Then the field "Email display" matches value "Allow everyone to see my email address" + Then the field "Email visibility" matches value "Visible to everyone" And the field "City/town" matches value "Perth" And the field "Select a country" matches value "Australia" And the field "Timezone" matches value "Australia/Perth" And the field "Institution" matches value "Moodle Pty Ltd" And I set the following fields to these values: - | Email display | Hide my email address from non-privileged users | + | Email visibility | Hidden | | City/town | Whistler | | Select a country | Canada | | Timezone | America/Vancouver | | Institution | Moodle Pty Ltd - remote | And I press "Add method" And I click on "Edit" "link" in the "Publish as LTI tool" "table_row" - And the field "Email display" matches value "Hide my email address from non-privileged users" + And the field "Email visibility" matches value "Hidden" And the field "City/town" matches value "Whistler" And the field "Select a country" matches value "Canada" And the field "Timezone" matches value "America/Vancouver" diff --git a/lib/form/templates/element-select.mustache b/lib/form/templates/element-select.mustache index 1d320b30247..364fc2eabe0 100644 --- a/lib/form/templates/element-select.mustache +++ b/lib/form/templates/element-select.mustache @@ -67,14 +67,14 @@ "attributes": "", "options": [ { - "text": "Hide my email address from non-privileged users", + "text": "Hidden", "value": 0, "selected": false, "disabled": false, "optionattributes": "" }, { - "text": "Allow everyone to see my email address", + "text": "Visible to everyone", "value": 1, "selected": true, "disabled": false, diff --git a/user/externallib.php b/user/externallib.php index 87f8fbed253..b121c76c0f8 100644 --- a/user/externallib.php +++ b/user/externallib.php @@ -59,7 +59,7 @@ class core_user_external extends external_api { 'firstname' => new external_value(core_user::get_property_type('firstname'), 'The first name(s) of the user'), 'lastname' => new external_value(core_user::get_property_type('lastname'), 'The family name of the user'), 'email' => new external_value(core_user::get_property_type('email'), 'A valid and unique email address'), - 'maildisplay' => new external_value(core_user::get_property_type('maildisplay'), 'Email display', VALUE_OPTIONAL), + 'maildisplay' => new external_value(core_user::get_property_type('maildisplay'), 'Email visibility', VALUE_OPTIONAL), 'city' => new external_value(core_user::get_property_type('city'), 'Home city of the user', VALUE_OPTIONAL), 'country' => new external_value(core_user::get_property_type('country'), 'Home country code of the user, such as AU or CZ', VALUE_OPTIONAL), @@ -486,7 +486,7 @@ class core_user_external extends external_api { VALUE_OPTIONAL), 'email' => new external_value(core_user::get_property_type('email'), 'A valid and unique email address', VALUE_OPTIONAL, '', NULL_NOT_ALLOWED), - 'maildisplay' => new external_value(core_user::get_property_type('maildisplay'), 'Email display', VALUE_OPTIONAL), + 'maildisplay' => new external_value(core_user::get_property_type('maildisplay'), 'Email visibility', VALUE_OPTIONAL), 'city' => new external_value(core_user::get_property_type('city'), 'Home city of the user', VALUE_OPTIONAL), 'country' => new external_value(core_user::get_property_type('country'), 'Home country code of the user, such as AU or CZ', VALUE_OPTIONAL), diff --git a/user/tests/behat/set_email_display.feature b/user/tests/behat/set_email_display.feature index 25efabf577c..27b6e0141e5 100644 --- a/user/tests/behat/set_email_display.feature +++ b/user/tests/behat/set_email_display.feature @@ -88,7 +88,7 @@ Feature: Set email display preference And I set the following fields to these values: | maildisplay | 0 | And I click on "Update profile" "button" - Then I should see "(Hidden from all non-privileged users)" + Then I should see "(Hidden from everyone except users with appropriate permissions)" When I click on "Edit profile" "link" in the "region-main" "region" And I set the following fields to these values: | maildisplay | 1 |