MDL-79608 tool_task: link to adhoc task page from corresponding check.

This commit is contained in:
Paul Holden 2023-10-05 11:46:36 +01:00
parent aeb64dbfb5
commit a9d0af8df2
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -14,20 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* 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'),
);
}
}