« Formules: Choix multiple » : différence entre les versions

De MoodleDocs
Aller à :navigation, rechercher
(Suppression double redirection)
 
(4 versions intermédiaires par un autre utilisateur non affichées)
Ligne 1 : Ligne 1 :
{{Question de type Formules}}
#REDIRECT [[Types_de_questions_tiers]]
{{Traduction}}
 
==Pourquoi faire une question à choix multiple Formules ?==
 
En plus des espaces réservés aux cases de réponse, la question de type '''Formules''' fournit deux autres types d'espace réservé qui sont utilisés pour les questions à choix multiple :
* L'espace réservé à un menu déroulant
* L'espace réservé à des boutons radio
 
Les questions à choix multiple Formules vous permettent d'utiliser toute la puissance du moteur de calcul '''Formules''' pour élaborer la liste des choix.
 
==Dropdown menu placeholder==
 
The syntax for this placeholder is <span style="font-family:monospace;font-size:113%;">{_n:choices:MCE}</span> where
<span style="font-family:monospace;font-size:113%;">_n</span> is the placeholder name (<span style="font-family:monospace;font-size:113%;">_0</span>, <span style="font-family:monospace;font-size:113%;">_1</span>, <span style="font-family:monospace;font-size:113%;">_2</span>, etc.) as for the answer box placeholders, <span style="font-family:monospace;font-size:113%;">choices</span> is a list of strings to appear as the menu choices and
<span style="font-family:monospace;font-size:113%;">MCE</span> must appear as is.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:20px 0 25px;">
<div style="font-family:Lucida Sans Unicode;font-size:150%;color:#f98012;margin:10px 0 10px;>Example</div>
 
Use a dropdown menu placeholder to make a multiple choice question.
 
<pre style="font-size:113%;width: 98%;">
General
  Question name*      A formulas question with a dropdown menu multiple choice question
Variables
  Global variables    cities=["Calgary","Halifax","Montréal","Ottawa","Toronto","Vancouver"];
Main question
  Question text*      Geography
                      {#1}
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              3
  Grading criteria*    Absolute error == 0
  Placeholder name    #1
  Part's text          What is the capital city of Canada?
                      {_0:cities:MCE}
</pre>
 
The Formulas question should look like this (the choices are highlighted by moving up and down in the menu):
 
[[File:CapitalCanada.png|700px]]
 
<div style="margin:20px 0 20px;">
[http://35.193.77.29/mod/quiz/view.php?id=116 <span style="background-color:#f98012;box-shadow: 0 5px 10px #cbcbcb;border: none;color:white;padding: 8px 16px;text-align:center;text-decoration: none;cursor:pointer;">Play it</span>]   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
</div>
 
==Radio buttons placeholder==
 
The syntax for this placeholder is <span style="font-family:monospace;font-size:113%;">{_n:choices}</span> where
<span style="font-family:monospace;font-size:113%;">_n</span> is the placeholder name (<span style="font-family:monospace;font-size:113%;">_0</span>, <span style="font-family:monospace;font-size:113%;">_1</span>, <span style="font-family:monospace;font-size:113%;">_2</span>, etc.) as for the answer box placeholders and <span style="font-family:monospace;font-size:113%;">choices</span> is a list of strings to appear as the menu choices. The list of buttons is only vertical.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:20px 0 25px;">
<div style="font-family:Lucida Sans Unicode;font-size:150%;color:#f98012;margin:10px 0 10px;>Example</div>
 
Use a radio buttons placeholder to make a multiple choice question.
 
<pre style="font-size:113%;width: 98%;">
General
  Question name*      A formulas question with a radio buttons multiple choice question
Variables
  Global variables    planets=["Earth","Jupiter","Mars","Mercury","Neptune","Saturn","Uranus","Venus"];
Main question
  Question text*      Astronomy
                      {#1}
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              3
  Grading criteria*    Absolute error == 0
  Placeholder name    #1
  Part's text          What is the closest planet to the sun?
                      {_0:planets}
</pre>
 
The formulas question should look like this (the student must click a choice from the list):
 
[[File:PlanetClosestSun.png|695px]]
 
<div style="margin:20px 0 20px;">
[http://35.193.77.29/mod/quiz/view.php?id=118 <span style="background-color:#f98012;box-shadow: 0 5px 10px #cbcbcb;border: none;color:white;padding: 8px 16px;text-align:center;text-decoration: none;cursor:pointer;">Play it</span>]   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
</div>
 
==Shuffled choices==
With '''Formulas''' multiple choice questions, the shuffling of choices is not a built-in option but it can be easily programmed.
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:20px 0 25px;">
<div style="font-family:Lucida Sans Unicode;font-size:150%;color:#f98012;margin:10px 0 10px;>Example</div>
 
Make a '''Formulas''' multiple choice question with shuffled choices.
 
''Downloadable question file:'' [https://drive.google.com/open?id=1hEpUcb2eu8cw-VVTmdDp4Cd1jWn3n421 ShuffledMultipleChoice.xml].  Programming comments are given in this file.
 
<pre style="font-size:113%;width: 98%;">
General
  Question name*      ShuffledMultipleChoice
Variables
  Random variables    c=shuffle([0,1,2,3,4,5]);
  Global variables    mc=[" Red"," Orange"," Yellow"," Green"," Blue"," Violet"];
                      a=3;  # The third answer (counting from 0), i.e. Green, is the correct answer.
                      c=c;
                      t=c;
                      for (i:[0:6]) {
                        t[i]=a==c[i]?i:0;
                      }
                      tt=0;
                      for (i:[0:6]) {
                        tt=tt+t[i];
                      }
                      colors=[mc[c[0]],mc[c[1]],mc[c[2]],mc[c[3]],mc[c[4]],mc[c[5]]];
Main question
  Question text*      Physics
                      {#1}
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              tt
  Grading criteria*    Absolute error == 0
  Placeholder name    #1
  Part's text          What pure spectral color has an approximate wavelength of 530 nm (measured in air or vacuum)?
                      {_0:colors}
</pre>
 
The formulas question should look as shown below. The choices are shuffled hence in a different order for each student (there are 6! = 720 permutations):
 
[[File:ShuffledMultipleChoice.png|695px]]
 
<div style="margin:20px 0 20px;">
[http://35.193.77.29/mod/quiz/view.php?id=122 <span style="background-color:#f98012;box-shadow: 0 5px 10px #cbcbcb;border: none;color:white;padding: 8px 16px;text-align:center;text-decoration: none;cursor:pointer;">Play it</span>]   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
</div>
 
<div style="background-color:#d3ffd3;
            border:1px solid #abdaac;
            border-radius:4px;
            color:#4f691a;
            padding:5px 15px 5px;
            margin: 15px 0 0;
            ">
When shuffled choices are required, it is probably easier to use Moodle's core '''Multiple choice''' question. The point here is that with the '''Formulas''' question, multiple choice questions can be programmed.
</div>
 
 
 
[[#top|Accéder au haut de la page]]
 
[[Question de type Formules|← QUESTION DE TYPE FORMULES]]
 
===Autres langues===
[https://docs.moodle.org/33/en/Formulas:_Multiple_choice English]<br>
[https://docs.moodle.org/all/es/F%C3%B3rmulas:_Opci%C3%B3n_m%C3%BAltiple Español]

Dernière version du 17 mai 2019 à 14:58

Rediriger vers :