-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.8, 4.3, 4.4
The core_courseformat_get_state web service is slow on large sites, due to core_courseformat\output\local\state\cm::export_for_template() calling is_tracked_user() for every course module on the course. As it is being called for the same user and course, the result will always be the same. The query called within this function only takes around 0.01s, but on a course with several hundred course modules that adds up. This request holds a session lock, so it should be made a fast as possible.
cm::export_for_template should be rewritten so is_tracked_user() is only called once.