Affects Version/s: 3.9.1
Fix Version/s: None
Component/s: Module: Scheduler
We've encountering a problem editing a slot, if a huge amount of students are enrolled in the course and there are a lot of appointments.
This is the PHP error message:
We've this setup which leads to this error:
- memory_limit: 512M
- students in course: 3206
- appointments: 38 (max. 40)
We could increase the PHP memory_limit but this is not the right solution. So we analzed the issue and can sumarry following:
- The `searchableselector` is always populated with this huge array of options (studentchoices) (https://github.com/bostelm/moodle-mod_scheduler/blob/master/slotforms.php#L259).
- This element will be rendered in each appointment group with the core function `repeat_elements` (https://github.com/bostelm/moodle-mod_scheduler/blob/master/slotforms.php#L309).
So we think, that we must solve this issue with AJAX calls, so that it will be similar to the `course` and `tags` sublcasses of the `autocomplete` element (https://docs.moodle.org/dev/lib/formslib.php_Form_Definition#autocomplete).
What do you think?