Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.5.8, 3.6.6, 3.7, 3.7.5
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-66671-master -
Description
As reported in https://moodle.org/mod/forum/discuss.php?d=390299
If a resource used by LTI is removed "\enrol_lti\task\sync_grades" task crash due to a missing context.
$ php www/admin/tool/task/cli/schedule_task.php --execute='\enrol_lti\task\sync_grades' |
Execute scheduled task: Publication comme outil LTI de synchro des notes (enrol_lti\task\sync_grades)
|
Starting - Grade sync for shared tool '1' for the course '2'. |
Not sent - The grade for the user '10' in the tool '1' for the course '2' was not sent as the grades are the same. |
Not sent - The grade for the user '4' in the tool '1' for the course '2' was not sent as the grades are the same. |
Not sent - The grade for the user '12' in the tool '1' for the course '2' was not sent as the grades are the same. |
Completed - Synced grades for tool '1' in the course '2'. Processed 3 users; sent 0 grades. |
Starting - Grade sync for shared tool '3' for the course '2'. |
... used 27 dbqueries |
... used 0.095687866210938 seconds |
Scheduled task failed: Publication comme outil LTI de synchro des notes (enrol_lti\task\sync_grades),Impossible de trouver l'enregistrement de données dans la table context de la base de données.
|
Debug info:
|
SELECT * FROM
|
{context}
|
WHERE id = ?
|
[array (
|
0 => '28', |
)]
|
Backtrace:
|
|
line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select() line 5115 of /lib/accesslib.php: call to moodle_database->get_record() line 103 of /enrol/lti/classes/task/sync_grades.php: call to context::instance_by_id() line 156 of /admin/tool/task/cli/schedule_task.php: call to enrol_lti\task\sync_grades->execute() |
Reproduced on latest Moodle 3.5.7+.
Not tested against 3.5.8, 3.6, 3.7 and master yet but seeing enrol_lti git history they should be impacted too.