Skip to content

Commit

Permalink
Merge branch 'MDL-62418-master' of git://github.com/sarjona/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed May 14, 2018
2 parents 24bd0bc + 5bf7f59 commit a890f2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions admin/tool/policy/classes/output/page_agreedocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ protected function prepare_global_page_access($userid) {
// 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();
}

Expand All @@ -295,7 +293,6 @@ protected function prepare_global_page_access($userid) {

// Page setup.
$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
$PAGE->set_url($myurl);
$PAGE->set_heading($SITE->fullname);
$PAGE->set_title(get_string('policiesagreements', 'tool_policy'));
Expand Down
1 change: 1 addition & 0 deletions admin/tool/policy/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
$behalfid = optional_param('userid', null, PARAM_INT);

$PAGE->set_context(context_system::instance());
$PAGE->set_pagelayout('standard');
$PAGE->set_url('/admin/tool/policy/index.php');
$PAGE->set_popup_notification_allowed(false);

Expand Down
1 change: 1 addition & 0 deletions admin/tool/policy/tests/behat/acceptances.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a890f2e

Please sign in to comment.