mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Issue #46 - Merged new, edit and clone into a single page. Moodle code checker was complaining about duplicated code and it was right!
This commit is contained in:
committed by
Daniel Thee Roperto
parent
8791727ba4
commit
6a78557487
@@ -78,7 +78,7 @@ class base_table extends flexible_table {
|
||||
// Edit button if required.
|
||||
if ($editdelete) {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/edit.php', ['id' => $outage->id]),
|
||||
new moodle_url('/auth/outage/edit.php', ['edit' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/edit'),
|
||||
'alt' => get_string('edit'),
|
||||
@@ -90,7 +90,7 @@ class base_table extends flexible_table {
|
||||
|
||||
// Clone button.
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/clone.php', ['id' => $outage->id]),
|
||||
new moodle_url('/auth/outage/edit.php', ['clone' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/copy'),
|
||||
'alt' => get_string('clone', 'auth_outage'),
|
||||
|
||||
@@ -170,7 +170,7 @@ class renderer extends plugin_renderer_base {
|
||||
);
|
||||
}
|
||||
|
||||
$url = new moodle_url('/auth/outage/edit.php', ['id' => $outage->id]);
|
||||
$url = new moodle_url('/auth/outage/edit.php', ['edit' => $outage->id]);
|
||||
$img = html_writer::empty_tag(
|
||||
'img',
|
||||
['src' => $OUTPUT->pix_url('t/edit'), 'alt' => get_string('edit'), 'class' => 'iconsmall']
|
||||
|
||||
Reference in New Issue
Block a user