More than one question

michemon - July 4, 2007 - 16:58
Project:Advanced Poll
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Is it possible to have a Poll with more than one question?

For example, three questions, each with three possible choise.

Thanks,
Michele

#1

fajerstarter - July 6, 2007 - 10:07
Version:5.x-1.0-beta4» 5.x-1.x-dev

No, it's not possible. Could you give an practical example were this could be useful?

#2

NancyDru - July 6, 2007 - 12:05

How about an election ballot? Or how about "If you voted yes above, then select from these choices..."

#3

fajerstarter - July 7, 2007 - 08:58
Category:support request» feature request

Thinking about it, it might such a big shift in the codebase after all, at least not database wise. The title that we now use for the question has to be changed to a regular title, something I support anyway (currently I write the question at the end in the description field for my polls).

Database wise we introduce a new field, e.g. 'qid' (question id) and 'question' in the advpoll table to support many questions.

#4

fajerstarter - July 7, 2007 - 11:18

On third thoughts: VotingAPI, which advpoll depends on, would not support this.

#5

NancyDru - July 8, 2007 - 17:12

How about chaining questions? For example, if the answer to question 1 is "yes," then show question 2, otherwise show question 3 or stop.

#6

michemon - July 9, 2007 - 16:38

Normally when a poll is organized, it is never composed by one question.
You have a set of questions and for each question some choisis...

More than this (but this is not my initial request) you can have different questions depending of your preceding answers, as nancyw wrote.

Now the Poll content or the AdvPoll content are simply a part o a real poll.
So maybe constructing a content composed by different advpoll content, could give an answer to my question??

What do you thik about it?

#7

g011um - July 30, 2007 - 19:12

Elections is what I was hoping to use this module for as well. We hold a lot of online elections (for committee representation etc) but would need a system that would allow more than one question on a single "ballot". The original "three questions, each with three possible choices" is an excellent example -- 3 positions open on the committee, each with 3 different staff members running for election.

We'd also see the ability to pick differing numbers of candidates for each ballot question a must. i.e. For "Position One" on the ballot, allow the choice of your top 2 candidates; for "Position Two" and "Position Three", allow only 1.

If VotingAPI really only supports a single "poll", then I think michemon's suggestion of pulling together multiple AdvancedPoll questions into a single "ballot". Voting would then just loop through the questions using VotingAPI to register the votes for each individually.

#8

ChrisKennedy - July 30, 2007 - 19:20

I suspect this would basically be possible if we supported cck and/or interfaced with http://drupal.org/project/webform

But, I should point out that if you're electing multiple positions to the same committee, it's better to do so by creating a single poll and then electing the top N candidates to those positions. Ideally you would use CPO-STV rather than the currently supported ranking algorithms; IRV or BC are okay though.

#9

fajerstarter - July 30, 2007 - 20:05

UI wise CCK would work for this. I don't know much about CCK, but I still can't see how the votes would be recorded by Voting API, as the recording of votes is using the node id (content_id). If there are several polls on the same node, which conten_id would you save in Voting API? Can you save the same id and still calculate the result?

There is a poll field for CCK though (I don't know how it records its votes): http://drupal.org/project/pollfield. That might be an option for some people (and let us focus on more important stuff ;) ).

#10

ChrisKennedy - August 5, 2007 - 21:04

I was thinking that we might be able to store a field_id in content_id and then have a separate id for each field instance, as well as a mapping of node ids to field ids.

#11

NancyDru - August 18, 2007 - 02:40

I sort of created a multiple vote "ballot" by using a vocabulary and a taxonomy/term/xxx menu entry.

#12

NancyDru - August 18, 2007 - 02:41

What is "CPO-STV"

#13

fajerstarter - August 18, 2007 - 06:03

I had no idea but I used google: http://en.wikipedia.org/wiki/CPO-STV

#14

jdleonard - October 9, 2007 - 15:54

I'm willing to help develop this, but I guess I need a little more direction before I do anything.

#15

fajerstarter - October 10, 2007 - 08:36

vinegar5: nice!

I'm no sure if this qualifies as direction, but here are some thoughts:

I first thought that CCK would be perfect for this: be able to create a custom node type that could hold e.g. 5 binary polls and 3 ranking polls. Then I realised that the functionality people is asking for may not be that but instead is more similair to e.g. quiz module: be able to create a node and then add X number of polls to it. I suspect the latter (quiz style) to be more complicated to implement (but maybe not).

Chris had some ideas how to store the votes in comment #10.

#16

jdleonard - December 10, 2007 - 06:23

Apparently I don't have time to get around to this. Sorry to anyone who's been waiting!

#17

jdleonard - March 21, 2009 - 05:24

I know it has been a while, but perhaps people are ready for another look at this. Would it be possible to provide a new content type, "Multi-poll" or something, that would allow the user to select and order existing advpoll nodes. In the use case of elections, the multi-poll would combine each selected node into one "ballot" with only one submit button. Validation would have to pass for all of the selected nodes for the vote to be registered. I have no idea how to implement this strategy though. Thoughts and suggestions?

#18

ChrisKennedy - March 21, 2009 - 15:25
Version:5.x-1.x-dev» 6.x-1.x-dev

I think the easiest way to figure this out is to look at how http://drupal.org/project/webform handles this issue and apply it to Advpoll, provided that webform works well. We might need to support advpoll-as-a-field first though, which would be awesome.

#19

greenoak - September 22, 2009 - 21:38

Thank you ChrisKennedy for your generous contributions to the Drupal community. I am curious what you mean by "if we supported cck". Does this have something to do with the issue I filed?

#584018: CCK field won't save when I create a new node

Thanks,
Eric

 
 

Drupal is a registered trademark of Dries Buytaert.