ellmetha / django-machina

A Django forum engine for building powerful community driven websites.
https://django-machina.readthedocs.org
BSD 3-Clause "New" or "Revised" License
589 stars 126 forks source link

Adds "Hide results" option for polls #280

Closed barsch closed 1 year ago

barsch commented 2 years ago

This PR adds a new option called "Hide results" to polls which allow polls without seeing the results during the voting process which could influence the outcome of a poll.

Adding such option by the proposed way of overriding an application proved to be quite difficult as it spans over multiple applications (forum_conversation and forum_polls). I would really appreciate it if the feature makes into the main branch.

barsch commented 2 years ago

failing tests are as far I can see unrelated to this PR

ellmetha commented 1 year ago

This PR adds a new option called "Hide results" to polls which allow polls without seeing the results during the voting process which could influence the outcome of a poll.

I understand the need to hide results during the vote, but in this Pull Requests results are also hidden after the vote has been registered. Is this the intended behavior?

In the current state of this PR, only the author of the post can actually see the results of the poll. Shouldn't this behavior take into account actual user permissions? Eg. should forum admins or moderators be able to see the result of polls in all cases (regardless of the fact that results are hidden)?

barsch commented 1 year ago

I understand the need to hide results during the vote, but in this Pull Requests results are also hidden after the vote has been registered. Is this the intended behavior?

in my case: yes - the vote needs to be hidden during the vote and until a certain time (not necessary the end of the voting period) as the result will be published outside of the forum too - so we don't want voting trends to be visible before the actual end of the voting period which could influence the result again by animating people to counter vote etc ..

In the current state of this PR, only the author of the post can actually see the results of the poll. Shouldn't this behavior take into account actual user permissions? Eg. should forum admins or moderators be able to see the result of polls in all cases (regardless of the fact that results are hidden)?

true - I'll implement it, once the issue above has been resolved

ellmetha commented 1 year ago

in my case: yes - the vote needs to be hidden during the vote and until a certain time (not necessary the end of the voting period) as the result will be published outside of the forum too - so we don't want voting trends to be visible before the actual end of the voting period which could influence the result again by animating people to counter vote etc ..

I am fine with this behaviour, but administrators / moderators should be able to view the results I think.