When ranking poll votes are set to Borda Count and displayed, they sort strangely. First choices with no votes are grouped and displayed, then choices that have been ranked at least once are displayed in reverse alphabetical order. Looking at the Borda Count code, I think the intent was to sort based on points, from most to least (and indeed that seems ideal). Here's the bit I found which I think is supposed to control the sort:

In the ranking.inc file at line 380:

// Sort descending (although there may be ties).
arsort($choice_votes);

However, changing this line or commenting it out seems to have no affect, so I assume something else is actually controlling the sort. Any help would be appreciated.

Comments

gawrion’s picture

subsribing - thi is wierd... I have borda count based ranking poll with 32 choicess. Results are unsorted. Should be sorted by the points which each choice has.. Someone to find out what's goin wrong with this module? What to change in source?

ranking.inc,v 1.8.2.37 2007/12/08

ChrisKennedy’s picture

Status: Active » Fixed

Hmm, no idea how this bug creeped in. Fixed it. http://drupal.org/cvs?commit=161932

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.