Item5771: Provide a mechanism to clear votes

pencil
Priority: Enhancement
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: VotePlugin
Branches:
Reported By: TWiki:Main.LynnwoodBrown
Waiting For: TWiki:Main/LynnwoodBrown
Last Change By: WillNorris
Being as the votes are stored in a hidden db, it would be useful to provide a mechanism to clear out votes for a particular vote id. Obviously, this would require incorporation of access controls.

-- TWiki:Main/LynnwoodBrown - 11 Jul 2008

Propose this:

Resetting a Poll

Sometimes you want to be able to clear the results of a poll. You can do this by including the %RESETVOTE{"id"}%. If a user is authorised, then a button will be generated which, when clicked, will reset the results for that poll to initial conditions. Access to this feature is controlled using the CANRESETVOTES TWiki variable. This variable defines a list of wiki names and the id's of votes they are allowed to reset. You can use * as a wildcard in the vote IDs. For example, in a WebPreferences topic you can write
   * Set CANRESETVOTES = GeorgeWBush(*),RobertMugabe(zim),SimonCowell(*Idol, XFactor)
   * Set FINALPREFERENCES = CANRESETVOTES
to allow:
  • George W. Bush to reset any vote he likes,
  • Robert Mugabe to reset the results of any vote with the id zim,
  • Simon Cowell to reset the results of all votes with an ID ending in Idol and any vote with the ID XFactor.
Note that it is important to finalise the setting, otherwise it can be overridden in individual topics by anyone with CHANGE access.

-- TWiki:Main/CrawfordCurrie - 08 Aug 2008

Looks good. I can't think of any other way to enable this feature and preserve appropriate permissions.

-- TWiki:Main.LynnwoodBrown - 08 Aug 2008

I did it slightly differently in the end. See the doc.

-- CrawfordCurrie - 08 Aug 2008

Re-opened for some tweaking

-- CrawfordCurrie - 10 Aug 2008

Added the $reset token to control placement of the reset.

-- CrawfordCurrie - 10 Aug 2008

closed; waiting for release is only used for core + shipped plugins.

-- WillNorris - 25 Nov 2009

ItemTemplate edit

Summary Provide a mechanism to clear votes
ReportedBy TWiki:Main.LynnwoodBrown
Codebase
SVN Range TWiki-5.0.0, Wed, 09 Jul 2008, build 17004
AppliesTo Extension
Component VotePlugin
Priority Enhancement
CurrentState Closed
WaitingFor TWiki:Main/LynnwoodBrown
Checkins TWikirev:17369 TWikirev:17382 TWikirev:17406
TargetRelease n/a
ReleasedIn
Topic revision: r12 - 25 Nov 2009, WillNorris
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy