1 |
efrain |
1 |
This file describes core qbank plugin changes in /question/bank/*,
|
|
|
2 |
information provided here is intended especially for developers.
|
|
|
3 |
|
|
|
4 |
=== 4.4.1 ===
|
|
|
5 |
|
|
|
6 |
* column_base::from_column_name now has an ignoremissing field, which can be used to ignore
|
|
|
7 |
if the class does not exist, instead of throwing an exception.
|
|
|
8 |
|
|
|
9 |
=== 4.4 ===
|
|
|
10 |
|
|
|
11 |
* Question bank actions (anything that subclasses question_action_base) should implement the
|
|
|
12 |
method get_menu_position() to control what position in the action menu it appears it.
|
|
|
13 |
See the comment on the base class method for more details. If you don't do this, you will
|
|
|
14 |
get a debugging warning.
|
|
|
15 |
|
|
|
16 |
=== 4.3 ===
|
|
|
17 |
|
|
|
18 |
* The helper class in qbank_statistics has had several of its methods deprecated.
|
|
|
19 |
If you want to display statistics in the question bank, you should now override
|
|
|
20 |
the get_required_statistics_fields() method in your column class, and then
|
|
|
21 |
the values you need will be available from $this->qbank->get_aggregate_statistic(...).
|
|
|
22 |
If you are not in a question_bank_column class, you can directly access efficient
|
|
|
23 |
statistics-loading from the core_question\local\statistics\statistics_bulk_loader class.
|
|
|
24 |
|
|
|
25 |
* Question actions are now implemented as a standalone qbank plugin feature. Instead of passing the actions
|
|
|
26 |
through get_question_columns(), plugins implementing actions will now have to use get_question_actions(). Action classes are
|
|
|
27 |
implemented by extending the new question_action_base class, which replaces the deprecated action_column_base class,
|
|
|
28 |
menu_action_column_base class and menuable_action interface. The shared functionality between actions and columns has now
|
|
|
29 |
been moved to the shared view_component base class.
|
|
|
30 |
|
|
|
31 |
=== 4.1 ===
|
|
|
32 |
|
|
|
33 |
* New functions qbank_usage\helper::get_question_bank_usage_sql and
|
|
|
34 |
qbank_usage\helper::get_question_attempt_usage_sql have been implemented.
|
|
|
35 |
When calling a query with the SQL those methods returned, you have to be sure
|
|
|
36 |
in the accompanying $params array are in the right order.
|
|
|
37 |
|
|
|
38 |
=== 4.0 ===
|
|
|
39 |
|
|
|
40 |
* This plugin type is new in Moodle 4.0. It is for adding features to the question bank.
|
|
|
41 |
They key entry point is the class plugin_feature in the plugin namespace. This tells
|
|
|
42 |
the core question bank API exactly which features this plugin implements.
|
|
|
43 |
These features can currently be new columns in the question bank display, and bulk actions.
|
|
|
44 |
Currently, actions on single questions are implemented as a type of column (but this
|
|
|
45 |
should probably change in the future.) To get started, have a look at the methods
|
|
|
46 |
in core_question\local\bank\plugin_features_base which you can override.
|