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.
This commit is contained in:
Sara Arjona 2018-07-04 07:59:54 +02:00
parent 0138ad60b0
commit 8502f02ae0

View File

@ -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();
}
/**