mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
a92e5c5770
If a quiz had a long job to calculate statstics running, this would cause pages that may also attempt a recalculation (the statistics report page or question bank) to load very slowly, and possibly result in a database deadlock. This change will firstly prevent the question bank page performing analysis calculations at all, since these are not required for this page, which will speed up loading and prevent deadlocks on this page. Secondly, this adds a lock to the recalcuation process so that it cannot run twice concurrently. This will present the user with a message to indicate that it is waiting for a running calculation until it is complete, and eventually it will timeout with a message and debugging.