1) Add a new callback to
/mod/assign/lib.php
function mod_assign_security_checks() {
return [ new mod_assign\check\foobar()];
}
And make a new check class in mod/assign/classes/check/foobar.php
<?php
namespace mod_assign\check;
use core\check\check;
class foobar extends check {
public function __construct() {
$this ->id = 'foobar' ;
$this ->name = 'my foobar check' ;
$this ->status = check::ERROR;
$this ->summary = 'foobar summary' ;
$this ->details = 'some <b>details!</b>' ;
}
}
2) Purge cache
php admin/cli/purge_caches.php
3) Visit /report/security/index.php
Confirm you can see a new 'foobar' check which is failing
4) Click on the Foo bar link and confirm you can see the details
ie add a callback to augment: report_security_get_issue_list()