summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-11-26 12:16:53 +0100
committerAndras Timar <andras.timar@collabora.com>2015-11-26 14:21:42 +0000
commit57230ac9f65c5bc9450ff4514353ec2b0d6a017f (patch)
treee3da401d27a65084788e47d81f75a6a91ecddf1a
parent1554866c6260b57b962220432d11b5f201011537 (diff)
Present the candidates in random order, for improved fairness.
The order is important in STV, yet many people do not know that. The randomized order of candidates gives equal chances to all, even in the cases when the person voting does not care about an exact order. Change-Id: I32e57f15396251d2d417e0ccb8c9f9d5c79087e8 Reviewed-on: https://gerrit.libreoffice.org/20201 Reviewed-by: David Jourdain <david.e.jourdain@gmail.com> Reviewed-by: Charles-H. Schulz <charles.h.schulz@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--vote/include/election-sql.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/vote/include/election-sql.php b/vote/include/election-sql.php
index 09991c3..c3a7563 100644
--- a/vote/include/election-sql.php
+++ b/vote/include/election-sql.php
@@ -158,7 +158,7 @@ function elec_choices_get ($handle, $election_id) {
$query = "SELECT choice, id FROM " . $choices_table;
$query .= " WHERE election_id = '".$escaped_election_id."'";
- $query .= " ORDER BY id";
+ $query .= " ORDER BY RAND()";
$result = mysql_query ($query, $handle);