From 07839e6af3c981da388ddf0a4776b06a0eb2ff54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Thu, 23 May 2019 07:48:54 +0200 Subject: [PATCH] MDL-65694 grade: Fix missing gradelib library In the be8f453b74fbd3 the gradelib loading was removed by mistake. So the library may not be loaded and executing the task may end with the exception - class 'grade_grade' not found. --- lib/classes/task/grade_cron_task.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/classes/task/grade_cron_task.php b/lib/classes/task/grade_cron_task.php index bfb3777f681..60d9f8a22d2 100644 --- a/lib/classes/task/grade_cron_task.php +++ b/lib/classes/task/grade_cron_task.php @@ -43,6 +43,7 @@ class grade_cron_task extends scheduled_task { */ public function execute() { global $CFG, $DB; + require_once($CFG->libdir . '/gradelib.php'); $now = time(); $sql = "SELECT i.*