mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-62670 policy: Remove footer link when there are not active policies
This commit is contained in:
parent
f61ee4e857
commit
0138ad60b0
@ -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">
|
||||
|
Loading…
x
Reference in New Issue
Block a user