Question cloze à réponses intégrées

De MoodleDocs
Aller à :navigation, rechercher

La question cloze à réponses intégrées permet de construire un texte troué (en format Moodle) dans lequel les réponses sont intégrées. Le type de réponse peut être un choix multiple, une réponse courte ou une réponse numérique.

À ce jour, il n'y a pas d'interface graphique pour créer ces questions. Vous devez préciser le format de la question dans le champ texte de la question ou l'importer depuis un fichier externe.

Beaucoup de gens disent que le logiciel Hot Potatoes est la façon la plus simple de créer des questions à réponses intégrées. Lorsque vous avez créé vos questions dans votre ordinateur, vous pouvez les importer dans un test Moodle.

Paramétrage de la question

  1. Choisissez une catégorie pour la question.
  2. Donnez un nom descriptif à la question - cela vous permettra de la retrouver facilement dans la banque de questions.
  3. Saisissez le texte de la question (en format Moodle - référez-vous à la section Syntaxe ci-après pour en savoir plus sur les règles de rédaction).
  4. Choisissez une image au besoin. En vue étudiante, elle s'affichera immédiatement sous le texte de la question.
  5. Définissez la note par défaut (la note maximale pour la question).
  6. Définissez un facteur de pénalité.
  7. Au besoin, saisissez une rétroaction générale. Ce texte s'affichera à l'étudiant après l'envoi de sa réponse.
  8. L'éditeur a été modifié pour vous permettre de tester si votre syntaxe est correcte. Les différents éléments de la question décodés seront affichés et les erreurs de syntaxe seront mises en évidence.
  9. Cliquez sur Enregistrer pour ajouter la question à la catégorie.

Facteur de pénalité

Le facteur de pénalité s'applique seulement lorsque la question est utilisée dans un test en mode adaptatif, c'est-à-dire où l'étudiant a droit à plusieurs tentatives pour une même question au cours d'une même tentative au test. Le facteur de pénalité est un pourcentage que l'étudiant perd sur la note maximale de la question à chaque tentative autre que la première. Par exemple, si la note par défaut est de 10, et que le facteur de pénalité est de 25 %, alors chaque tentative à la question autre que la première fera perdre à l'étudiant 2,5 points.

Syntaxe

Voici les règles de syntaxe à respecter :

  • Dans le texte, une réponse attendue (et ses paramètres) est toujours placée entre accolades { }
  • Juste après l'accolade ouvrante, le nombre de points doit être indiqué pour cette réponse (facultatif)
  • Ensuite le type de réponse attendue doit être indiqué, encadré par des ":" :
:MULTICHOICE: -> Question à choix multiple (sous forme de menu déroulant dans le texte)
:MULTICHOICE_V: -> Question à choix multiple (sous forme de boutons radio en colonne verticale)
:MULTICHOICE_H: -> Question à choix multiple (sous forme de boutons radio en une ligne horizontale)
:SHORTANSWER: -> Réponse courte
:NUMERICAL: -> Réponse numérique
Si vous avez installé plugin pour les questions de type Expressions régulières, vous pouvez aussi indiquer le type de question :REGEXP:
  • Ensuite arrivent les différentes propositions de réponses et leur rétroaction. La rétroaction est séparée de la proposition par un dièse #. Les groupes proposition+rétroaction sont séparés entre eux par une tilde ~. Cela donne :
