Skip to content

Commit

Permalink
Merge branch 'MDL-77530-tool-task-checks-MOODLE_400_STABLE' of https:…
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Mar 10, 2023
2 parents a18d42a + e3356e2 commit 4287b7a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 27 deletions.
9 changes: 0 additions & 9 deletions admin/tool/task/classes/check/adhocqueue.php
Expand Up @@ -38,15 +38,6 @@
*/
class adhocqueue extends check {

/**
* Constructor
*/
public function __construct() {
global $CFG;
$this->id = 'adhocqueue';
$this->name = get_string('checkadhocqueue', 'tool_task');
}

/**
* Return result
* @return result
Expand Down
17 changes: 7 additions & 10 deletions admin/tool/task/classes/check/cronrunning.php
Expand Up @@ -38,17 +38,14 @@
class cronrunning extends check {

/**
* 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'));
}

/**
Expand Down
14 changes: 6 additions & 8 deletions admin/tool/task/classes/check/maxfaildelay.php
Expand Up @@ -39,15 +39,13 @@
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'));
}

/**
Expand Down

0 comments on commit 4287b7a

Please sign in to comment.