-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.5, 2.3, 2.4
-
MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
master_
MDL-35557 -
The sync_courses function in enrol/database/lib.php uses the following call to get a list of the courses that need to be imported:
$sql = $this->db_get_sql($table, array(), $sqlfields);
if the same table is used that contains the enrolment data this will return all rows in the table and the code iterates over each one to see if it needs to create the course - db_get_sql(enrol/database function) has a 4th param $distinct which is used in sync_enrolments already so we should use it here as well.
It would improve performance of the sync_courses function a lot if we only obtained the records that we needed from the table by using the extra distinct param.
- blocks
-
MDL-35701 Add unit tests, cleanup and add restore support for enrol_database
-
- Closed
-