Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
6eca6f3e
Commit
6eca6f3e
authored
Mar 18, 2019
by
Eloy Lafuente
Browse files
Merge branch 'MDL-65006-master' of
git://github.com/sarjona/moodle
parents
e0757dd5
63be19c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
admin/tool/policy/classes/output/page_agreedocs.php
View file @
6eca6f3e
...
...
@@ -301,6 +301,8 @@ class page_agreedocs implements renderable, templatable {
redirect
(
new
moodle_url
(
'/admin/tool/policy/view.php'
,
$urlparams
));
}
}
else
{
// Update the policyagreed for the user to avoid infinite loop because there are no policies to-be-accepted.
api
::
update_policyagreed
(
$userid
);
$this
->
redirect_to_previous_url
();
}
}
...
...
admin/tool/policy/tests/behat/acceptances.feature
View file @
6eca6f3e
...
...
@@ -292,3 +292,23 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
When
I press
"Give consent"
Then
"Accepted on user's behalf"
"text"
should exist in the
"User One"
"table_row"
And
"Accepted on user's behalf"
"text"
should exist in the
"User Two"
"table_row"
Scenario
:
View acceptances made by users on their own after inactivating a policy
Given
I log in as
"user1"
And
I should see
"This site policy"
And
I should not see
"Course overview"
And
I press
"Next"
And
I set the field
"I agree to the This site policy"
to
"1"
And
I press
"Next"
And
I should see
"Course overview"
And
I log out
And
I log in as
"admin"
And
I navigate to
"Users > Privacy and policies > Manage policies"
in site administration
And
I click on
"Actions"
"link_or_button"
in the
"This privacy policy"
"table_row"
And
I click on
"Set status to \"
Active\""
"link"
in the
"This privacy policy"
"table_row"
And
I press
"Continue"
And
I click on
"Set status to \"
Inactive\""
"link"
in the
"This privacy policy"
"table_row"
And
I press
"Continue"
And
I log out
When
I log in as
"user1"
Then
I should see
"Course overview"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment