MDL-65050 core: add missing lib file include
authorSimey Lameze <simey@moodle.com>
Mon, 1 Apr 2019 07:28:30 +0000 (15:28 +0800)
committerSimey Lameze <simey@moodle.com>
Mon, 1 Apr 2019 07:59:03 +0000 (15:59 +0800)
lib/classes/task/question_preview_cleanup_task.php

index 1044373..e307820 100644 (file)
@@ -45,6 +45,8 @@ class question_preview_cleanup_task extends scheduled_task {
      * Throw exceptions on errors (the job will be retried).
      */
     public function execute() {
+        global $CFG;
+        require_once($CFG->dirroot . '/question/engine/lib.php');
 
         // We delete previews that have not been touched for 24 hours.
         $lastmodifiedcutoff = time() - DAYSECS;