From b4291b03cc69d84322af7e2cf5662aad641caa3f Mon Sep 17 00:00:00 2001 From: Benjamin Walker Date: Tue, 21 May 2024 11:36:55 +1000 Subject: [PATCH] Remove unnecessary dynamic properties from failingtaskcheck --- classes/check/failingtaskcheck.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/classes/check/failingtaskcheck.php b/classes/check/failingtaskcheck.php index b62c270..ab37862 100644 --- a/classes/check/failingtaskcheck.php +++ b/classes/check/failingtaskcheck.php @@ -44,13 +44,18 @@ class failingtaskcheck extends check { * Constructor */ public function __construct($task = null) { - $this->id = 'cronfailingtasks'; - $this->name = get_string('checkfailingtaskcheck', 'tool_heartbeat'); $this->task = $task; - $this->actionlink = new \action_link( - new \moodle_url('/admin/tasklogs.php'), - get_string('tasklogs', 'tool_task')); + } + + /** + * A link to check task logs + * + * @return \action_link|null + */ + public function get_action_link(): ?\action_link { + $url = new \moodle_url('/admin/tasklogs.php'); + return new \action_link($url, get_string('tasklogs', 'tool_task')); } /**