diff --git a/admin/tool/task/run_adhoctasks.php b/admin/tool/task/run_adhoctasks.php index 81a68d4535b5c..b1b831c3368cf 100644 --- a/admin/tool/task/run_adhoctasks.php +++ b/admin/tool/task/run_adhoctasks.php @@ -117,7 +117,7 @@ function ($t) use ($now) { \core\session\manager::write_close(); // Prepare to handle output via mtrace. -require('lib.php'); +require_once("{$CFG->dirroot}/{$CFG->admin}/tool/task/lib.php"); $CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper'; // Run the specified tasks. diff --git a/admin/tool/task/schedule_task.php b/admin/tool/task/schedule_task.php index c7753f5425a92..95acc4b08e003 100644 --- a/admin/tool/task/schedule_task.php +++ b/admin/tool/task/schedule_task.php @@ -85,7 +85,8 @@ // Prepare to handle output via mtrace. echo html_writer::start_tag('pre'); -require('lib.php'); + +require_once("{$CFG->dirroot}/{$CFG->admin}/tool/task/lib.php"); $CFG->mtrace_wrapper = 'tool_task_mtrace_wrapper'; // Run the specified task (this will output an error if it doesn't exist).