From e154204728f5ccfe601bfa740dca59b38a1d5316 Mon Sep 17 00:00:00 2001 From: Sara Arjona Date: Wed, 4 Jul 2018 07:59:54 +0200 Subject: [PATCH] MDL-62670 policy: viewall.php must display always all active policies The viewall.php page is called from the mobile app to display the policies to the users before agree them. That's why it must display all the active policies (even for guests), to guarantee the users agree all current policies from the app. --- admin/tool/policy/classes/output/page_viewalldoc.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/admin/tool/policy/classes/output/page_viewalldoc.php b/admin/tool/policy/classes/output/page_viewalldoc.php index f8dacf434d7..5ca5d99bd5e 100644 --- a/admin/tool/policy/classes/output/page_viewalldoc.php +++ b/admin/tool/policy/classes/output/page_viewalldoc.php @@ -63,14 +63,7 @@ class page_viewalldoc implements renderable, templatable { * */ protected function prepare_policies() { - global $USER; - - if (isguestuser() || empty($USER->id)) { - $audience = policy_version::AUDIENCE_GUESTS; - } else { - $audience = policy_version::AUDIENCE_LOGGEDIN; - } - $this->policies = api::list_current_versions($audience); + $this->policies = api::list_current_versions(); } /** -- 2.11.4.GIT