View for questions

turadg - November 8, 2009 - 21:26
Project:Quiz
Version:6.x-4.x-dev
Component:Code - Views
Category:feature request
Priority:normal
Assigned:sdboyer
Status:needs work
Description

A "View type" for question nodes would help for the question repository set of use cases. Some of the reasons for the 'qcollection' node type could be accomplished with this. (see #562222: Merge quiz and qcollection?)

Is it possible to have a "View type" that encompasses a set of node types? Our "question" is an abstract class that has several concrete node types.

#1

falcon - November 10, 2009 - 09:21
Assigned to:Anonymous» sdboyer
Status:active» needs work

sdboyer?

#2

sdboyer - November 10, 2009 - 16:36

I actually explored something like this when doing the integration initially. Unfortunately, View types are defined by the 'base table' that everything is calculated against. Since node type information is not expressed in a way that follows this architectural requirement, we can't use the view type to effectively behave like a permanent filter on node types.

I'm not quite sure what effect you're going for here, but there are a few things we could do that might do something along these lines: we could write a single filter that always filters down node types to only those that are question types, without requiring any configuring/updating from the UI whenever question types are added or removed. We also could probably construct a Question view type, but it wouldn't automatically include the kind of filtering you're talking about. Really, most of what it would do is just constrain the number of handlers available to be added in Views' various dropdowns.

So...what's the goal here?

#3

turadg - November 10, 2009 - 20:43

Part of the issue is that I don't understand the "Quiz" view type… how is it different from Node or User for that matter? Is anything lost by using the Node view type instead of the Quiz view type? If not, then I could just do what I need with some filters. It would be nice to have a predefined filter for "question types" but not a blocker for 4.0.

I'll try to explain in more detail what I'm after. I have a question database site. There are thousands of questions, multiple groups that they belong to, and multiple contributors. There are also revisions from multiple people, etc. Each group has its own taxonomy. I need to be able to generate lots of different views on the questions. Last summer I made the qcollection type to allow users to make sets of questions, but now I think I'm better off using taxonomies for that. I.e. questions are together in a "set" if they share a taxonomic term. They appear in the views. Then questions in a view can be turned into an interactive 'quiz' or exported or whatever.

Here are some views that I need to be able to make:
All the questions that…
1) are on the site
2) are in a group or set of groups
3) share a taxonomic term
4) use one of 1 or more Creative Commons licenses (it has a relationship handler already I think)
5) are authored by a particular user
6) come from a particular source
7) are in a particular quiz
8) have a rating >= some threshold
*) the inverse of any of these (e.g. do *not* have a rating >= some threshold)
*) any combination of the above

How hard is that? :) I think if that all works, I don't need the 'qcollection' type anymore, which means less work to change views. (see #562222: Merge quiz and qcollection?)

If not, then there remain these two issues to deal with: #533980: Views support for qcollection and #539020: View of what quiz and qcollection nodes point to a given question node.

#4

turadg - November 10, 2009 - 20:49

I forgot another set of use cases, which I remembered after rereading #539020: View of what quiz and qcollection nodes point to a given question node.

For a given question…
B1) All the quizzes that contain it
B2) All the qcollections that contain it (if kept)
B3) All the student responses to it
B4) The distribution of responses
B5) Statistics on responses
B6) Other questions that match some value of the question (e.g. author, taxonomy term, etc.)

These are lower priority, but things I will need for my site eventually and I expect others will too.

 
 

Drupal is a registered trademark of Dries Buytaert.