Merge branch 'MDL-65050-master-fix' of git://github.com/lameze/moodle

This commit is contained in:
Adrian Greeve 2019-04-01 16:05:34 +08:00
commit 878c88df95

View 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;