Extension:Quiz/es
Quiz Estado de lanzamiento: estable |
|
---|---|
Implementación | Etiqueta , Gancho |
Descripción | Provides a quiz tool |
Autor(es) | Lrbabediscusión |
Última versión | 1.2.0 (2015-12-08) |
MediaWiki | 1.25+ |
Licencia | GNU Licencia Pública general 2.0 o posterior |
Descarga | |
Ejemplo | and format documentation: v:Help:Quiz |
Descargas trimestrales | 28 (Ranked 112nd) |
Traduce la extensión Quiz si está disponible en translatewiki.net | |
Asuntos | Tareas abiertas · Reportar un bug |
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.
Instalación
- Descarga y extrae los archivos en un directorio denominado «
Quiz
» dentro de la carpetaextensions/
.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Quiz - Añade el siguiente código en la parte final de tu archivo LocalSettings.php :
wfLoadExtension( 'Quiz' );
- Hecho – Navega a Special:Version en el wiki para verificar que la extensión se haya instalado correctamente.
Development
- 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.
See also
Esta extensión está siendo usada en uno o más proyectos de Wikimedia. Esto significa probablemente que la extensión es estable y funciona lo suficientemente bien como para ser usada en sitios con gran cantidad de visitas. Puedes buscar el nombre de esta extensión en los archivos CommonSettings.php e InitialiseSettings.php de Wikimedia para ver dónde se instala. Encontrarás la lista completa de extensiones instaladas en un wiki en particular en la página Special:Version del wiki. |
Esta extensión está incluida en los siguientes anfitriones/granjas wiki y/o paquetes: No se trata de una lista oficial. Algunas granjas/hosts wiki y/o paquetes pueden tener disponible esta extensión aunque no estén listados aquí. Siempre compruébelo con su anfitrión o granja wiki para confirmarlo. |