moodle/question/engine/upgrade.txt
Tim Hunt 97e9eb203e MDL-52814 questions: Show extra info in the outcomes area not info
Currently the only use is the quiz Redo question button, and that would
be much better placed in the feedback area, not least for langages where
the button label needs to be longer.
2016-02-10 08:47:10 +00:00

67 lines
2.8 KiB
Plaintext

This files describes API changes for the core question engine.
=== 3.1, 3.0.3, 2.9.5 ===
1) The field question_display_options::$extrainfocontent is now displayed in the
outcomes (yellow) div by default. It used to be in the info div. If you have
overriden the question renderer, you may need to make a corresponding change.
=== 3.0, 2.9.2, 2.8.8 ===
1) The extra internal PARAM constant question_attempt::PARAM_MARK should no
longer be used. (It should not have been used outside the core of the
question system). See MDL-51090 if you want more explanation.
=== 2.9 ===
1) Some new methods on the question_usage class (and corresponding methods on
question_attempt, question_attempt_step, question_usage_observer, ... requried
to implement them, but almost certainly you should only be calling the
question_usage methods from your code.
* question_usage::add_question_in_place_of_other($slot, $question, $maxmark = null)
This creates a new questoin_attempt in place of an existing one, moving the
existing question_attempt to the end of the usage, in a new slot number.
The new slot number is returned. The goal is to replace the old attempt, but
not lose the old data.
* question_usage::set_question_max_mark($slot, $maxmark)
Sets the max mark for one question in this usage. Previously, you could
only change this using the bulk operation question_usage::set_max_mark_in_attempts;
* question_usage::set_question_attempt_metadata($slot, $name, $value);
question_usage::get_question_attempt_metadata($slot, $name);
You can now record metadata, that is, values stored by name, against
question_attempts. The question engine ignores this data (other than storing
and loading it) but you may find it useful in your code.
To see examples of where these are used, look at the chagnes from MDL-40992.
2) New fields in question_display_options, ->extrainfocontent and ->extrahistorycontent.
These default to blank, but can be used to inject extra content into those parts
of the question display. If you have overridden the methods in
core_question_renderer that use these fields, you may need to update your renderer.
=== 2.6 ===
1) The method question_behaviour::is_manual_grade_in_range and move and become
question_engine::is_manual_grade_in_range.
2) The arguments to core_question_renderer::mark_summary changed from
($qa, $options) to ($qa, $behaviouroutput, $options). If you have overridden
that method you will need to update your code.
3) Heading level for number(), add_part_heading() and respond_history()
has been lowered by one level. These changes are part of improving the page
accessibility and making heading to have proper nesting. (MDL-41615)
=== Earlier changes ===
* Were not documented in this way. Sorry.