Skip to content

Commit

Permalink
Merge branch 'MDL-76803-master' of https://github.com/junpataleta/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
paulholden committed Jan 10, 2023
2 parents 37f68b7 + 2924075 commit 6bd76e2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
8 changes: 4 additions & 4 deletions enrol/lti/tests/behat/basic_settings.feature
Original file line number Diff line number Diff line change
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
14 changes: 8 additions & 6 deletions lang/en/moodle.php
Original file line number Diff line number Diff line change
Expand Up @@ -669,14 +669,16 @@
$string['emaildigestsubjects'] = 'Subjects (daily email with subjects only)';
$string['emaildisable'] = 'This email address is disabled';
$string['emaildisableclick'] = 'Click here to disable all email from being sent to this address';
$string['emaildisplay'] = 'Email display';
$string['emaildisplay_help'] = 'Privileged users (such as teachers and managers) will always be able to see your email address.';
$string['emaildisplaycourse'] = 'Allow only other course participants to see my email address';
$string['emaildisplay'] = 'Email visibility';
$string['emaildisplay_help'] = '* Hidden - Only users with appropriate permissions such as teachers can view your email address.
* Visible to everyone - All users on the site can view your email address.
* Visible to course participants - Only participants of courses you are enrolled in can view your email address.';
$string['emaildisplaycourse'] = 'Visible to course participants';
$string['emaildisplaycoursemembersonly'] = '(Visible to other course participants)';
$string['emaildisplayeveryone'] = '(Visible to everyone)';
$string['emaildisplayhide'] = '(Hidden from all non-privileged users)';
$string['emaildisplayno'] = 'Hide my email address from non-privileged users';
$string['emaildisplayyes'] = 'Allow everyone to see my email address';
$string['emaildisplayhide'] = '(Hidden from everyone except users with appropriate permissions)';
$string['emaildisplayno'] = 'Hidden';
$string['emaildisplayyes'] = 'Visible to everyone';
$string['emailenable'] = 'This email address is enabled';
$string['emailenableclick'] = 'Click here to re-enable all email being sent to this address';
$string['emailexists'] = 'This email address is already registered.';
Expand Down
4 changes: 2 additions & 2 deletions lib/form/templates/element-select.mustache
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 6bd76e2

Please sign in to comment.