mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
MDL-62418 tool_policy: Redirect always to home when agreed all policies
This commit is contained in:
parent
15ed7d938e
commit
5bf7f59a19
@ -278,9 +278,7 @@ class page_agreedocs implements renderable, templatable {
|
||||
// and $SESSION->wantsurl is defined, redirect to the return page.
|
||||
$hasagreedsignupuser = empty($USER->id) && $this->signupuserpolicyagreed;
|
||||
$hasagreedloggeduser = $USER->id == $userid && !empty($USER->policyagreed);
|
||||
$canrevoke = api::can_revoke_policies($USER->id);
|
||||
if (!is_siteadmin() && ($hasagreedsignupuser ||
|
||||
($hasagreedloggeduser && !$canrevoke))) {
|
||||
if (!is_siteadmin() && ($hasagreedsignupuser || $hasagreedloggeduser)) {
|
||||
$this->redirect_to_previous_url();
|
||||
}
|
||||
|
||||
|
@ -80,6 +80,7 @@ Feature: Viewing acceptances reports and accepting on behalf of other users
|
||||
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 not see "Next"
|
||||
And I navigate to "Users > Privacy and policies > Manage policies" in site administration
|
||||
And I click on "1 of 4 (25%)" "link" in the "This site policy" "table_row"
|
||||
And I click on "Consent not given" "link" in the "User One" "table_row"
|
||||
|
Loading…
x
Reference in New Issue
Block a user