You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested this plugin in Moodle3.8
There seems to be an issue in the Courses/delete_dangling_course_contexts function.
ERROR
Default exception handler: Error writing to database Debug: Unknown table 'mdl_context' in MULTI DELETE
DELETE FROM mdl_context USING mdl_course
WHERE contextlevel = 50
AND mdl_context.instanceid = mdl_course.id
AND mdl_course.id IS NULL
The Error is produced with the execution of the following statement
$DB->execute("DELETE FROM {context} USING {course}
WHERE contextlevel = 50
AND {context}.instanceid = {course}.id
AND {course}.id IS NULL");
This is the correcting statement I used to successfully remove the dangling course context.
$DB->execute("DELETE {context} FROM {context}
LEFT JOIN {course}
ON {context}.instanceid = {course}.id
WHERE {course}.id IS NULL
AND {context}.contextlevel = 50");
The text was updated successfully, but these errors were encountered:
I have tested this plugin in Moodle3.8
There seems to be an issue in the Courses/delete_dangling_course_contexts function.
ERROR
The Error is produced with the execution of the following statement
This is the correcting statement I used to successfully remove the dangling course context.
The text was updated successfully, but these errors were encountered: