I've been trying to implement something akin to the questions_by_quiz view, but for question collections. The 'qcollection' type uses `quiz_node_relationship` table like the 'quiz' type does, but it doesn't use `quiz_node_properties`. The views_data() hook is returning a description for `quiz_node_relationship` that binds it to `quiz_node_properties` and I haven't gotten anywhere trying to work around it.

Can someone with more (i.e. any) experience programming Views support get it going?

Comments

mbutcher’s picture

Might try to get sdboyer to weigh in on this. He wrote our views support. Often he is in #drupal-quiz on IRC.

turadg’s picture

Assigned: Unassigned » sdboyer
Issue tags: +blocks40a3
sdboyer’s picture

Finally found some time to look at this today, but couldn't find you!

It's difficult to know with just the description in the issue (and going through the code to figure it out seemed impractical), but I suspect that what's going to need to happen is an implementation of hook_views_data_alter() wherein you add some specific 'virtual' fields to the quiz_node_relationships table that have different join chains. But we'll really need to talk it out more to figure it out definitively.

turadg’s picture

Thanks for working on this and sorry for the cryptic issue text.

I want to be able to make a view that, given a qcollection node, shows all the questions in it. I tried doing this but was stumped by the existing view which assumes that quiz_node_relationships only relates quiz nodes (which have entries in quiz_node_properties) to questions.

falcon’s picture

Status: Active » Needs work
falcon’s picture

Status: Needs work » Closed (fixed)

qcollection has been removed...