Coder Social home page Coder Social logo

collective.polls's Introduction

collective.polls

A content type, workflow and portlet for conducting online polls, for anonymous and logged-in users.

Got an idea? Found a bug? Let us know by opening a support ticket.

See the complete list of bugs on GitHub.

To enable this product in a buildout-based installation:

  1. Edit your buildout.cfg and add collective.polls to the list of eggs to install:

    [buildout]
    ...
    eggs =
        collective.polls
    

After updating the configuration you need to run ''bin/buildout'', which will take care of updating your system.

Go to the 'Site Setup' page in a Plone site and click on the 'Add-ons' link.

Check the box next to ''collective.polls'' and click the 'Activate' button.

  • Polls can be opened for anonymous users to vote
  • If an open poll is allowed for anonymous but is inside a private folder, nobody can vote. Therefore the poll's parent folder needs to be published before opening the poll in order for this field to take effect
  • Voting can take place either in the object or in a voting portlet;
  • The voting portlet can show the latest open poll or ab specific open poll and closed polls
  • Users can see partial results of the poll
  • Results can be shown using a bar chart, a pie chart, or just by number of votes
  • Polls can have relations with other content in the site

The workflow associated with polls has the following states: 'Private', 'Pending review', 'Open' and 'Closed'.

  • Polls are created in 'Private' state; only Owner, Manager, Editor or Site Administrator roles can modify them.
  • When a poll is in 'Private' state it can be sent to 'Pending review' or directly to 'Open' state, if the user has the proper role (Reviewer, Manager or Site Administrator).
  • When a poll is in 'Pending review' state it can be edited by Manager, Editor, Reviewer or Site Administrator roles.
  • A poll in 'Pending review' state can be sent to 'Open' state, with "Review portal content" permission, or to Private, with "Request review" permission.
  • When the poll is 'Open' users can only vote; nobody can modify the poll in any way.
  • An 'Open' poll can be sent to 'Private' or 'Closed' state by Reviewer, Manager or Site Administrator roles.
  • When an 'Open' poll is sent to 'Private', all votes are removed to avoid data manipulation.
  • When a poll is in 'Closed' state nobody can modify it, nor can anyone vote on it; a closed poll can always be reopened by usera with proper permissions.
Plone PoPoll
A very old an unmaintained product, PoPoll includes a poll tool that allows member or anonymous to vote for one or more answers. A portlet is provided. It can be configured to display the last poll, or the first poll of a folder. After the vote statistics screens are shown.

collective.polls's People

Contributors

datakurre avatar davilima6 avatar elioschmutz avatar ericof avatar flecox avatar frapell avatar fredvd avatar gagaro avatar hvelarde avatar l34marr avatar lelit avatar marcosfromero avatar mauritsvanrees avatar mbaechtold avatar naro avatar quimera avatar rafaelbco avatar rodfersou avatar syzn avatar tdesvenain avatar toutpt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collective.polls's Issues

'Allow anonymous' field should be optional

There are some use cases, like private extranets, where having the field "allow anonymous" is pointless. Thus, this field should be removed from the default schema and included as a separate (activated by default) behavior.
This way, the current functionality remains as it is, and the field can be removed if needed.

AttributeError: available

Seems that, when there are no active polls, the portlet raises an error:

Traceback (most recent call last):
  File "/home/hvelarde/plone-py2.6/eggs/plone.portlets-2.0.2-py2.6.egg/plone/portlets/manager.py", line 117, in _lazyLoadPortlets
    isAvailable = renderer.available
AttributeError: available

Poll results get confused

User creates poll1, receives votes and closes poll.
User then creates poll2, receives votes and closes this poll too.
When you go to the page where poll1 has been created to see the results you find the votes for both polls are shown.

Using Plone 4.1.4, Dexterity 1.2.1 and Polls 1.0.

How to override the current default view of an IPoll ?

In my current project I just want to override the default_view.

This addon use grok and do not use any browser layer.
The only solution I have found is to copy/paste the code of the view and make it a normal view (inherits from BrowserView) and declare the new one in zcml. This is really weird, is there any other way to proceed ?

Insufficient Privileges

Users with Contributor, Editor, Owner or Reader role cannot access/view a poll after it has been sent to revision; we need to fix Access contents information and View permissions on pending state.

Fix workflow transition name

The workflow transition that activates the Open state must be renamed from "publish" to "open"; we need a upgrade step to update the security settings.

increase test coverage

the package has less than 75% of test coverage; we need to increase that at least to 90%.

remove unnecesary code in portlet

When a new field is added to a portlet it should be added as class attribute. In this way the existing instance don't need to be updated and there is no need of add extra logic for every new field.

With that, could be possible to remove some hacks in the code added in the commit 682e95b

Update portlet at end of poll

