diff --git a/admin/tool/task/classes/check/adhocqueue.php b/admin/tool/task/classes/check/adhocqueue.php index 2ec463da3ca..0ef8b8d23f7 100644 --- a/admin/tool/task/classes/check/adhocqueue.php +++ b/admin/tool/task/classes/check/adhocqueue.php @@ -38,21 +38,6 @@ use core\check\result; */ class adhocqueue extends check { - /** @var string adhocqueue id. */ - protected string $id = ''; - - /** @var string adhocqueue name. */ - protected string $name = ''; - - /** - * Constructor - */ - public function __construct() { - global $CFG; - $this->id = 'adhocqueue'; - $this->name = get_string('checkadhocqueue', 'tool_task'); - } - /** * Return result * @return result diff --git a/admin/tool/task/classes/check/cronrunning.php b/admin/tool/task/classes/check/cronrunning.php index 171300e8046..8d2d8371182 100644 --- a/admin/tool/task/classes/check/cronrunning.php +++ b/admin/tool/task/classes/check/cronrunning.php @@ -37,27 +37,15 @@ use core\check\result; */ class cronrunning extends check { - /** @var string adhocqueue id. */ - protected string $id = ''; - - /** @var string adhocqueue name. */ - protected string $name = ''; - - /** @var \action_link action link. */ - protected $actionlink; - /** - * Constructor + * A link the running tasks report + * + * @return action_link|null */ - public function __construct() { - global $CFG; - $this->id = 'cronrunning'; - $this->name = get_string('checkcronrunning', 'tool_task'); - if (empty($CFG->cronclionly)) { - $this->actionlink = new \action_link( - new \moodle_url('/admin/cron.php'), - get_string('cron', 'admin')); - } + public function get_action_link(): ?\action_link { + return new \action_link( + new \moodle_url('/admin/tool/task/runningtasks.php'), + get_string('runningtasks', 'tool_task')); } /** diff --git a/admin/tool/task/classes/check/maxfaildelay.php b/admin/tool/task/classes/check/maxfaildelay.php index d6be005a46f..79b078db4a0 100644 --- a/admin/tool/task/classes/check/maxfaildelay.php +++ b/admin/tool/task/classes/check/maxfaildelay.php @@ -39,15 +39,13 @@ use core\check\result; class maxfaildelay extends check { /** - * Constructor + * Links to the task log report + * + * @return \action_link|null */ - public function __construct() { - global $CFG; - $this->id = 'cronfaildelay'; - $this->name = get_string('checkmaxfaildelay', 'tool_task'); - $this->actionlink = new \action_link( - new \moodle_url('/admin/tool/task/scheduledtasks.php'), - get_string('scheduledtasks', 'tool_task')); + public function get_action_link(): ?\action_link { + $url = new \moodle_url('/admin/tasklogs.php'); + return new \action_link($url, get_string('tasklogs', 'tool_task')); } /**