MDL-80512 tool_task: absolute path to required library file.

This commit is contained in:
Paul Holden 2024-01-23 09:14:27 +00:00
parent 810554ee83
commit c009abd938
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164
2 changed files with 3 additions and 2 deletions

View File

@ -111,7 +111,7 @@ require_sesskey();
\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.

View File

@ -89,7 +89,8 @@ echo $OUTPUT->select_element_for_append();
// Prepare to handle output via mtrace.
echo html_writer::start_tag('pre', ['style' => 'color: #fff; background: #333; padding: 1em; min-height: 24lh']);
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).