Skip to content
Browse files

MDL-29538 core_condition: Deleting profile fields will delete the dep…

…endencies in both the modules and sections
  • Loading branch information...
1 parent 4eafabc commit f99d3a42a2f347f4ff87ad2832ef55f0a41d817b @markn86 markn86 committed May 18, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 user/profile/definelib.php
View
3 user/profile/definelib.php
@@ -290,7 +290,8 @@ function profile_delete_field($id) {
}
// Delete any module dependencies for this field
- $DB->delete_records('course_modules_avail_fields', array('field' => $id));
+ $DB->delete_records('course_modules_avail_fields', array('customfieldid' => $id));
+ $DB->delete_records('course_sections_avail_fields', array('customfieldid' => $id));
// Need to rebuild course cache to update the info
rebuild_course_cache();

0 comments on commit f99d3a4

Please sign in to comment.
Something went wrong with that request. Please try again.