mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-17 05:48:43 +02:00
Issue #22 - Adding parameter to hide warning bar to be used when baking page.
This commit is contained in:
@@ -71,6 +71,11 @@ class outagelib {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if warning bar should be hidden.
|
||||
if (optional_param('auth_outage_hide_warning', false, PARAM_BOOL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Used to test the try block in case of errors.
|
||||
if (PHPUNIT_TEST && optional_param('auth_outage_break_code', false, PARAM_INT)) {
|
||||
(new stdClass())->invalidfield;
|
||||
|
||||
@@ -45,6 +45,18 @@ if ($viewbag['admin']) {
|
||||
get_string('info'.$title, 'auth_outage')
|
||||
);
|
||||
}
|
||||
$adminlinks[] = html_writer::link(
|
||||
new moodle_url(
|
||||
'/auth/outage/info.php',
|
||||
[
|
||||
'id' => $viewbag['outage']->id,
|
||||
'auth_outage_preview' => $viewbag['outage']->id,
|
||||
'auth_outage_delta' => 0,
|
||||
'auth_outage_hide_warning' => 1,
|
||||
]
|
||||
),
|
||||
get_string('infohidewarning', 'auth_outage')
|
||||
);
|
||||
|
||||
$admineditlink = html_writer::link(
|
||||
new moodle_url('/auth/outage/edit.php', ['edit' => $viewbag['outage']->id]),
|
||||
|
||||
Reference in New Issue
Block a user