Merge branch 'MDL-62418-master' of git://github.com/sarjona/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2018-05-14 03:01:29 +02:00
3 changed files with 3 additions and 4 deletions
@@ -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();
}
@@ -295,7 +293,6 @@ class page_agreedocs implements renderable, templatable {
// 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'));
+1
View File
@@ -41,6 +41,7 @@ $agreedocs = optional_param_array('agreedoc', null, PARAM_INT);
$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);
@@ -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"