-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Future Dev, 4.4
-
MOODLE_404_STABLE
In the question edit form, question/type/edit_question_form.php
Near the top of the form there is this old-style callback https://github.com/moodle/moodle/blob/master/question/type/edit_question_form.php#L214-L226, but only if you are editing an existing question, and since it is right at the top, you cannot control where your new fields go in relation to the other fields.
it would help qbank plugins to manage and position their fields more easily.
So, it not moving a piece of code, but adding a new funcitionality.
Here I propose to add a new plugin_feature for qbank plugins allowing them to introduce and manage any fields into the question edit form.
The proposal includes:
- new class question_edit_handler_base.php to manage instance_form_definition, instance_form_save and data
- new function get_question_handler() in plugin_features extending this class (or customfield_handler
- Substituting customfieldhandler in edit_question_form by an array of form handlers loaded form qbank plugins
- Substituting customfieldhandler in question/bank/editquestion/question.php this these handlers to take care of instance_form_before_set_data() and instance_form_save
- A new helper get_all_qbank_plugin_features() into engine/bank.php to be able to consult features if any enabled plugins.
- has a non-specific relationship to
-
MDL-80682 Display of version information should be clearer on edit question page
-
- Closed
-