MDL-66259 qtypes: get_question_options() always call parent::
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 19 Nov 2019 18:08:20 +0000 (19:08 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 24 Apr 2020 13:56:23 +0000 (15:56 +0200)
commitbb930b7d5bd62bf9a3620ad2e93d7f079fd15ca0
tree2f760346e22445aec2863659ab37cb315f969779
parent5c3f700ac747ab47411f790087b7794cff35f2b9
MDL-66259 qtypes: get_question_options() always call parent::

To get the question->options initialised, children must
call parent::get_question_options() always. Also, it is
just general good practice. Subclasses are meant to be
adaptations of the base class, not something completely
different.

Note, there are some changes in the data structure
produced (see changes in the tests) but these changes
are not wrong.
question/type/calculated/questiontype.php
question/type/calculated/tests/questiontype_test.php
question/type/multianswer/questiontype.php
question/type/multianswer/tests/questiontype_test.php
question/type/random/questiontype.php
question/type/random/tests/questiontype_test.php
question/type/truefalse/questiontype.php
question/type/truefalse/tests/questiontype_test.php