A question for Tim!
I am currently updating my REGEXP question type for moodle 2.1 (shortly after updating it for 2.0...) and I have a question.
In the renderer.php file, I am overriding public function feedback with one change:
if ($options->feedback) {
$output .= html_writer::nonempty_tag('div', $this->specific_feedback($qa, $options), etc.
This is because, in public function specific_feedback(question_attempt $qa, question_display_options $options), I need to retrieve the behaviour of the actual question. I still have to find my way through all the - new to 2.1 - question behaviours. But that is not the problem.
My problem is as follows.
1.- In the question preview popup window, it is now possible to select "behaviour being used" from the How questions behave dropdown list. That is a great feature, thanks Tim!
With the override explained above, I can easily retrieve $options->behaviour and use that property for my special feedback needs... That is fine.
2.- However, I also need to retrieve the actual question's behaviour when a question is included in a quiz. Unfortunately, in the renderer.php file, inside public function specific_feedback(question_attempt $qa, question_display_options $options), $options->behaviour is not available. I get this error notice:
Notice: Undefined property: mod_quiz_display_options::$behaviour
What should I do?
Joseph