mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Convert deprecated pix_url calls.
This commit is contained in:
@@ -84,7 +84,7 @@ class base_table extends flexible_table {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/info.php', ['id' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/preview'),
|
||||
'src' => $OUTPUT->image_url('t/preview'),
|
||||
'alt' => get_string('view'),
|
||||
'class' => 'iconsmall',
|
||||
|
||||
@@ -100,7 +100,7 @@ class base_table extends flexible_table {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/edit.php', ['edit' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/edit'),
|
||||
'src' => $OUTPUT->image_url('t/edit'),
|
||||
'alt' => get_string('edit'),
|
||||
'class' => 'iconsmall',
|
||||
]),
|
||||
@@ -112,7 +112,7 @@ class base_table extends flexible_table {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/edit.php', ['clone' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/copy'),
|
||||
'src' => $OUTPUT->image_url('t/copy'),
|
||||
'alt' => get_string('clone', 'auth_outage'),
|
||||
'class' => 'iconsmall',
|
||||
|
||||
@@ -125,7 +125,7 @@ class base_table extends flexible_table {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/finish.php', ['id' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/check'),
|
||||
'src' => $OUTPUT->image_url('t/check'),
|
||||
'alt' => get_string('finish', 'auth_outage'),
|
||||
'class' => 'iconsmall',
|
||||
]),
|
||||
@@ -138,7 +138,7 @@ class base_table extends flexible_table {
|
||||
$buttons .= html_writer::link(
|
||||
new moodle_url('/auth/outage/delete.php', ['id' => $outage->id]),
|
||||
html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/delete'),
|
||||
'src' => $OUTPUT->image_url('t/delete'),
|
||||
'alt' => get_string('delete'),
|
||||
'class' => 'iconsmall',
|
||||
]),
|
||||
|
||||
@@ -178,14 +178,14 @@ class renderer extends plugin_renderer_base {
|
||||
$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']
|
||||
['src' => $OUTPUT->image_url('t/edit'), 'alt' => get_string('edit'), 'class' => 'iconsmall']
|
||||
);
|
||||
$linkedit = html_writer::link($url, $img, ['title' => get_string('edit')]);
|
||||
|
||||
$url = new moodle_url('/auth/outage/delete.php', ['id' => $outage->id]);
|
||||
$img = html_writer::empty_tag(
|
||||
'img',
|
||||
['src' => $OUTPUT->pix_url('t/delete'), 'alt' => get_string('delete'), 'class' => 'iconsmall']
|
||||
['src' => $OUTPUT->image_url('t/delete'), 'alt' => get_string('delete'), 'class' => 'iconsmall']
|
||||
);
|
||||
$linkdelete = html_writer::link($url, $img, ['title' => get_string('delete')]);
|
||||
|
||||
|
||||
@@ -105,8 +105,6 @@ class outagelib_test extends advanced_testcase {
|
||||
$size = strlen($CFG->additionalhtmltopofbody);
|
||||
outagelib::inject();
|
||||
self::assertSame($size, strlen($CFG->additionalhtmltopofbody));
|
||||
|
||||
$this->resetDebugging(); // Function pix_url deprecated in Moodle 33+.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,8 +140,6 @@ class outagelib_test extends advanced_testcase {
|
||||
outagelib::reinject();
|
||||
self::assertContains('<style>', $CFG->additionalhtmltopofbody);
|
||||
self::assertContains('<script>', $CFG->additionalhtmltopofbody);
|
||||
|
||||
$this->resetDebugging(); // Function pix_url deprecated in Moodle 33+.
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -503,8 +499,6 @@ EOT;
|
||||
outagelib::reinject();
|
||||
|
||||
self::assertNotEmpty($CFG->additionalhtmltopofbody);
|
||||
|
||||
$this->resetDebugging(); // Function pix_url deprecated in Moodle 33+.
|
||||
}
|
||||
|
||||
private function create_outage() {
|
||||
|
||||
@@ -48,7 +48,7 @@ if (!$viewbag['static']) {
|
||||
if (is_siteadmin()) {
|
||||
$url = new moodle_url('/auth/outage/finish.php', ['id' => $viewbag['outage']->id]);
|
||||
$text = html_writer::empty_tag('img', [
|
||||
'src' => $OUTPUT->pix_url('t/check'),
|
||||
'src' => $OUTPUT->image_url('t/check'),
|
||||
'alt' => get_string('finish', 'auth_outage'),
|
||||
'class' => 'iconsmall',
|
||||
]).' '.get_string('finish', 'auth_outage');
|
||||
|
||||
Reference in New Issue
Block a user