Posted by w3dreamer on November 12, 2008 at 9:54am
Jump to:
| Project: | Advanced Poll |
| Version: | master |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
I would need to replace poll results with "correct answer", which would enable using module to "question of day" type of thing (quiz module is not good for this for several reasons). I can do this myself, if someone could please give guidance from where to start?
Comments
#1
Sorry, this is too specific to be integrated into Advanced Poll. You will need a custom module to do this, which could potentially modify existing Advanced Poll nodes.
#2
+ 1 subscribing
adding one more option whether to show the correct answer or not would be nice!
#3
I'm looking to do something like this too. Ideally, when a person sees the poll, they get the question, and then put their answer in.
After they've voted, a new field shows up saying "Correct!" or "Wrong!".
In my specific case, my client wants the polls to be used as a learning tool, so the user votes, and then gets a paragraph or so teaching the user about the question asked. Could one hide a custom field called "Answer" before the user votes, and then show it after? Possibly using Contemplate?
#4
So I got this functionality kinda working. What I did was change the default binary poll by adding a new field called "answer".
Then in Contemplate after the poll varibales are added, I've put:
<?php if ($node->voted && !empty($node->field_poll_answer[0]['view'])) {?>
<div style="background-color: #6EC657;">
<h3 class="field-label">Poll Answer</h3>
<?php print $node->field_poll_answer[0]['view'] ?>
</div>
<?php }?>
The vote gets tallied, but here's my problem. I figured that the answer would show automatically after the vote was received. Nope. To show it, I have to refresh the page, which is really lame.
Also, there's no way for the answer field to know which is the right selection, so you don't get the "CORRECT!" or "WRONG!" text either, but I'm willing to deal with that for now.
So, any thoughts on a way to auto-refresh the page after the vote is cast? Or is there a better solution altogether?
#5
Isn't quiz used as learning module?
Strange, as a kid my first program in Basic was to make a very simple learning program with questions, resulting in wrong/good answer, wrong answered questions were random questioned later again, then at the end the test results were given, or questions asked until they all were resolved.