mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-77530 tool_task: Fix coding errors in checks
This commit is contained in:
parent
27e0329a08
commit
653ad78f43
@ -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
|
||||
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user