mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
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:
parent
0138ad60b0
commit
8502f02ae0
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user