-
Improvement
-
Resolution: Fixed
-
Major
-
DEV backlog
Of course, other people will want different defaults. Ordering already has a feature where it remembers the last settings the author made, automatically applying them to the next Ordering question. We want to do the same for other settings and other question types. This will speed things up significantly. for people creating many similar questions (see Moodle forum: https://moodle.org/mod/forum/discuss.php?d=417341).
Teachers create lots of questions on various types in Moodle, some of which have repeatedly similar default settings form elements such as ‘Default mark’, ‘One or multiple answers?’, ‘Shuffle the choices?’, ‘Number the choices?’, ‘Show standard instructions’ (in qtype_multichoice), etc.
On the way for Moodle3.11 there are 3 new methods in question/type/questiontypebase.php get_default_value(), set_default_value() and save_defaults_for_new_questions().
get_default_value(), if needed, used in the edit_
{qtypename}_form.php when using $mform->setDefault().save_defaults_for_new_questions() if needed, is implemented in {qtypename}
/questiontype.php which calls the parent's method and then set_default_value() for each form element, where we used get_default_value() in edit_
{qtypename}_form.php. Obviousely, if get_default_value() was not used, then there is no need to implement save_defaults_for_new_questions() method.
- blocks
-
MDL-71225 Add default options for ddimageortext, ddmarker and match question types
- Closed
- has a QA test
-
MDLQA-16042 When creating a new question, in the question field defaults that a teacher used previously are used
- Open
-
MDLQA-16043 CLONE - When creating a new question, the question field defaults that a teacher used previously are used
- Passed
-
MDLQA-16670 CLONE - When creating a new question, in the question field defaults that a teacher used previously are used
- Passed
-
MDLQA-17286 CLONE - When creating a new question, in the question field defaults that a teacher used previously are used
- Passed
- has been marked as being related by
-
MDL-78906 Add explanatory text to clarify question format defaults
- Open
-
MDL-82588 Question "sticky" defaults improvements
- Open
-
MDL-81075 Provide an option to disable "sticky" defaults when creating questions
- Closed
- has to be done before
-
MDL-71262 Add default options for essay question type
- Closed
- Testing discovered
-
MDL-71258 Question types need to declare their user preferences to the privacy system
- Closed