• Main page
  • Terminology and Syntax
  • Developing scripts
  • Installation and administration
  • Examples
MediaWiki extensions manual
QPoll
Release status: unmaintained
Implementation Parser function , Tag , Special page , Database
Description Allows to create chains of multipage polls and to provide the statistics at the custom special page
Author(s) Dmitriy Sintsov <questpc256@gmail.com> (QuestPCtalk)
Latest version 0.8.1 (March 2014)
MediaWiki 1.15.x - 1.23.x
License GNU General Public License 2.0 or later
Download

GitHub:

Note:
No localisation updates are
provided by translatewiki.net .

Example (available in Russian)
Parameters
qp_Setup::$cache_control qp_Setup::$global_showresuls qp_Setup::$anon_forwarded_for
Tags
qpoll
Hooks used
  • ParserFirstCallInit
  • LanguageGetMagic
  • LoadAllMessages

The QPoll extension allows to create polls embedded into wikipages. One page may contain multiple polls. Each poll may contain one or more question of different type. The polls can be "chained" - when the dependent poll will be available for voting only after successful submission of the "dependance" poll. Questions may have various types: with unique, single or multiple category selections and text type (since v0.8.0). Questions contain categories - possible user choices. These can be grouped together as metacategories (also known as category spans) to make "subquestions" inside a question. User choice of category from any of previously voted polls can be retrieved in subsequent polls to change next question proposal text. Since v0.8.0 it is possible to bind and run server-side interpretation scripts to analyze user input. Invalid user input can be refused with exact error message provided by interpretation script. Valid user input can be processed and stored as "structured data" to be further processed by future dependent polls.

Terminology and Syntax

Click at section header to read about logical structure of polls, how these can be defined.

Developing scripts

Click at section header to read about how to:

  • process user submitted data via {{#qpuserchoice}} parser function
  • develop server-side interpretation scripts (since v0.8.0)

Installation and administration

Click at section header to read how to:

  • install extension
  • use Special:PollResults special page
  • which settings in LocalSettings.php are available

Examples

Click at section header to check working samples of polls. One may quickly copy/paste these as examples into their wiki.

Todo

  1. Statistical diagrams.
  2. Improve "mixed" question type.
  3. Make it possible to delete polls.

History

This extension has originally grew out of the existing stable Quiz extension, taking it as the code base. After some revisions, when the majority of code was changed, it became apparent that Quiz compatibility should be dropped, because the purposes of both extensions are quite different, thus the storage scheme can't be easily made unified. Also, since v0.8.0 QPoll allows to implement quizes via interpretation scripts attached to the polls. Besides that, nested and rotating tables layout require html class renderer which uses arrays and objects to interpret the tags instead of simple string output buffer provided by default, which originally caused a lot of tag nesting errors and ugly code.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.