From a9d0af8df2ccf9e2de32f51668a04de8bebb800c Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Thu, 5 Oct 2023 11:46:36 +0100 Subject: [PATCH] MDL-79608 tool_task: link to adhoc task page from corresponding check. --- admin/tool/task/classes/check/adhocqueue.php | 24 ++++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/admin/tool/task/classes/check/adhocqueue.php b/admin/tool/task/classes/check/adhocqueue.php index 0ef8b8d23f7..0e8a15a0839 100644 --- a/admin/tool/task/classes/check/adhocqueue.php +++ b/admin/tool/task/classes/check/adhocqueue.php @@ -14,20 +14,12 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -/** - * Ad hoc queue checks - * - * @package tool_task - * @copyright 2020 Brendan Heywood (brendan@catalyst-au.net) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later - */ - namespace tool_task\check; -defined('MOODLE_INTERNAL') || die(); - +use action_link; use core\check\check; use core\check\result; +use moodle_url; /** * Ad hoc queue checks @@ -81,4 +73,16 @@ class adhocqueue extends check { return new result($status, $summary, $details); } + + /** + * Link to the Ad hoc tasks report + * + * @return action_link|null + */ + public function get_action_link(): ?action_link { + return new action_link( + new moodle_url('/admin/tool/task/adhoctasks.php'), + get_string('adhoctasks', 'tool_task'), + ); + } }