-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
4.4.2
-
MOODLE_404_STABLE
Due to unoptimized programming code, some enrollment/unenrollment functions have serious performance issues. One example is the manual enrolment and unenrolment of course participants, during which thousands of queries are made to the database in order to register or delete only 1000 users in one course. It is necessary to create optimized functions for such key actions in the system to be performed with significantly fewer queries and load on the database. Manual enrolment and unenrolment is one example, but exactly the same problem exists in cohort sync enrolment.
Steps to reproduce:
1. Create cohort with 1000 users
2. Manually enroll created cohort to any course
3. Refresh browser and wait
4. Open participants list in the course with 1000 enrolled users
5. Select all users
6. Delete manual enrollment for all selected users and wait
7. Add cohort sync enrolment method to the course
8. Choose cohort with 1000 users
9. Save cohort sync enrolment method and wait