mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-29538 core_condition: initial commit to add support for making things conditional on user profile fields
This commit is contained in:
parent
6be7840ce6
commit
76af15bb4c
11 changed files with 399 additions and 10 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue