Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1.2, 3.2
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
MDL-56653-39 -
MDL-56653-311 -
MDL-56653_enrol_meta_edit_instance_validation -
- The unit test added should ensure that the logic wasn't affected when tweaking performance.
- Code analysis should reveal that the number of DB queries to fetch existing enrolment instances was reduced to 1.
Description
The edit_instance_validation function checks for existing meta enrolment instances.
It does so in a loop.
It should ideally fetch all of them in a single query, indexed by the course being meta-linked.