[AMOS commit] MDL-74762 qbank_statistics: improve performance loading the data Committed into Git: 2022-05-30 10:15 UTC

[AMOS commit] MDL-74762 qbank_statistics: improve performance loading the data Committed into Git: 2022-05-30 10:15 UTC

by AMOS bot -
Number of replies: 0
Author: Nathan Nguyen
MDL-74762 qbank_statistics: improve performance loading the data
This issue greatly improves the performance of displaying statistics in
the question bank.

1. The required quiz statistics are now pre-computed by a scheduled task.

2. Cached statistics in the database are now never cleaned up, so the
pre-computed stats are always available.

3. The way the cached statistics are loaded for each question
that is being displayed is now a bit more efficient.

4. Related to that, there is a new callback which activities can implement,
if they want their question statistics to be included in the ones shown
in the question bank.

Note, there is still further improvement possible to load the statistics
for all questions being displayed in bulk. However, that must wait for a
future issue, MDL-75576. The other improvements in this issue are
significant and we did not want to delay releasing them.

Co-authored-by: Jonathan Champ <jrchamp@ncsu.edu>
Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>


http://git.moodle.org/gw?p=moodle.git;a=commit;h=92f979948ff6fea76a322d9a33e96df9cf45e295
http://github.com/moodle/moodle/commit/92f979948ff6fea76a322d9a33e96df9cf45e295

+ 4.0 en [recalculatetask,quiz_statistics]
- 4.0 en [quizstatisticscleanuptask,quiz_statistics]