When I create a view of type quiz, the row style for the views shows up as fields. There is no option to change it to node.
Am I missing something? Or this is currently not implemented?
I also tried creating a regular node view with row style set to node, and tried adding relationship to question type.
Here the relation to quiz is available but not to quiz question. The quiz question relation is only available to a view of type quiz.
Is there a way to add the quiz question relationship in a regular view of type node?
I am trying to do this to achieve a full page view of all the questions. The ultimate goal being to make the quiz questions available for download as pdf using the print module. There is no need for the questions to be submittable.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 0001-Add-a-Views-table-join-for-the-quiz_node_relationshi.patch | 1.83 KB | michaelk |
| #4 | views_relationship.patch | 1.45 KB | michaelk |
Comments
Comment #1
v-a-1 commentedOk, so I've had some progress. I decided to try and modify the quiz.views.inc file to try and expose the answer fields from the multichoice question type. (Find code below).
I think I have the implementation correct, and the relationship of quiz_multichoice_answers table to quiz_node_relationship is also correct. But somehow it doesn't work. However, if I change the join for quiz_multichoice_answers to quiz_node_properties along with relevant changes to the 'left_field', instead of the above stated quiz_node_relationship, I can at least see the group and the fields listing in views UI. However nothing gets returned and the query that is run makes no sense.
Currently, with the following code, there are no fields or the group available in views. Any ideas?
I added the above to the quiz.views.inc just before the return $data line.
Comment #2
v-a-1 commentedI just found two other issues that are more or less related. Just thought I'd mention it.
http://drupal.org/node/451302#comment-1551482
and
http://drupal.org/node/1115476
Comment #3
sokrplare commentedComment #4
michaelk commentedHello,
Here is a patch that adds the Quiz Question relationship off of the node table for Views. We are using this code to handle a case similar to the one described in the ticket, so it seems like it should also fix this case.
Please note, this patch is for the 7.x-4.x version of the module.
Comment #5
michaelk commentedComment #6
michaelk commentedHere is the patch with the correct attribution.
Comment #7
djdevinFixed in 7.x-5.0 with entity API views support.