mirror of
https://github.com/moodle/moodle.git
synced 2025-02-19 15:45:59 +01:00
The 'edit_instance_validation()' method checks for existing meta enrolment instances. The fix replaces DB queries in a loop for each course with a single query for all courses. Also, a new testing method 'test_edit_instance_validation_with_existing_courses()' was added to /enrol/meta/tests/plugin_test.php to test if the new implementation returns an error in case of trying to save the already linked courses in the 'customint1' field.