Skip to content

Commit

Permalink
MDL-76803 lang: Update usages of reworded email display options
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Jan 10, 2023
1 parent 4fc9c3b commit 8280476
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions enrol/lti/tests/behat/basic_settings.feature
Expand Up @@ -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 |
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions lib/form/templates/element-select.mustache
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions user/externallib.php
Expand Up @@ -59,7 +59,7 @@ public static function create_users_parameters() {
'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),
Expand Down Expand Up @@ -486,7 +486,7 @@ public static function update_users_parameters() {
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),
Expand Down
2 changes: 1 addition & 1 deletion user/tests/behat/set_email_display.feature
Expand Up @@ -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 |
Expand Down

0 comments on commit 8280476

Please sign in to comment.