After a poll has been closed the poll page states "Results" but the portlet remains as "Partial results".

Using Plone 4.1.4, Dexterity 1.2.1 and Polls 1.0.

Refactor visualization of poll results

When we created this package we made a mistake on its design that is pretty clear now: visualization of poll results should be handled by different views and not by a poll field.

Right now this creates a problem: if a user wants to change the visualization, let's say from pie to bars, she should have to retract the poll and lose all the votes already casted; that's wrong.

We need to refactor the whole visualization machinery to make it easier to modify and extend and we need to provide an upgrade step to migrate all polls already created on a site.

We should think on how to implement this on porltets also as asked in #65.

Pie Chart not showing if only one option has votes

Steps to reproduce:

  1. Add a poll
  2. Choose "Pie Chart" under the "Graph" drop down
  3. Add a couple of possible answers
  4. Save and open the poll
  5. Vote for just 1 of the options (you can vote several times but making sure just one of the options has votes)

Result:

Pie chart is not showing

Expected result:

Pie chart showing just one option with 100% coverage

Modify polls workflow

the workflow should have the following states: Private, Pending review, Open, Closed

  1. poll are created in Private state; only Owner, Manager, Editor, or Site Administrator can modify it
  2. when the poll is Pending review, it can be edited by a Manager, Reviewer or Site Administrator
  3. a poll in Pending review can be send to Open, with "Review portal content" permission, or to Private, with "Request review"
  4. when the poll is Open, people can only vote, they can not modify the poll in any way
  5. an Open poll can only be sent to Closed state by Manager or Site Administrator
  6. when the poll is Closed nobody can edit anything, neither vote
  7. there is no way to reopen a poll

I think this should be pretty straightforward.

comments?

Uncaught TypeError: Object # has no method 'test'

Voting on a portlet which is configured to display partial results fails with a Javascript error when running the related AJAX code. Vote is accepted but a loading spinner goes on forever so results can only be seen after manually refreshing the page.

Uncaught TypeError: Object # has no method 'test' +resource+plone.app.jquery.js:2

Tested on a Plone 4.2.3 instance on Chrome 23 e Firefox 19a2 (OSX).

Portlet: link back to poll page

It would be a nice enhancement for the portlet to have a link to take the user back to the location where the poll was created. User could then see the additional description text.

TypeError: __init__() got an unexpected keyword argument 'portlet_style'

When I want to save the voting portlet, I got this error message.

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module plone.app.portlets.browser.formhelper, line 53, in call
Module zope.formlib.form, line 795, in call
Module five.formlib.formbase, line 50, in update
Module zope.formlib.form, line 776, in update
Module zope.formlib.form, line 620, in success
Module plone.app.portlets.browser.formhelper, line 70, in handle_save_action
Module zope.formlib.form, line 901, in createAndAdd
Module collective.polls.portlet.voteportlet, line 179, in create
TypeError: init() got an unexpected keyword argument 'portlet_style'

Anonymous users can not vote on an open poll

Steps to reproduce the problem:

  1. Create a poll allowing anonymous votes and partial results
  2. Vote as a registered user
  3. Access as anonymous
  4. Partial results are shown and you can not vote.

Anonymous voting doesn't work at root level

If the poll was created at root level with the "allow anonymous" checkbox as true, anonymous users are not allowed to cast votes to it, even if the polla, and the site (poll parent) is visible by anonymous users.

returned status message:
"Anonymous user won't be able to vote, you forgot to publish the parent folder, you must sent back the poll to private state, publish the parent folder and open the poll again"

activation message

I'm curious why when I go to Site Setup -> Add-ons and activate collective.polls I end up with this message in the browser:

Installed Products
====================
collective.polls:ok:

This isn't what I would expect; it should redirect the browser back to the Add-ons page.

Implement link to poll in portlet

Portlet editors should be able to decide whether they want the portlet title linking back to the current poll object.

That helps a lot in accessing the displayed poll for edition. If this use case is too narrow we could at least automatically provide the hyperlink to those who can actually edit that poll.

show latest closed poll on portlet

if no open poll is available and the portlet is configured to show the latest open poll, we can show the results of latest closed poll.

Bug: Duplicated votes

I installed collective.theme.iwaters + collective.polls and when an anonymous votes is counting 2 votes and displaying 2 times the results in the portlet and view.

Implement data visualization options to Voting Portlet

Portlet creators should be able to choose whether to display votes with numbers, bars or pies - and even not displaying any information about votes at all.

This could be a radio selection list with the default option being inheriting from the choice made on the poll which is actually displayed.

/cc @agnogueira

missing submit button

In the Polls Dexterity Control panel "Fields tab" there is no submit button to save any amendments to the form.

Using Plone 4.1.4, Dexterity 1.2.1 and Polls 1.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.