Merge branch 'MDL-62670-master' of git://github.com/sarjona/moodle
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -92,6 +92,7 @@ $string['moveup'] = 'Move up';
|
||||
$string['mustagreetocontinue'] = 'Before continuing you must agree to all these policies.';
|
||||
$string['newpolicy'] = 'New policy';
|
||||
$string['newversion'] = 'New version';
|
||||
$string['noactivepolicies'] = 'There are no policies with an active version.';
|
||||
$string['nofiltersapplied'] = 'No filters applied';
|
||||
$string['nopermissiontoagreedocs'] = 'No permission to agree to the policies';
|
||||
$string['nopermissiontoagreedocs_desc'] = 'Sorry, you do not have the required permissions to agree to the policies.<br />You will not be able to use this site until the following policies are agreed:';
|
||||
|
||||
@@ -104,9 +104,12 @@ function tool_policy_standard_footer_html() {
|
||||
$output = '';
|
||||
if (!empty($CFG->sitepolicyhandler)
|
||||
&& $CFG->sitepolicyhandler == 'tool_policy') {
|
||||
$url = (new moodle_url('/admin/tool/policy/viewall.php'))->out();
|
||||
$output .= html_writer::link($url, get_string('userpolicysettings', 'tool_policy'));
|
||||
$output = html_writer::div($output, 'policiesfooter');
|
||||
$policies = api::get_current_versions_ids();
|
||||
if (!empty($policies)) {
|
||||
$url = (new moodle_url('/admin/tool/policy/viewall.php'))->out();
|
||||
$output .= html_writer::link($url, get_string('userpolicysettings', 'tool_policy'));
|
||||
$output = html_writer::div($output, 'policiesfooter');
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{^policies }}
|
||||
{{# str }} noactivepolicies, tool_policy {{/ str }}
|
||||
{{/policies }}
|
||||
|
||||
{{#policies }}
|
||||
<hr>
|
||||
<div class="policy_version m-b-3">
|
||||
|
||||
Reference in New Issue
Block a user