Permalink
Browse files

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

…urse_module_avail_fields table when deleted
  • Loading branch information...
1 parent 5fa220f commit af2ce7806b6d66796737edb6cc5ff3b36932c117 @markn86 markn86 committed May 9, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 course/lib.php
View
@@ -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));

0 comments on commit af2ce78

Please sign in to comment.