Laajennus:SecurePoll
SecurePoll Julkaisustatus: vakaa |
|
---|---|
Toteutus | Toimintosivu |
Kuvaus | Mahdollistaa vaalit, kyselyt ja tutkimukset |
Tekijä(t) | Tim Starlingkeskustelu |
Viimeisin versio | 3.0.0 (jatkuvat päivitykset) |
Yhteensopivuuskäytäntö | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.25+ |
Tietokantamuutokset | Kyllä |
Taulukot | securepoll_entity securepoll_msgs securepoll_properties securepoll_elections securepoll_questions securepoll_options securepoll_voters securepoll_votes securepoll_strike securepoll_lists securepoll_cookie_match |
Lisenssi | GNU General Public License 2.0 tai myöhempi |
Lataa | |
|
|
|
|
Quarterly downloads | 23 (Ranked 108th) |
Public wikis using | 889 (Ranked 269th) |
Voit kääntää SecurePoll-laajennuksen mikäli se on saatavilla translatewiki.netissä | |
Ongelmat | Avoimet tehtävät · Raportoi ongelmasta |
SecurePoll-laajennus on toimintosivu vaaleille, kyselyille ja tutkimuksille. Sitä käytetään Wikimedia Foundationin hallituksen vaaleissa ja välimieskomitean vaaleissa, ja sitä käytettiin muun muassa Wikimedia-lisenssin siirtymä-äänestykseen muiden asioiden ohella.
Kuvakaappaukset
-
Pääsivu näyttää listan kyselyistä.
-
Kyselysivu kuvaustekstillä.
-
SecurePollin ylläpitoloki
-
SecurePollin äänestäjäloki
Asennus
- Lataa ja siirrä purettu kansio nimeltä
SecurePoll
extensions/
-kansioosi.
Kehittäjien ja koodipaikkauksia tekevien tahojen tulisi asentaa laajennos git-versionhallintaohjelmaa käyttäen:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SecurePoll - Lisää seuraava koodi LocalSettings.php -tiedostosi loppuosaan:
wfLoadExtension( 'SecurePoll' );
- Suorita päivitysskripti, joka luo automaattisesti tarvittavat tietokantataulut, joita tämä laajennos käyttää.
- Tehty – Mene wikisi sivulle Special:Version vahvistaaksesi, että laajennoksen asennus onnistui.
Sinun pitää myös asettaa uusi "securepoll-create-poll
"-käyttäjäoikeus johonkin käyttäjäryhmään.
Asettaaksesi tämän oikeuden ylläpitäjille, lisää seuraava sinun LocalSettings.php
:en:
$wgGroupPermissions['sysop']['securepoll-create-poll'] = true;
Tämä mahdollistaa kaikkien ylläpitäjien luovan kyselyn, mutta se ei salli kaikkia ylläpitäjiä hallinnoimaan tiettyä kyselyä (mukaan lukien kyselyn muokkaaminen, käyttäjien tietojen katsominen jne.).
Individual admins for a particular poll are defined when creating or editing a poll.
Only members of the "electionadmin
" group may administer a poll.
To create this group, add the following to your LocalSettings.php
:
$wgGroupPermissions['electionadmin'] = [];
Then assign a particular user to the electionadmin
group via Special:UserRights.
Note that election admins can see voter data, so only trusted users should be assigned to this group.
If they are removed from the group, they will no longer be able to administer any elections.
Käyttö
Create a new poll
There are two ways to create a new poll: manually create an XML file and import it, or use the poll creation interface at Special:SecurePoll.
Manually
To create a poll manually, it is required to:
- write an XML file
- import it using the
import.php
command-line interface command
In the test folder you can find four example files:
3way-test.xml
approval-test.xml
radio-range.xml
schulze-test.xml
info
To import a poll, run the following from the cli folder:
extensions/SecurePoll/cli$ php import.php ../test/3way-test.xml
To import a poll using docker, run the following from the cli folder:
docker-compose exec mediawiki php extensions/SecurePoll/cli/import.php extensions/SecurePoll/test/radio-range.xml
Via the web interface
A user with the securepoll-create-poll
right can create a new poll via the link at the bottom of Special:SecurePoll.
To create a new poll, fill in the mandatory fields in the create form. Special care may be needed with the following fields:
- When adding poll admins, only members of the
electionadmin
group are allowed. If$wgSecurePollUseLogging
is set totrue
, it will be logged whenever an admin is added to or removed from a poll. The logs can be viewed at Special:SecurePollLog. - To create an encrypted poll, select the radio for the encryption method. If you choose GnuPG, generate a (public) encryption key and a (private) decryption key. Enter the encryption key into the create form, and keep the private key safe somewhere offline (you will need it for tallying, once the election has finished). A detailed example can be seen.
Now visit Special:SecurePoll and you will see your poll.
Edit an existing poll
To edit a poll, you must be an admin of the particular poll. From Special:SecurePoll, click on the Edit link for the poll you want to edit.
Before an election has begun, anything about the election can be edited. After an election has begun, some fields can no longer be edited.
Edit who can vote in a poll
To edit who can vote in a poll, you must be an admin of the particular poll. From Special:SecurePoll, click on the Voter Eligibility link for the poll.
Translate a poll
To translate a poll, you must be an admin of the particular poll. From Special:SecurePoll, click on the Translate link for the poll you want to translate.
See a list of voters
Anyone can see a list of voters, unless transparency features were disabled when the poll was created.
Admins of a particular poll can see a list of voters, along with private information that may help to identify duplicate voters (e.g. IP addresses, user agent information, shared cookies).
If $wgSecurePollUseLogging
is set to true
, it will be logged whenever an admin views private data. The logs can be viewed at Special:SecurePollLog.
Admins may strike any votes that they believe to be duplicates.
Tally a poll
To tally a poll, you must be an admin of the particular poll. From Special:SecurePoll, click on the Tally link for the poll you want to tally.
If the poll has been tallied before, the results will be shown on the page. If not, or if you want to re-tally, there is a form for starting a new tally.
- If the poll is unencrypted, click on the tally button.
- If the poll is encrypted, you may need to enter more information. For example, if you used GnuPG, enter the (private) decryption key and click on the tally button. If an encrypted poll has many votes, it may take a long time to tally. You may need to check back later for the results.
Now visit Special:SecurePoll and you will see your poll.
(STV) Tallying
To enable STV tallying please add the below configuration value to LocalSettings.php
$wgSecurePollSingleTransferableVoteEnabled = true;
More information on w:Counting single transferable votes (STV) can be found at Wikipedia.
General algorithm implementation (source).
Quota is + .000001. Quota is the minimum value of votes to secure a seat.
1. Compute the quota. 2. Assign votes to candidates by first preferences. 3. Declare as winners all candidates who received at least the quota. 4. Transfer the excess votes from winners to hopefuls. 5. Repeat steps 3 and 4 until no new candidates are elected. (Under some systems, votes could initially be transferred in this step to prior winners or losers. This might affect the outcome.) If all seats have winners, the process is complete. Otherwise: 6. Eliminate one or more candidates, typically either the lowest candidate or all candidates whose combined votes are less than the vote of the lowest remaining candidate. 7. Transfer the votes of the losers to remaining hopeful candidates. 8. Repeat 3–7 until all seats are full.
The quota we will use (step 1) is the Droop quota (source):
floor( no. votes / (no. seats + 1) ) + 1
The method for transferring votes from elected or eliminated candidates will be the Meek method:
Tallying (JobRunner)
- Tallies can be processed via a scheduled job Manual:Job queue . Make sure to create a scheduled job for this task or execute the task manually.
- Tallies can also be processed by executing the tallying script manually:
To execute a tally, run the following from the cli folder located at extensions/SecurePoll/cli:
extensions/SecurePoll/cli/tally.php
To execute a tally using MediaWiki-Docker, run the following from the cli folder located at extensions/SecurePoll/cli:
docker-compose exec mediawiki php extensions/SecurePoll/cli/tally.php
Generating (STV) Test Elections
- Test (STV) elections can be generated from the cli folder located at extensions/SecurePoll/cli:
- To generate a test election, run the following from the cli folder located at extensions/SecurePoll/cli:
extensions/SecurePoll/cli/generateTestElection.php
- Test (STV) elections provide scaffolding from which to tally on
Redirect polls
If you are using SecurePoll in a wikifarm, it is possible to configure it to create a main election on a vote wiki, and then it will also create a redirect poll on a different wiki, with a vote link that points back to the vote wiki.
Documentation
SecurePoll
SecurePoll general documentation can be found at wikitech:SecurePoll.
SecurePoll Improvements
A summary of improvements to SecurePoll can be found at Anti-Harassment Tools/SecurePoll Improvements.
Understanding the STV result
Documentation on STV results can be found at Anti-Harassment Tools/SecurePoll Improvements/Understanding the STV result.
Tätä laajennusta käytetään yhdessä tai useammassa Wikimedian hankkeessa. Tämä on todennäköisesti merkki siitä, että laajennus on vakaa ja toimii tarpeeksi hyvin voidakseen olla käytössä suosituilla verkkosivuilla. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. Täydellinen lista yksittäiseen wikiin asennetuista laajennuksista löytyy jokaisesta wikistä sivulta Special:Version. |
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions/fi
- Special page extensions/fi
- GPL licensed extensions/fi
- Extensions in Wikimedia version control/fi
- CanonicalNamespaces extensions/fi
- LoadExtensionSchemaUpdates extensions/fi
- SpecialPage initList extensions/fi
- TitleQuickPermissions extensions/fi
- UserLogout extensions/fi
- All extensions/fi
- Extensions used on Wikimedia/fi
- Extensions included in Miraheze/fi
- Extensions included in WikiForge/fi
- Poll extensions/fi