proposition1#rétroaction1~proposition2#rétroaction2~proposition3~rétroaction3
N.B. : - en l'absence de rétroaction, le dièse # n'est pas nécessaire
- pour les réponses numériques, vous pouvez définir une marge d'erreur acceptée dans la réponse. Ainsi, pour une réponse attendue de 5 ± 0,2, vous indiquerez {:NUMERICAL:5:0.2#feedback...}
- pour les réponses courtes, vous pouvez définir une rétroaction par défaut pour les mauvaises réponses en utilisant le caractère joker * afin de donner une même rétroaction à toute réponse autre que celle attendue. Par exemple : {1:SHORTANSWER:=réponse attendue#bonne réponse~*#rétroaction pour toute autre réponse}
  • Les notes sont indiquées en tête de la proposition considérée :
= désigne la bonne réponse
%50% désigne une réponse valant la moitié des points
%0% (ou rien) désigne une mauvaise réponse
  1. Le nombre qui apparaît entre accolades suivi de deux points {1: correspond au poids de l'élément; s'il est défini à 1 pour tous les éléments, il n'a pas besoin d'être précisé. Vous pouvez donc inscrire directement {:
  2. L'ordre des différentes réponses n'a pas d'importance (sauf si vous voulez regrouper toutes les mauvaises réponses)
  3. Dans le type de question SHORTANSWER, vous pouvez regrouper toutes les mauvaises pour envoyer un message « mauvaise réponses, essayez à nouveau »; vous pouvez faire cela en insérant une astérisque * comme toute dernière réponse attendue dans votre formule
  4. Toutes les réponses sauf la première doivent être séparées les unes des autres par une tilde ~
  5. Veuillez noter que le message de rétroaction et la réponse juste s'affichent dans une petite fenêtre pop-up (si les options de relectures ont été activées dans les paramètres du test) en glissant la souris par-dessus le texte.
  6. Dans le type de question MULTICHOICE, les réponses sont automatiquement mélangées

Ainsi obtient-on par exemple :

{1:MULTICHOICE:Mauvaise réponse#rétroaction pour cette mauvaise réponse~Une autre mauvaise réponse#rétroaction pour cette autre mauvaise réponse~=Bonne réponse#rétroaction pour la bonne réponse~%50%Réponse qui vaut la moitié des points#rétroaction pour la question qui vaut la moitié des points}

Voici un exemple très simple :

{1:SHORTANSWER:=Berlin} est la capitale de l'Allemagne.

NB: Soyez prudent lorsque vous copiez une question cloze dans un éditeur HTML WYSIWYG HTML, car des sauts de ligne s'ajoutent, ce qui détruit la question.

Si la réponse juste contient les symboles } # ~ / " or \ vous devez les mettre en évidence en ajoutant un \ devant chacun d'eux. Dans la rétroaction, ~ et } doivent être également mis en évidence sans quoi ils seront interprétés comme réponse suivante ou fin de la section réponse courte. Les guillemets anglais " peuvent aussi créer des problèmes à ces endroits. Si vous voulez insérer des symboles mathématiques, vous pouvez avoir des problèmes avec le symbole \. Pour l'éviter, vous pouvez utiliser des caractères unicode.

Exemples

Exemple 1

The following text creates a simple embedded-answers question:

Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}
The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!
~%50%Marseille#No, that is the second largest city in France (after
Paris).~*#Wrong answer. The capital of France is Paris, of course.}.

And the result will be:

Cloze question type

Exemple 2

This question consists of some text with an answer embedded right here {1:MULTICHOICE:Wrong answer#Feedback for this wrong answer~Another wrong answer#Feedback for the other wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}

and right after that you will have to deal with this short answer {1:SHORTANSWER:Wrong answer#Feedback for this wrong answer~=Correct answer#Feedback for correct answer~%50%Answer that gives half the credit#Feedback for half credit answer}

and finally we have a floating point number {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8~%50%23.8:2#Feedback for half credit answer in the nearby region of the correct answer}.

The multichoice question can also be shown in the vertical display of the standard moodle multiple choice. {2:MCV:1. Wrong answer#Feedback for this wrong answer~2. Another wrong answer#Feedback for the other wrong answer~=3. Correct answer#Feedback for correct answer~%50%4. Answer that gives half the credit#Feedback for half credit answer}

Or in an horizontal display that is included here in a table {2:MCH:a. Wrong answer#Feedback for this wrong answer~b. Another wrong answer#Feedback for the other wrong answer~=c. Correct answer#Feedback for correct answer~%50%d. Answer that gives half the credit#Feedback for half credit answer}

A shortanswer question where case must match. Write moodle in upper case letters {1:SHORTANSWER_C:moodle#Feedback for moodle in lower case ~=MOODLE#Feedback for MOODLE in upper case ~%50%Moodle#Feedback for only first letter in upper case}

Note that addresses like www.moodle.org and smileys :-) all work as normal:

a) How good is this? {:MULTICHOICE:=Yes#Correct~No#We have a different opinion}

b) What grade would you give it? {3:NUMERICAL:=3:2}

Some things to note:

  • The individual embedded answers are represented by the code in braces {}.
  • The number at the start is the 'weight', so in this case each answer contributes an equal share of the overall grade.
  • The correct option in each case is preceded either by an = sign or by %100%.
  • The text appearing after the # that follows each option is the feedback that the student will see if they choose that option.
  • If the student enters 'Marseille' in the final example, they score 50% of the total grade.
  • The asterisk * preceding the "Wrong answer" feedback in the final example means that the student will see this feedback if they enter anything other than "Paris" or "Marseille".
  • For multiple choice vertical or horizontal rendering there is no automatic numbering, though can added at each answer.

Numerical Cloze questions

From the student perspective, a numerical Cloze question looks just like a short-answer question or fill in the blanks.

The difference is that numerical answers are allowed to have an accepted error. This allows a continuous range of answers to be set. You can also express your answer in some different numerical formats. 23.4 23,4 (some countries use , as a decimal separator) and 2.34E+1 (meaning 2.34*10^1) would be interpreted as the same.

False positives

Note: the following examples of false positives do not apply to Moodle 1.8+, where you cannot use percentages or fractions as the answers in a numerical Cloze test; Moodle will generate an error if you try to save such a question. However the following may be relevant for earlier versions of Moodle.

More examples:	 
0.5 accepts .5 0.5 ,5 0,5 0.500 5e-1 5E-1 but not 1/2 50% 	 
50% accepts 50% 50.0% 5E1% 50/100 even 50/1000 50 but not 500/1000 0.5	 
1/2 accepts 1/2 1/3 1twenty but not 2/4 0.5 0,5 3/6 50% ½	 
½ accepts ½	 
HALF doesn't even accept HALF (maybe 0?)	 

If you want to accept several variants you can have them in the same {} but be careful, notice the "false positives" in bold!

Syntax for numerical Cloze questions

The format of a NUMERICAL Cloze question is similar to that of the other Cloze types and they can be mixed in the same question. As with other Cloze tests, you write your question or incomplete text, and add the Cloze code at the point where the student is supposed to enter their numerical answer.

An example of the syntax used is shown below:

Note: It is preferable to write the code in 'source code' mode. The WSIWYG editor can insert linebreaks that make the question not function. The linebreak in the example box below is for readability only! A problem with these questions is the readability of the code! :(

{2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8	 
~%50%23.8:2#Feedback for ½credit near correct answer}. 	 

In this example:

  • 2: is the question point weight, which means that this question has twice the weight in the final point(s) for this question as other partial answers with weight 1 (or no declared weight - you can start with {: for the default weight 1) in the same question.
  • NUMERICAL: says what kind of question it is. It must be in CAPS.
  • =23.8:0.1 = or %100% means correct if the answer is 23.8 with an accepted error of 0.1, then any number between 23.7 and 23.9 will be accepted as correct. (In the GIFT numerical question one can express an interval like this 13..15 or 14:1 but in Cloze only 14:1 works.)
  • #Feedback for correct answer 23.8 is preceded by #
  • ~%50%23.8:2 ~ is the separator for answer alternatives %50% means this answer would get 50% of the score that the more precise answer had gotten. Because the tolerance here is 2, 21.8 to 25.8 would get this point and feedback.

The feedback (which is seen within a popup window when the user hovers over the answer space) is formattable with HTML tags. For example, if you want an exponent, surround it with superscript tags: <sup> </sup>. You can even include pictures in the feedback popup, but you must clean out all " characters and save while still in source code mode (not WYSIWYG). So, this works in feedback popup:

#See this picture:<br><img src=Something.gif />}	 

but not this:

#See this picture:<br><img src="Something.gif" />}	 

(ALGEBRA and TEX filters don't work in the feedback popups, but they can be very useful in the question writing for math/science expressions). But you can use Unicode characters.

If you want to give feedback for any answer that didn't fit the intervals you already have specified feedback for, add some BIG general intervals, like for positive answers (if they aren't bigger than 20000 you could add:

~%0%10000.0001:10000#Feedback for unspecified not_right answers}	 

This would give feedback for anything from 0.0001 to 20000.0001 (that hadn't already gotten feedback). I didn't want to include 0 since that special case as well as negative ought to have specific reactions.

~%0%0#Hey! It can't be zero	 
~%0%-10000.0001:10000#We just want the size here,	 
so a negative value is not what we want}			 

Numerical questions could, before version 1.7, also have case-insensitive non-numerical answers. This is useful whenever the answer for a numerical question is something like +inf, -inf, NaN etc.

Importing CLOZE questions

If you try importing directly as CLOZE this text:

Single line per question! Match the following cities with the correct state:
* San Francisco: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Tucson: {1:MULTICHOICE:California#Wrong~%100%Arizona#OK}
* Los Angeles: {1:MULTICHOICE:=California#OK~Arizona#Wrong}
* Phoenix: {1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}

The capital of France is {1:SHORTANSWER:%100%Paris#Congratulations!~%50%Marseille#No, that is the second largest city in France (after Paris).~*#Wrong answer. The capital of France is Paris, of course.}.

23+ 0.8 = {2:NUMERICAL:=23.8:0.1#Feedback for correct answer 23.8 ~%50%23.8:2#Feedback for ½credit near correct answer}. 	 

You would get all three questions as different parts of ONE question. (NOTE see that there are no linebreaks between the { } !)

Multiple CLOZE questions can be imported using the XML format:

<?xml version="1.0" encoding="UTF-8"?>
<quiz>

<!-- question: 1  -->
<question type="cloze">
<name><text>Book Test #1</text>
</name>
<questiontext>
<text><![CDATA[..............]]></text>
</questiontext>
<generalfeedback>
<text></text>
</generalfeedback>
<shuffleanswers>0</shuffleanswers>
</question>

<!-- question: 2 -->
<question type="cloze">
<name><text>Book Test #2</text>
</name>
<questiontext>
<text><![CDATA[............]]></text>
</questiontext>
<generalfeedback>
<text></text>
</generalfeedback>
<shuffleanswers>0</shuffleanswers>
</question>

</quiz>

You would put the question text including CLOZE code in the ....... spaces. zh:填空題(克漏字)