Laajennus:Quiz
Appearance
Quiz Julkaisustatus: vakaa |
|
---|---|
Toteutus | Tägi , Kytköspiste |
Kuvaus | Provides a quiz tool |
Tekijä(t) | Lrbabekeskustelu |
Viimeisin versio | 1.2.0 (2015-12-08) |
MediaWiki | 1.25+ |
Lisenssi | GNU General Public License 2.0 tai myöhempi |
Lataa | |
Esimerkki | and format documentation: v:Help:Quiz |
Quarterly downloads | 28 (Ranked 111st) |
Voit kääntää Quiz-laajennuksen mikäli se on saatavilla translatewiki.netissä | |
Ongelmat | Avoimet tehtävät · Raportoi ongelmasta |
The Quiz extension is the quiz building tool adopted on the Wikiversity. This extension aims at being:
- Simple in its syntax and its use; powerful in its possibilities.
- Open to suggestions and improvements (by facilitating the addition of new types of questions).
Usage
- Learning project on quizzes at the English Wikiversity
- Wikiversity:Help:Quiz -- documentation for the quiz extension (full) (on Wikiversity).
- Wikiversity:Help:Quiz-Simple -- a simpler and colourful documentation intended for beginners, younger users and anyone else who does not need the full version (on Wikiversity).
Other help pages are hosted on the Wikiversities in order to allow for working examples.
Asennus
- Lataa ja siirrä purettu kansio nimeltä
Quiz
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/Quiz - Lisää seuraava koodi LocalSettings.php -tiedostosi loppuosaan:
wfLoadExtension( 'Quiz' );
- Tehty – Mene wikisi sivulle Special:Version vahvistaaksesi, että laajennoksen asennus onnistui.
Kehitys
- Adding a new question type
Quiz was conceived to facilitate the addition of new question types. If the basic types (multiple choice with single/multiple responses) are not enough for you, you have the possibility of easily creating and integrating the type of questions which you need. For that you must have some knowledge of PHP.
-
The first thing that you must do is choose a syntax (the simplest possible) for your question type.
The restrictions are:
- The syntax of the question's header is fixed. The question has to be placed between curly brackets - i.e. { and } .
- For consistency, it is recommended to use || to mark the beginning of the feedback section ("correction").
-
Choose a new code name for your question type (example: "questionTypeName") as well as a symbol (currently the symbol "()" is used for single response multiple choice because it looks like a radio button, and the symbol "[]" is used for multiple response multiple choice because it looks like a checkbox).
-
Add a "case" at the beginning of the parseParameters's "switch", as follows :
case 'symbol': $this->mType = "questionTypeName"; break;
-
Add a parser function to Quiz.php
This function must convert a question object from quiz syntax to HTML and set a state to the question (right, wrong, error, NA or unmarked), according to syntax errors and eventually posted answers. Name the function "questionTypeNameParseObject" and implement as follows :/** * Convert a basic type object from quiz syntax to HTML. * * @param $input A question object in quiz syntax * * @return $output A question object in HTML. */ function questionTypeNameParseObject($input) { // your code here. $this->setState(""); // Set the state if needed. return $output; }
- Write down your syntax specifications which will be added to the help. Please read first the existing help.
- Once this is all done, contact me to include officially your question type inside the extension.
Katso myös
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. |
Categories:
- Stable extensions/fi
- Tag extensions/fi
- Hook extensions/fi
- GPL licensed extensions/fi
- Extensions in Wikimedia version control/fi
- ParserAfterTidy extensions/fi
- ParserFirstCallInit extensions/fi
- All extensions/fi
- Extensions used on Wikimedia/fi
- Extensions included in Miraheze/fi
- Extensions included in WikiForge/fi
- On-line learning extensions/fi
- Poll extensions/fi