mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-10-22 10:18:06 +02:00
Issue #13 - Added link to edit outage from info page.
This commit is contained in:
1 parent
54e6c40565
commit
2b862b44b2
1 file changed
+11
@@ -129,6 +129,16 @@ class auth_outage_renderer extends plugin_renderer_base {
|
||||
$start = userdate($outage->starttime, get_string('strftimedatetimeshort'));
|
||||
$stop = userdate($outage->stoptime, get_string('strftimedatetimeshort'));
|
||||
|
||||
$admin = '';
|
||||
if (is_siteadmin()) {
|
||||
$admin = html_writer::tag('div',
|
||||
'[' . html_writer::link(
|
||||
new moodle_url('/auth/outage/edit.php', ['id' => $outage->id]),
|
||||
get_string('outageedit', 'auth_outage')
|
||||
) . ']'
|
||||
);
|
||||
}
|
||||
|
||||
return html_writer::div(
|
||||
html_writer::tag('p',
|
||||
html_writer::tag('b', 'From: ')
|
||||
@@ -137,6 +147,7 @@ class auth_outage_renderer extends plugin_renderer_base {
|
||||
. $stop
|
||||
)
|
||||
. html_writer::div($outage->description)
|
||||
. $admin
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user