Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-29538 core_condition: delete the course modules records in the co…

…urse_module_avail_fields table when deleted
  • Loading branch information...
commit af2ce7806b6d66796737edb6cc5ff3b36932c117 1 parent 5fa220f
@markn86 markn86 authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  course/lib.php
View
1  course/lib.php
@@ -2929,6 +2929,7 @@ function delete_course_module($id) {
// very quick on an empty table)
$DB->delete_records('course_modules_completion', array('coursemoduleid' => $cm->id));
$DB->delete_records('course_modules_availability', array('coursemoduleid'=> $cm->id));
+ $DB->delete_records('course_modules_avail_fields', array('coursemoduleid'=> $cm->id));
$DB->delete_records('course_completion_criteria', array('moduleinstance' => $cm->id,
'criteriatype' => COMPLETION_CRITERIA_TYPE_ACTIVITY));
Please sign in to comment.
Something went wrong with that request. Please try again.