When a poll is pending as in it hasn't started yet, the choices should not be clickable. It's confusing because a user doesn't realize at first what's going on since the user interface lets them click on a choice but there's no Vote button.

The fix is to disable the choices (grey them out). This is a simple 1-line fix, here is the fix for the binary polls:

*** modes/binary.inc.ORIG       Mon Feb 25 06:27:17 2008
--- modes/binary.inc    Mon Feb 25 06:49:51 2008
***************
*** 52,57 ****
--- 52,58 ----
        '#options' => $list,
        '#prefix' => '<div class="vote-choices">',
        '#suffix' => '</div>',
+       '#disabled' => $status != 'open'
      );

      $max_choices = $node->in_preview ? $node->settings['max_choices'] : $node->max_choices;

A similar fix after line 64 of ranking.inc probably works but I did not test it.

Comments

mgrant’s picture

This is an update to the above patch which also greys out the choices if the user does not have access to vote, say for example, they are not logged in and anonymous voting is not allowed:

*** binary.inc.ORIG     Mon Feb 25 06:27:17 2008
--- binary.inc  Tue Feb 26 08:56:12 2008
***************
*** 48,57 ****
--- 48,59 ----
        );
      }

+     global $user;
      $form['choice'] = array(
        '#options' => $list,
        '#prefix' => '<div class="vote-choices">',
        '#suffix' => '</div>',
+       '#disabled' => $status != 'open' || !user_access('vote on polls')
      );

      $max_choices = $node->in_preview ? $node->settings['max_choices'] : $node->max_choices;

Again, a similar patch will probably work in ranking.inc but I have not tested that.

pomliane’s picture

Status: Active » Closed (won't fix)

This version of Advanced Poll is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.