MDL-29538 core_condition: initial commit to add support for making things conditional on user profile fields

This commit is contained in:
Mark Nelson 2011-09-26 21:20:17 +08:00
parent 6be7840ce6
commit 76af15bb4c
11 changed files with 399 additions and 10 deletions

View file

@ -289,6 +289,10 @@ function profile_delete_field($id) {
print_error('cannotdeletecustomfield');
}
// Delete any module dependencies for this field
$DB->delete_records('course_modules_availability_field', array('field'=>$id));
// Need to rebuild course cache to update the info
rebuild_course_cache();
/// Try to remove the record from the database
$DB->delete_records('user_info_field', array('id'=>$id));