Working with the 4.x branch in D7 -

I can get the basic info from questions (like the nid and the body) but none of the actual question options.

For example, on Multiple Choice questions, I can't get the options, and the "correct choice" designation.

On a T/F question, for example, I can't access (via the Views UI) whether T or F is the correct answer.

Are these options exposed via views?

I suspect that I am missing something obvious, but after exploring the various relationships, I'm not seeing how to get at this info via the Views UI.

Comments

gratefulsk’s picture

Component: Code - Import/Export » Code - Quiz core
Issue summary: View changes

I was going to open up a new issue, but I just saw this one. I have a big need to access the multiple choice alternatives using views. Does anyone know if this is possible?

djdevin’s picture

Version: 7.x-4.x-dev » 7.x-5.x-dev
Category: Support request » Feature request

It's not possible yet, the problem is that if you have a list of questions, you can't assume that they are all multichoice. This is hard to do with Views (and MySQL) because you would have to do some sort of conditional join for each question type, and each join would bring in different data.

A workaround would be to build a custom views field handler to bring in the data. But, I don't think it would be easy to sort/order by those values, you would just have one column with all the options.

nithinkolekar’s picture

now Quiz is Entity based could it be possible now?

why needed?
when importing multi choice question via feed for some questions options are not importing properly. When this questions are added to quiz(there is no way now to determine question has options set) and during quiz progress for that question array_flip error raises and breaks the quiz to continue.

If options are exposed to views we can only add those question with options are set properly. Also we can drill down to actual cause by comparing different question whose options are not set during import.

djdevin’s picture

Title: Are question options exposed via views? » Can't export question options

This is still an issue but is very difficult to implement.

Questions can be in any format so it would be very difficult to make this uniform without having the question modules themselves provide the output.

Exporting a short answer "correct" answer is much easier than exporting a multichoice or H5P correct answer.

Anaconda777’s picture

Is it possible to export question answer options?
I need to export all multiple-choice questions from database to a CSV file, trying this with views and VBO but can't get the
answer options (correct, wrong etc.) to the table.