MDL-75576 quiz statistics: don't compute when a user views the qbank
commit174e2ae3b5ee8a1337a8450cfcc7b87556ab5fb2
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 30 Jan 2023 16:02:50 +0000 (30 16:02 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 15 May 2023 08:59:34 +0000 (15 09:59 +0100)
tree3613b04e349241d00c504bcd359d81ef1174eb11
parent056db339d6ad833db90d3b47502c2f97e46451ec
MDL-75576 quiz statistics: don't compute when a user views the qbank

Previously, when a user viewed the question bank, if the quiz statistics
had not already been calculated, we would try to compute them there an then.
This could be very, very slow, leading to session lock problems.

Now, we never try to compute the statistics on the fly. Instead, we rely
on the existing \quiz_statistics\task\recalculate scheduled task to do it.
mod/quiz/lib.php
mod/quiz/report/statistics/report.php
mod/quiz/report/statistics/upgrade.txt
question/bank/statistics/tests/behat/statistics_values.feature
question/bank/statistics/tests/helper_test.php
question/tests/local/statistics/statistics_bulk_loader_test.php