MDL-85262 tool_task: switch next run time comparison in renderer.

If a task is "due", then next run time should be considered "ASAP".
This commit is contained in:
Paul Holden
2025-07-08 13:49:47 +01:00
parent 2fce831627
commit 2d4b15f317
3 changed files with 27 additions and 4 deletions
+1 -1
View File
@@ -274,7 +274,7 @@ class tool_task_renderer extends plugin_renderer_base {
$nextruntime = $task->get_next_run_time();
$due = $nextruntime < $now;
if ($task->get_attempts_available() > 0) {
$nextrun = $due ? userdate($nextruntime) : get_string('asap', 'tool_task');
$nextrun = $due ? get_string('asap', 'tool_task') : userdate($nextruntime);
} else {
$nextrun = get_string('never', 'admin');
}