[Libreoffice-commits] voting.git: vote/include

Jan Holesovsky kendy at collabora.com
Thu Nov 26 06:21:59 PST 2015


 vote/include/election-sql.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 57230ac9f65c5bc9450ff4514353ec2b0d6a017f
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Nov 26 12:16:53 2015 +0100

    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 at gmail.com>
    Reviewed-by: Charles-H. Schulz <charles.h.schulz at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

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);
 


More information about the Libreoffice-commits mailing list