mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-55980 Scheduled tasks: Run individual scheduled tasks from web
This commit is contained in:
parent
0f59b6dd75
commit
38fa1ca558
10 changed files with 348 additions and 48 deletions
|
@ -8735,8 +8735,13 @@ function address_in_subnet($addr, $subnetstr) {
|
|||
* This ensures any messages have time to display before redirect
|
||||
*/
|
||||
function mtrace($string, $eol="\n", $sleep=0) {
|
||||
global $CFG;
|
||||
|
||||
if (defined('STDOUT') && !PHPUNIT_TEST && !defined('BEHAT_TEST')) {
|
||||
if (isset($CFG->mtrace_wrapper) && function_exists($CFG->mtrace_wrapper)) {
|
||||
$fn = $CFG->mtrace_wrapper;
|
||||
$fn($string, $eol);
|
||||
return;
|
||||
} else if (defined('STDOUT') && !PHPUNIT_TEST && !defined('BEHAT_TEST')) {
|
||||
fwrite(STDOUT, $string.$eol);
|
||||
} else {
|
||||
echo $string . $eol;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue