moodle/question/bank/upgrade.txt
Tim Hunt bc7dacecb6 MDL-75576 question bank: bulk-load statistics for all questions at once
There is a new method on the column class, for the column to declare any
statistics it requires. The question then efficiently loads all those
statistics in one go, and makes them available as the columns are
rendererd, or do any subsequent processing.
2023-05-15 10:03:26 +01:00

28 lines
1.5 KiB
Text

This file describes core qbank plugin changes in /question/bank/*,
information provided here is intended especially for developers.
=== 4.2.1 ===
* There is a new more effecient way to display statistics in the question bank, you should now override
the get_required_statistics_fields() method in your column class, and then
the values you need will be available from $this->qbank->get_aggregate_statistic(...).
If you are not in a question_bank_column class, you can directly access efficient
statistics-loading from the core_question\local\statistics\statistics_bulk_loader class.
The old method will be deprecated in 4.3.
=== 4.1 ===
* New functions qbank_usage\helper::get_question_bank_usage_sql and
qbank_usage\helper::get_question_attempt_usage_sql have been implemented.
When calling a query with the SQL those methods returned, you have to be sure
in the accompanying $params array are in the right order.
=== 4.0 ===
* This plugin type is new in Moodle 4.0. It is for adding features to the question bank.
They key entry point is the class plugin_feature in the plugin namespace. This tells
the core question bank API exactly which features this plugin implements.
These features can currently be new columns in the question bank display, and bulk actions.
Currently, actions on single questions are implemented as a type of column (but this
should probably change in the future.) To get started, have a look at the methods
in core_question\local\bank\plugin_features_base which you can override.