« Modèle:Question à choix multiple » : différence entre les versions
(Réutilisation du modèle Question) |
(Correction d'un bogue) |
||
Ligne 6 : | Ligne 6 : | ||
inputs = $(this).closest('.multiple-choice-question').find('.multiple-choice-question-choices'); | inputs = $(this).closest('.multiple-choice-question').find('.multiple-choice-question-choices'); | ||
checked = inputs.find('input[name=q]:checked'); | checked = inputs.find('input[name=q]:checked'); | ||
if($(this). | // Check if the answer is visible. | ||
if($(this).closest(".question").find('.question-answer').is(":visible"); ) // Remove the answer highlighting if the question is being hidden again. | |||
{ | { | ||
inputs.children('li').css('color', '').css('font-weight', ''); | inputs.children('li').css('color', '').css('font-weight', ''); | ||
Ligne 29 : | Ligne 30 : | ||
| classe = multiple-choice-question | | classe = multiple-choice-question | ||
| question = {{{question|}}} | | question = {{{question|}}} | ||
| sous-question = | | sous-question = <ol class="multiple-choice-question-choices" type="A"> | ||
<ol class="multiple-choice-question-choices" type="A"> | |||
<li><html><input type="radio" name="q" value="a" class="multiple-choice-question-choice"></html>{{{a|Choix A}}}</li> | <li><html><input type="radio" name="q" value="a" class="multiple-choice-question-choice"></html>{{{a|Choix A}}}</li> | ||
<li><html><input type="radio" name="q" value="b" class="multiple-choice-question-choice"></html>{{{b|Choix B}}}</li> | <li><html><input type="radio" name="q" value="b" class="multiple-choice-question-choice"></html>{{{b|Choix B}}}</li> | ||
Ligne 38 : | Ligne 38 : | ||
{{#if:{{{f|}}}|<li><html><input type="radio" name="q" value="f" class="multiple-choice-question-choice"></html>{{{f}}}</li>|}} | {{#if:{{{f|}}}|<li><html><input type="radio" name="q" value="f" class="multiple-choice-question-choice"></html>{{{f}}}</li>|}} | ||
{{#if:{{{g|}}}|<li><html><input type="radio" name="q" value="g" class="multiple-choice-question-choice"></html>{{{g}}}</li>|}} | {{#if:{{{g|}}}|<li><html><input type="radio" name="q" value="g" class="multiple-choice-question-choice"></html>{{{g}}}</li>|}} | ||
</ol> | </ol> | image_question = {{{image_question|}}} | ||
| image_réponse = {{{image_réponse|}}} | | image_réponse = {{{image_réponse|}}} | ||
| réponse = <span class="multiple-choice-question-answer-letter" style="font-size: 20px; text-transform: uppercase; font-weight: bold;">{{{réponse|}}}</span>{{#if: {{{réponse|}}}||<i>Aucune réponse n'a été spécifiée...</i>}} | | réponse = <span class="multiple-choice-question-answer-letter" style="font-size: 20px; text-transform: uppercase; font-weight: bold;">{{{réponse|}}}</span>{{#if: {{{réponse|}}}||<i>Aucune réponse n'a été spécifiée...</i>}} |
Version du 7 janvier 2018 à 05:50
Utilisation
Question au format choix multiples. Pour le format Flashcard, voir Modèle:Question. Pour une question vrai ou faux, voir Modèle:Question vrai ou faux. Pour une question à plusieurs réponses, voir Modèle:Question à plusieurs réponses.
Exemple
- 1
- 2
- 3
- 4
- 5
d
La girafe est un mammifère quadrupède et elle possède donc 4 pattes. Voici d'autres exemples de mammifères à 4 pattes:
Paramètres
Question au format choix multiples. Pour une question vrai ou faux, voir Modèle:Question_vrai_ou_faux, Pour le format Flashcard, voir Modèle:Question.
Paramètre | Description | Type | État | |
---|---|---|---|---|
Question | question | La question à poser.
| Contenu | obligatoire |
A | a | Le choix A. | Chaîne | obligatoire |
B | b | Le choix B. | Chaîne | obligatoire |
C | c | Le choix C. | Chaîne | suggéré |
D | d | Le choix D. | Chaîne | suggéré |
E | e | Le choix E. | Chaîne | suggéré |
F | f | Le choix F. | Chaîne | suggéré |
G | g | Le choix G. | Chaîne | suggéré |
Explication | explication | Une explication de la bonne réponse à la question.
| Contenu | suggéré |
Références pour l'explication | références_explication | Des URLs, PMIDs, DOIs ou ISBNs séparés par des points-virgules (;).
| Contenu | facultatif |
Réponse | réponse | La réponse à la question (lettre minuscule).
| Contenu | obligatoire |
Références pour la réponse | références_réponse | Des URLs, PMIDs, DOIs ou ISBNs séparés par des points-virgules (;).
| Contenu | facultatif |
Image question | image_question | Une image à associer avec la question.
| Fichier | suggéré |
Image explication | image_explication | Une image associée à l'explication.
| Fichier | facultatif |
Symbole du marqueur | marqueur1_symbole | Caractère qui constituera le marqueur. Ce paramètre doit être spécifié pour activer le marqueur.
| Chaîne | facultatif |
Couleur du marqueur (en anglais) | marqueur1_couleur | La couleur du marqueur en anglais. Cette couleur doit être une couleur CSS valide.
| Chaîne | facultatif |
Coordonnée X | marqueur1_x | Coordonnée X du centre du marqueur (le 0 est la gauche de l'image). Pour récupérer une coordonnée, placez votre curseur sur l'image à marquer dans l'éditeur visuel. | Nombre | facultatif |
Coordonnée Y | marqueur1_y | Coordonnée Y du centre du marqueur (le 0 est le haut de l'image). Pour récupérer une coordonnée, placez votre curseur sur l'image à marquer dans l'éditeur visuel. | Nombre | facultatif |
Identifiant unique | uuid | UUID (identifiant unique) de la question. Ce champ est rempli automatiquement.
| Chaîne | obligatoire |
La documentation de ce modèle est incluse depuis sa sous-page de documentation (modifier | historique).
Veuillez placer les catégories dans la sous-page /Documentation.
Les éditeurs peuvent travailler dans le bac à sable (créer) et la page de test (créer).