Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Quiz Item Analysis of Multianswers Question Types.

Development:Quiz Item Analysis of Multianswers Question Types

From MoodleDocs

This page described a code proposal to access the embedded questions data in multianswers questiion types so that they can be displayed in the Item analysis report. See http://moodle.org/mod/forum/discuss.php?d=86598#387154 The code is experimental and need more testing and is not optimized.

All question types to be analyzed contain at least one embedded question

If we set this as a general framework, the code will be valid for all question types.

We need a question type function to retrieve the embedded questions

There is actually no question type function to know the number the embedded questions in a question. The default function number_of_embedded_questions() returns 1;

This is not the same as  actual_number_of_questions().

We need a convention of how to store the responses from the different embedded questions

The same convention should be used in the $session states and in the get_responses function. The actual responses convention used an array to contains the different answers and put in [] element the actual response. To distinguish