Hello,
In the course of making my regexp question type more use-friendly to the authoring teacher, I want to display all the alternative answers generated by a regexp expression - in the preview question pop-up window.
However, the question preview module and the quiz preview module share the same routine to print out the question(s), and I do not want those alternative answers to get displayed in quiz preview mode.
In my \question\questiontype\...\questiontype.php file I need a way to detect whether we are in "single question preview" or in "quiz preview" mode. So far I have used the following method.
In single question preview pop-up window, $state->attempt is always equal to zero, while it seems to be always greater than zero in the "quiz preview" window.
Can someone (Tim?) confirm that this is a reliable way to test my environment, or suggest a more reliable method?
Thanks,
Joseph

