Fwd: Re: Volunteers for the membership committee




-- 
Les gens heureux ne sont pas pressés.
--- Begin Message ---
Hi,

Vincent Untz wrote:
Well, that fairly trivial to do, I think. The wml stuff we have is
actually just a simple sed rule to replace the header and foot of the
page.

I know - one of the problems is that I've set an onLoad() function on
the page body, and some JavaScript functions in the header, for step 2
of the election process that builds the list of candidates in
Javascript, and the sed rule adds all of that to the top of the page.

Maybe you can send your code to the membership committee if you need
help?

Glad to!

svn co https://garage.maemo.org/svn/maemo2midgard/maemo-elections

Everything you need is in the "vote" directory, and I may have made some
changes to "scripts" too - diff'll tell you if there's anything
important (it was mostly to get around a different version of
Mail::Internet on the Maemo server, iirc).

The database changes are mostly minor, the DB schema is described in
files/election_db.txt.

Again, IIRC, the main changes were:
 * Use a generic "electorate" table, rather than "foundation_members" -
this is maemo-specific.
 * Name fields everywhere - no select * from
 * Semantics change: "choice_nb" in the "elections" table means "number
of seats available in the election", not "number of choices a person can
make"
 * Election results are no longer generated on the fly. You store an
HTML segment in the "result" field of the "election_results" table
(primary key: election_id, foreign to elections.id)
 * New column in election_votes table: preference. One voter (anon_id)
can vote for several choices, and they will have a different preference
each.

Everything else is backwards-compatible - you can migrate old votes to
the new database by setting "preference" to 1 by default (alter table
add column works fine), and you can get the results of old elections
easily enough if necessary - there are only 5 old elections in the
database, there were even fewer for Maemo, you just need to generate the
results by hand, save to html, and "insert into results values..."

Hopefully this is sufficient to get you started! If there's any other
info you need, shout.

Cheers,
Dave.

-- 
Dave Neary
dneary free fr
Tel: +33 9 51 13 46 45
Cell: +33 6 77 01 92 13


--- End Message ---


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]