Skip to content

Commit

Permalink
Remove unnecessary dynamic properties from failingtaskcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
bwalkerl committed May 21, 2024
1 parent 2b98b7f commit 37f47f6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions classes/check/failingtaskcheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
}

/**
Expand Down

0 comments on commit 37f47f6

Please sign in to comment.