Re: Trying to run an election with foundation.gnome.org software
- From: Dave Neary <bolsh gnome org>
- To: Foundation-List <foundation-list gnome org>
- Subject: Re: Trying to run an election with foundation.gnome.org software
- Date: Fri, 15 Aug 2008 20:47:32 +0200
Hi,
Thanks to Baris, an update:
Dave Neary wrote:
> * The database contains 6 tables, but I only have the schema for 5:
> "elections";
> "election_choices";
> "election_anon_tokens";
> "election_votes";
> "election_tmp_tokens";
> "foundationmembers";
foundation-members contains a bunch of info about foundation members,
including name, email address, renewal date of account and more. Since
I'm not running a foundation election (this is for maemo), I just made
an "electorate" table with email, first name, last name.
> * Which tables do I need to populate to initialise the electorate, and
> how? I guess I create an entry in the elections table, one row per
> candidate in election_choices with election_id being a foreign key to
> elections.id
I need to create a line in the "elections" table - its fields are mostly
self-evident. The election.id is a foreign key in the other election
tables. It's also passed as an argument to the gen-tmp-tokens.pl script.
If I set nb_choices to 1, the election will be run as first past the post.
I need to have my electorate in a table - I called it electorate and
modified gen-tmp-tokens.pl to look there rather than foundationmembers.
I populate election_choices with the choices for the election.
> * I don't know whether I need to populate election_anon_tokens or
> election_tmp_tokens with electorate details.
The rows for election_tmp_tokens are generated by gen-tmp-tokens.pl,
which also generates a file called maildata.txt, containing the tmp
token, name and email address. This is the only place where a link is
made between the tmp token and the voter - I'd've preferred if email &
name were also fields in the tmp_token table.
> * How are the anonymous tokens sent by email generated?
> * How are ballots generated and sent?
There's a script called mail-instructions.pl, which takes as input the
maildata.txt file generated above and an instructions.txt file, which
contains a two-line header (From: and Subject: headers to use) and the
email to be sent to voters. Three lines in the email get replaced for
each recipient:
Dear <member>,
E-mail:
Voting token:
The rest of the mail is left untouched.
For this to work, you need a working local MTA and an understanding ISP
if you're sending several hundred emails.
> One technical issue is that I'm running a first past the post "one man
> one vote" election, not our "one man N votes" system, I guess I need to
> change the election scripts to handle that.
This is trivial (see above).
I think it would be useful to include gen-tmp-tokens.pl,
mail-instructions.pl, the results of mysqldump -d > db_schema.txt and a
template for the input files and config files (instructions.txt,
/home/admin/secret/anonvoting) to svn to allow people to have all of the
elements necessary to put up the site. Baris assures me that he plans to
do that, which is cool :)
Cheers,
Dave.
--
Dave Neary
GNOME Foundation member
bolsh gnome org
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]