Skip to content

Commit 98bb0a1

Browse files
committed
reuse absolute html_writer path
1 parent 92b3bc1 commit 98bb0a1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

classes/local/table/delayed_courses_table.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424
namespace tool_lifecycle\local\table;
2525

26-
use core\output\html_writer;
2726
use moodle_url;
2827
use tool_lifecycle\local\manager\delayed_courses_manager;
2928
use tool_lifecycle\urls;
@@ -176,7 +175,7 @@ public function col_workflow($row) {
176175
if ($row->workflowcount == 1) {
177176
$typehtml = delayed_courses_manager::delaytype_html($row->delaytype);
178177
$text = get_string('delayed_globally_and_seperately_for_one', 'tool_lifecycle');
179-
$html = html_writer::link($url, $text).$typehtml;
178+
$html = \html_writer::link($url, $text).$typehtml;
180179
} else if ($row->workflowcount > 1) {
181180
$text = $this->get_worklows_multiple($row, $url);
182181
$html = $text;
@@ -185,7 +184,7 @@ public function col_workflow($row) {
185184
$date = userdate($row->globaldelay, $dateformat);
186185
$typehtml = delayed_courses_manager::delaytype_html($row->delaytype);
187186
$text = get_string('delayed_globally', 'tool_lifecycle', $date);
188-
$html = html_writer::link($url, $text).$typehtml;
187+
$html = \html_writer::link($url, $text).$typehtml;
189188
}
190189
} else {
191190
if ($row->workflowcount <= 0) {
@@ -196,7 +195,7 @@ public function col_workflow($row) {
196195
$typehtml = delayed_courses_manager::delaytype_html($row->delaytype);
197196
$text = get_string('delayed_for_workflow_until', 'tool_lifecycle',
198197
['name' => $row->workflow, 'date' => $date]);
199-
$html = html_writer::link($url, $text).$typehtml;
198+
$html = \html_writer::link($url, $text).$typehtml;
200199
} else {
201200
$text = $this->get_worklows_multiple($row, $url);
202201
$html = $text;
@@ -223,14 +222,14 @@ private function get_worklows_multiple($row, $url) {
223222
$date = userdate($row->globaldelay, $dateformat);
224223
$typehtml = delayed_courses_manager::delaytype_html($row->delaytype);
225224
$text = get_string('globally_until_date', 'tool_lifecycle', $date);
226-
$html .= html_writer::link($url, $text).$typehtml."<br>";
225+
$html .= \html_writer::link($url, $text).$typehtml."<br>";
227226
}
228227
if ($row->workflowcount == 1) {
229228
$date = userdate($row->workflowdelay, $dateformat);
230229
$typehtml = delayed_courses_manager::delaytype_html($row->delaytype);
231230
$text = get_string('name_until_date', 'tool_lifecycle',
232231
['name' => $row->workflow, 'date' => $date]);
233-
$html .= html_writer::link($url, $text).$typehtml;
232+
$html .= \html_writer::link($url, $text).$typehtml;
234233
} else if ($row->workflowcount > 1) {
235234
$sql = 'SELECT dw.id, dw.delayeduntil, w.title, w.id as workflowid
236235
FROM {tool_lifecycle_delayed_workf} dw
@@ -244,7 +243,7 @@ private function get_worklows_multiple($row, $url) {
244243
$text = get_string('name_until_date', 'tool_lifecycle',
245244
['name' => $record->title, 'date' => $date]);
246245
$url = new moodle_url($url, ['wf' => $record->workflowid]);
247-
$html .= html_writer::link($url, $text).$typehtml."<br>";
246+
$html .= \html_writer::link($url, $text).$typehtml."<br>";
248247
}
249248
}
250249
return $html;

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
defined('MOODLE_INTERNAL') || die;
2626

2727
$plugin->maturity = MATURITY_STABLE;
28-
$plugin->version = 2025050400;
28+
$plugin->version = 2025050401;
2929
$plugin->component = 'tool_lifecycle';
3030
$plugin->requires = 2022112800; // Requires Moodle 4.1+.
3131
$plugin->supported = [401, 405];
32-
$plugin->release = 'v4.5-r1';
32+
$plugin->release = 'v4.5-r2';

0 commit comments

Comments
 (0)