Patch: Allow multiple votes from users in a particular role

nickhoffman - June 19, 2009 - 16:46
Project:Extra Voting Forms
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:multiple votes, multiple voting
Description

G'day folks. I've just finished customizing Extra Voting Forms to allow multiple votes from users in a specific role.

The need for this feature came from my company's customer service department.

SoftCom runs http://myhosting.com/ideas . The site allows our customers to propose and vote on potential new features. When a customer service agent finishes helping a customer, the agent up- or down-votes any ideas that relate to the customer's question.

After applying the attached patch, the feature is located in the "Multiple Votes" section at:

http://your_site.com/admin/settings/extra_voting_forms/

The feature was built on the 2009-Jun-05 release of Extra Voting Forms 6.x-1.x-dev .

To apply the patch [on GNU/Linux systems]:

  1. Download the patch to your home directory. Eg:
    $ cd
    $ wget http://drupal.org/files/extra_voting_forms.multiple_votes.patch
  2. Enter the directory containing the Extra Voting Forms module. Eg:
    $ cd /var/www/drupal/sites/all/modules/extra_voting_forms/
  3. Apply the patch. Eg:
    $ patch -p0 <~/extra_voting_forms.multiple_votes.patch

To un-apply the patch, run:

$ patch -R -p0 <~/extra_voting_forms.multiple_votes.patch

Let me know what you think! Cheers,
Nick Hoffman
nickh@softcom.com
SoftCom Inc
http://softcom.com

AttachmentSize
extra_voting_forms.multiple_votes.patch5.24 KB

#1

mercmobily - June 19, 2009 - 17:27

G'day nickhoffman (I am from Perth, although I was born in Italy and am in London right now :-D )

I only had a quick look at this, but it really seems to be ready to be committed...
nickhoffman: thank youuuuuu...!

Before I delve more deeply into this patch, nickhoffman, can you please confirm that this code is robust, you tested the module carefully, and that you consider it ready to go? If so, I will give it a review, and will incorporate it into the main module's tree.

Also, I have a couple of simple but _very_ annoying Javascript bugs. Are you able to lend a hand, so that w ecan finally release EVF version 1 once for all?

Thank you!

Merc.

#2

nickhoffman - June 19, 2009 - 18:55

Hey Merc. I spent a few years in Australia, so picked up some of the sayings. Gotta love "mate" and "arvo".

I tested the PHP changes quite thoroughly, and am confident that they're ready for release.

I traced through most of the Javascript code to figure out how I could implement this feature with as few changes as possible. Thus, my changes to the Javascript code are very simple. However, because extra_voting_forms.js is so complex (to me, at least), I can't guarantee that my changes don't break any existing functionality.

What are the current simple-yet-annoying Javascript bugs that you mentioned? I might be able to devote a bit of time to them, though my Javascript-fu could do with some honing.

Cheers, mate.
Nick
nickh@softcom.com
SoftCom Inc
http://softcom.com

 
 

Drupal is a registered trademark of Dries Buytaert.