Results 1 to 2 of 2

Thread: Poll Module - Calculating Incorrectly for Multiple Choice Polls

  1. #1
    Join Date
    Jan 2004
    Location
    Raleigh, NC
    Posts
    1,614

    Default Poll Module - Calculating Incorrectly for Multiple Choice Polls

    Last edited by ConqSoft; 07-24-2005 at 01:36 AM.
    My Blog
    GPS Discussion Forum

    *** Please do not contact me privately for help. Thanks. ***

  2. #2
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: Poll Module - Calculating Incorrectly for Multiple Choice Polls

    Thanks for pointing that out. I went ahead and took care of this for you since I was looking at that online users issue for you anyways. For anyone else that's having this problem, look in your modules/currentpoll.php file for this code:
    PHP Code:
            foreach ($splitvotes AS $key => $value)
            {
                
    $pollinfo['nvotes'] += $value;
            } 
    Replace with this:
    PHP Code:
            $pollinfo['nvotes'] = iif($pollinfo['multiple'], $pollinfo['voters'], array_sum($splitvotes)); 
    And that should take care of the problem.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Use same module code in multiple modules?
    By Tom M in forum Troubleshooting / "How do I..." Questions
    Replies: 3
    Last Post: 05-10-2005, 01:37 PM
  2. Multiple polls
    By stuarttunstall in forum Troubleshooting / "How do I..." Questions
    Replies: 3
    Last Post: 02-26-2005, 11:06 AM
  3. Modules displayed by user choice?
    By Delirion in forum Add-On Modules & Modifications
    Replies: 12
    Last Post: 09-21-2004, 05:03 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •