Posted by wonder95 on September 10, 2009 at 9:34pm
| Project: | Decisions |
| Version: | 6.x-1.3 |
| Component: | Code |
| Category: | feature request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Attached is a patch that will allow the order of answers to be randomized when the poll is viewed. There is a checkbox on the node add/edit screen that allows the creator/editor to specify whether the answers are to be randomized for the particular poll.
| Attachment | Size |
|---|---|
| randomize_answers.patch | 6.32 KB |
Comments
#1
Thank you for your contribution to the project! I think this feature would be a great addition, and barring any major issue in testing, I think it should go in. I have some nitpicking over the patch here, and I need to test it before committing it, but it's otherwise a very welcome addition that I hope will make it in the next release.
Here's the quick code-wise review.
+++ decisions.install 10 Sep 2009 21:28:12 -0000@@ -113,6 +114,16 @@ function decisions_update_5() {
+function decisions_update_6() {
this should be update_6000, since we're in D6 now
+++ decisions.module 10 Sep 2009 21:28:12 -0000@@ -1086,7 +1086,6 @@ function decisions_load($node) {
- $decision->choices = count($decision->choice);
why is that necessary? i remember this assignment was necessary for the form display...
#2
I think you looked at the wrong function, because I did have decisions_update_6(). Changed it to decisions_update_6000().
I'm not sure why I had that line removed, so I added it back.
Also noticed I was missing an update for selections.module, and my update and insert queries in decisions.module weren't quite right.
Re-rolled patch is attached.
#3
Did some more cleanup:
#4
Committed thanks!
#5
Automatically closed -- issue fixed for 2 weeks with no activity.