MDL-66671 enrol_lti: Skip grade sync when cm deleted

This commit is contained in:
Daniel Thies
2020-02-28 09:30:34 -06:00
parent b4a13e9a65
commit 4a2e0b810f
+1 -1
View File
@@ -100,7 +100,7 @@ class sync_grades extends \core\task\scheduled_task {
}
// Need a valid context to continue.
if (!$context = \context::instance_by_id($tool->contextid)) {
if (!$context = \context::instance_by_id($tool->contextid, IGNORE_MISSING)) {
mtrace("Failed - Invalid contextid '$tool->contextid' for the tool '$tool->id'.");
continue;
}