Skip to content

Commit bb5a6b6

Browse files
author
David Monllao
committed
Merge branch 'MDL-62342-34' of git://github.com/mihailges/moodle into MOODLE_34_STABLE
2 parents 2720c95 + 4dc8fa2 commit bb5a6b6

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

admin/tool/policy/classes/form/accept_policy.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ public function definition() {
7171

7272
$mform->addElement('hidden', 'returnurl');
7373
$mform->setType('returnurl', PARAM_LOCALURL);
74-
75-
$mform->addElement('static', 'user', get_string('acceptanceusers', 'tool_policy'), join(', ', $usernames));
76-
$mform->addElement('static', 'policy', get_string('acceptancepolicies', 'tool_policy'),
77-
join(', ', $versionnames));
74+
$useracceptancelabel = (count($usernames) > 1) ? get_string('acceptanceusers', 'tool_policy') :
75+
get_string('user');
76+
$mform->addElement('static', 'user', $useracceptancelabel, join(', ', $usernames));
77+
$policyacceptancelabel = (count($versionnames) > 1) ? get_string('acceptancepolicies', 'tool_policy') :
78+
get_string('policydochdrpolicy', 'tool_policy');
79+
$mform->addElement('static', 'policy', $policyacceptancelabel, join(', ', $versionnames));
7880

7981
if ($revoke) {
8082
$mform->addElement('static', 'ack', '', get_string('revokeacknowledgement', 'tool_policy'));

admin/tool/policy/lang/en/tool_policy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
defined('MOODLE_INTERNAL') || die();
2727

28-
$string['acceptanceacknowledgement'] = 'I acknowledge that I have received a request to give consent on behalf of user(s).';
28+
$string['acceptanceacknowledgement'] = 'I acknowledge that I have received a request to give consent on behalf of the above user(s).';
2929
$string['acceptancecount'] = '{$a->agreedcount} of {$a->policiescount}';
3030
$string['acceptancenote'] = 'Remarks';
3131
$string['acceptancepolicies'] = 'Policies';
@@ -53,7 +53,7 @@
5353
$string['backtoprevious'] = 'Go back to previous page';
5454
$string['backtotop'] = 'Back to top';
5555
$string['consentbulk'] = 'Consent';
56-
$string['consentdetails'] = 'Give consent on behalf of user';
56+
$string['consentdetails'] = 'Give consent on behalf of user(s)';
5757
$string['consentpagetitle'] = 'Consent';
5858
$string['contactdpo'] = 'For any questions about the policies please contact the privacy officer.';
5959
$string['dataproc'] = 'Personal data processing';
@@ -78,7 +78,7 @@
7878
$string['guestconsent:continue'] = 'Continue';
7979
$string['guestconsentmessage'] = 'If you continue browsing this website, you agree to our policies:';
8080
$string['iagree'] = 'I agree to the {$a}';
81-
$string['iagreetothepolicy'] = 'Give consent on behalf of user';
81+
$string['iagreetothepolicy'] = 'Give consent';
8282
$string['inactivate'] = 'Set status to "Inactive"';
8383
$string['inactivating'] = 'Inactivating a policy';
8484
$string['inactivatingconfirm'] = '<p>You are about to inactivate policy <em>\'{$a->name}\'</em> version <em>\'{$a->revision}\'</em>.</p>';
@@ -159,7 +159,7 @@
159159
$string['privacysettings'] = 'Privacy settings';
160160
$string['readpolicy'] = 'Please read our {$a}';
161161
$string['refertofullpolicytext'] = 'Please refer to the full {$a} if you would like to review the text.';
162-
$string['revokeacknowledgement'] = 'I acknowledge that I have received a request to withdraw consent on behalf of user(s).';
162+
$string['revokeacknowledgement'] = 'I acknowledge that I have received a request to withdraw consent on behalf of the above user(s).';
163163
$string['revokedetails'] = 'Withdraw user consent';
164164
$string['save'] = 'Save';
165165
$string['saveasdraft'] = 'Save as draft';

admin/tool/policy/tests/behat/acceptances.feature

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
5858
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
5959
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
6060
And I click on "Consent not given" "link" in the "User One" "table_row"
61-
Then I should see "Give consent on behalf of user"
61+
Then I should see "Give consent"
6262
And I should see "User One"
6363
And I should see "This site policy"
64-
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
64+
And I should see "I acknowledge that I have received a request to give consent on behalf of the above user(s)."
6565
And I set the field "Remarks" to "Consent received from a parent"
66-
And I press "Give consent on behalf of user"
66+
And I press "Give consent"
6767
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
6868
And "Max Manager" "link" should exist in the "User One" "table_row"
6969
And "Consent received from a parent" "text" should exist in the "User One" "table_row"
@@ -84,12 +84,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
8484
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
8585
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
8686
And I click on "Consent not given" "link" in the "User One" "table_row"
87-
Then I should see "Give consent on behalf of user"
87+
Then I should see "Give consent"
8888
And I should see "User One"
8989
And I should see "This site policy"
90-
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
90+
And I should see "I acknowledge that I have received a request to give consent on behalf of the above user(s)."
9191
And I set the field "Remarks" to "Consent received from a parent"
92-
And I press "Give consent on behalf of user"
92+
And I press "Give consent"
9393
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
9494
And "Max Manager" "link" should exist in the "User One" "table_row"
9595
And "Consent received from a parent" "text" should exist in the "User One" "table_row"
@@ -151,12 +151,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
151151
And I press "Next"
152152
And I navigate to "Users > Privacy and policies > User agreements" in site administration
153153
And I click on "Consent not given; click to give consent on behalf of user for This site policy" "link" in the "User One" "table_row"
154-
Then I should see "Give consent on behalf of user"
154+
Then I should see "Give consent"
155155
And I should see "User One"
156156
And I should see "This site policy"
157-
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
157+
And I should see "I acknowledge that I have received a request to give consent on behalf of the above user(s)."
158158
And I set the field "Remarks" to "Consent received from a parent"
159-
And I press "Give consent on behalf of user"
159+
And I press "Give consent"
160160
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
161161
And "Consent not given; click to give consent on behalf of user for This privacy policy" "icon" should exist in the "User One" "table_row"
162162
And I click on "1 of 2" "link" in the "User One" "table_row"
@@ -184,12 +184,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
184184
And I press "Next"
185185
And I navigate to "Users > Privacy and policies > User agreements" in site administration
186186
And I click on "Consent not given; click to give consent on behalf of user for This site policy" "link" in the "User One" "table_row"
187-
Then I should see "Give consent on behalf of user"
187+
Then I should see "Give consent"
188188
And I should see "User One"
189189
And I should see "This site policy"
190-
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
190+
And I should see "I acknowledge that I have received a request to give consent on behalf of the above user(s)."
191191
And I set the field "Remarks" to "Consent received from a parent"
192-
And I press "Give consent on behalf of user"
192+
And I press "Give consent"
193193
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
194194
And "Consent not given; click to give consent on behalf of user for This privacy policy" "icon" should exist in the "User One" "table_row"
195195
And I click on "1 of 2" "link" in the "User One" "table_row"
@@ -249,12 +249,12 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
249249
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
250250
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
251251
And I click on "Consent not given" "link" in the "User One" "table_row"
252-
Then I should see "Give consent on behalf of user"
252+
Then I should see "Give consent"
253253
And I should see "User One"
254254
And I should see "This site policy"
255-
And I should see "I acknowledge that I have received a request to give consent on behalf of user(s)."
255+
And I should see "I acknowledge that I have received a request to give consent on behalf of the above user(s)."
256256
And I set the field "Remarks" to "Consent received from a parent"
257-
And I press "Give consent on behalf of user"
257+
And I press "Give consent"
258258
And "Consent given on behalf of user" "icon" should exist in the "User One" "table_row"
259259
And "Max Manager" "link" should not exist in the "User One" "table_row"
260260
And "Admin User" "link" should exist in the "User One" "table_row"

0 commit comments

Comments
 (0)