Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to have a Poll with more than one question?
For example, three questions, each with three possible choise.
Thanks,
Michele
Comment | File | Size | Author |
---|---|---|---|
#28 | advpoll-multirate_polls-156783-20.patch | 26.83 KB | matdab |
#27 | advpoll.install.txt | 16.37 KB | matdab |
#27 | multirate.inc_.txt | 10.4 KB | matdab |
#27 | advpoll-display-multirate-form.tpl_.php_.txt | 637 bytes | matdab |
#27 | advpoll.pages_.inc_.txt | 8.05 KB | matdab |
Comments
Comment #1
anders.fajerson CreditAttribution: anders.fajerson commentedNo, it's not possible. Could you give an practical example were this could be useful?
Comment #2
NancyDruHow about an election ballot? Or how about "If you voted yes above, then select from these choices..."
Comment #3
anders.fajerson CreditAttribution: anders.fajerson commentedThinking 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.
Comment #4
anders.fajerson CreditAttribution: anders.fajerson commentedOn third thoughts: VotingAPI, which advpoll depends on, would not support this.
Comment #5
NancyDruHow about chaining questions? For example, if the answer to question 1 is "yes," then show question 2, otherwise show question 3 or stop.
Comment #6
michemon CreditAttribution: michemon commentedNormally 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?
Comment #7
g011um CreditAttribution: g011um commentedElections 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.
Comment #8
ChrisKennedy CreditAttribution: ChrisKennedy commentedI 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.
Comment #9
anders.fajerson CreditAttribution: anders.fajerson commentedUI 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 ;) ).
Comment #10
ChrisKennedy CreditAttribution: ChrisKennedy commentedI 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.
Comment #11
NancyDruI sort of created a multiple vote "ballot" by using a vocabulary and a taxonomy/term/xxx menu entry.
Comment #12
NancyDruWhat is "CPO-STV"
Comment #13
anders.fajerson CreditAttribution: anders.fajerson commentedI had no idea but I used google: http://en.wikipedia.org/wiki/CPO-STV
Comment #14
jdleonardI'm willing to help develop this, but I guess I need a little more direction before I do anything.
Comment #15
anders.fajerson CreditAttribution: anders.fajerson commentedvinegar5: 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.
Comment #16
jdleonardApparently I don't have time to get around to this. Sorry to anyone who's been waiting!
Comment #17
jdleonardI 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?
Comment #18
ChrisKennedy CreditAttribution: ChrisKennedy commentedI 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.
Comment #19
ericbroder CreditAttribution: ericbroder commentedThank 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
Comment #20
Agileware CreditAttribution: Agileware commentedA while ago I created this patch for a client but never had time to submit it back to drupal.org.
Now I have to upgrade the site to drupal 6 so I have ported my old patch to drupal 6.
So here it is.
I see lots of different ideas about what this issue would implement but I think my patch is relevant to this issue.
The patch adds a new poll type multirate, which allows voting on multiple criteria.
For example, a poll might be:
How would you rate drupal.org on the following?
Performance: 1 2 3 4 5
Ease of use: 1 2 3 4 5
Accessibility: 1 2 3 4 5
Design: 1 2 3 4 5
Then the user votes on each criteria and submits.
Admins can choose the criterion, how many options there will be for each criteria, whether or not to display an overall score in addition to the individual criteria scores, the labels for the min and max vote etc.
Currently it doesn't support write ins but that would not be that hard to add I would imagine.
Users could be able to add write ins, which would each be a new criteria.
Comment #21
HitbyThanks for the patch Agileware...I've run it against 6.x-1.x-dev and it doesn't throw any errors but I don't get the added multirate option in my create content menu. Caches all flushed etc. Am I missing something simple?
Thanks again,
Comment #22
Agileware CreditAttribution: Agileware commentedDid all of the patch apply cleanly without any fails?
You also have to run update.php (but that shouldn't stop you from getting the new poll type).
Other than that I can't think of anything else you have to do.
The module has had commits since I posted this so I guess it is possible something has changed in the module that breaks this patch but I'd have to try it out to be sure.
I don't have much time for that at the moment but when I do I'll post my findings back here.
Comment #23
Maedi CreditAttribution: Maedi commentedWhen applying this patch multirate.inc wasn't correctly moved into the modes directory. Moving into this directory will enable the Multirate option (clear cache). I've modified this module to enable Yes or No answers rather than rating. Will submit a patch if I can figure out a nicer way to access Yes and No votes. Currently they are represented as 1's and 2's and a custom function is required to convert them back to yes and nos.
Comment #24
matdab CreditAttribution: matdab commentedHi, subsrcibing!
Also u can use panel page to make poll-page - just pick-up "existing node" option while building. But there are a few cons:
- view - u have to disable i.e. user name and date of node creation in template
- u won't associate each answers with the responder
Of course the latter is not able now anyway, but... if we would get multianswer advpoll and add to it a "Results tab" (this feature is in decisions module) - then it would be very advanced poll...:)
I have added an issue about that in: http://drupal.org/node/1297194
Comment #25
matdab CreditAttribution: matdab commentedI implemented manually the patch, there was a typo in line 246:
@@ -515,14 +574,14 @@ function advpoll_form(&$node, $form_stat
sholud be:
@@ -515,14 +574,14 @@ function advpoll_form(&$node, $form_state
everything works fine.
I hope some time there will be a way to merge or get all the best from webform, advpoll, decisions, pollfield and quiz...:)
Comment #26
miro_dietikermatdab, best you would provide a new patch version...
Comment #27
matdab CreditAttribution: matdab commentedI'm not professional on patches nad their versions, so to happiness of those who, like me, have problems with patch soft (Patch, CVS, SVN, cmd and god knows what else) I will provide also ready files;) Delete endings "txt"
Comment #28
matdab CreditAttribution: matdab commentedand patch
Comment #29
miro_dietikermatdab - i think (and most other developers do) ppl need to learn deal with patches in order to successfully participate in development / issues.
Think about ... every single patch ... what happens if developers would upload every changed file separately. That's so much file spam for drupal.org....
Comment #30
Spokenbird CreditAttribution: Spokenbird as a volunteer and commentedHello,
I realize this conversation is quite old but it seems to be the most in depth as far as discussion of the possibility of multi questions polls. This is a functionality I am looking for and everywhere I search leads back to this conversation. I realize the original conversation is now more than 8 years old, but I wonder, if in that time anyone has figured out a good way to do multi question polls or if another module exists that may have such a functionality?
Thanks!
Comment #31
tripper54 CreditAttribution: tripper54 commentedHI @Spokenbird,
The advanced poll module does not provide what you're looking for.
Without knowing the specifics of your requirements, my advice would be to explore these options:
1. Use webform
2. Quiz module
3. Create your own custom solution using either a node type or a custom entity with fields for questions.
I'm marking this thread 'works as designed', because:
1. No further development is happening on the 6.x branch
2. No new features will be added to the 7.x branch until we have a stable release on and complete test coverage
3. Requests for multiple question polls appear elsewhere in the issue queue.