-
Improvement
-
Resolution: Fixed
-
Minor
-
3.4
-
MOODLE_34_STABLE
-
MOODLE_35_STABLE
-
MDL-60967-master -
For larger users the course_filter_selector can load more courses than can be held in the course context cache which means each of them loads the context from the DB again in a loop.
Instead we should just preload all of the contexts for the required courses in a single query. We could even have it check if the number courses are likely to exceed the context static cache limit and only do the preloading if it looks like we'll thrash the cache otherwise.