The attached patch allows an admin to display text instead of poll results for as long as the option is selected. It is a checkbox and textarea in the Decisions Setting are of the node admin page.

Comments

iamnayr’s picture

This patch doesn't seem to work on a clean version of 6.x-1.3. Could you please look into this, this is exactly the feature I am in need of.

Thank you!

---- Error below ----

patching file decisions.install
Hunk #2 succeeded at 113 (offset -11 lines).
patching file decisions.module
Hunk #4 succeeded at 1109 (offset 11 lines).
Hunk #5 FAILED at 1157.
Hunk #6 FAILED at 1234.
Hunk #7 succeeded at 1310 (offset 11 lines).
Hunk #8 FAILED at 1539.
3 out of 8 hunks FAILED

anarcat’s picture

Status: Active » Needs review

Please mark the issue status properly when submitting patches. Thanks for your submission, I'll make sure I take a look at this before the next release.

wonder95’s picture

If you look at the original submission, I set it to "needs review," which is what I noticed you changed it to. Is there another status I should use? It appears that the status was changed somehow after my submission.

iamnayr’s picture

Seems I got the patch to go through as I can now see the "override results with editor text" checkbox and textfield underneath. However any time I check it and enter text it disappears after saving. Any ideas?

wonder95’s picture

@ianmayar - the patch was against HEAD, since I had another committed patch after 6.x-1.x-3.

anarcat’s picture

@wonder95 - weird: seems like the status was changed silently somehow. Needs review is the right setting to make sure your patch is noticed.

anarcat’s picture

Status: Needs review » Needs work

I would very much like to commit this, unfortunately it breaks voting. As soon as I enable this and I create a decision with an override, I cannot vote or see results on a decision. This is because you have been a bit too enthusiastic in decisions_view() and removed all the code that made the voting form appear when there is an override.

There is also irrelevant whitespace in the patch.

Again, I think this patch is a great idea, but it needs work before it gets in. Sorry I took so long to test it...

anarcat’s picture

Oh, and the UI needs a little love... It would be less confusing if there was a javascript function that would hide the text until the checkbox is enabled.. Look at the end date field for how to do this.

bryancasler’s picture

What needs to be done to get the ball rolling on this?

anarcat’s picture

As noted in #7, there are critical regressions introduced by the patch that need to get fixed.

bryancasler’s picture

Hi anarcat, The non-profit I work for is interested in sponsoring this. Since you're the maintainer I'd like to offer this work to you first. If you are not available for the work I'd appreciate it if you could suggest someone else who is familiar with the module.

anarcat’s picture

mvc’s picture

Version: 6.x-1.x-dev » 6.x-1.7
Status: Needs work » Needs review
StatusFileSize
new9.79 KB

@animelion I've attached a patch for the latest stable version which provides this feature. Note that you will have to run update.php to update the database schema before this will work.

This works for me in testing and after some further review we'll roll a new stable release.

mvc’s picture

StatusFileSize
new10.96 KB

Here's a small improvement to the above patch which suppresses display of the 'results' tab when users don't have permission to see the results.

Also, note that users with the permission to inspect all votes will still see the votes tab regardless of whether override text is set.