Note: You are currently viewing documentation for Moodle 3.4. Up-to-date documentation for the latest stable version of Moodle is likely available here: FQT Multiple choice placeholders.

FQT Multiple choice placeholders: Difference between revisions

From MoodleDocs
(Created page with "[https://docs.moodle.org/34/en/Formulas_question_type < Formulas question type] In addition to the answer box placeholders, the '''Formulas question type''' provides for two...")
 
(Blanked the page)
 
Line 1: Line 1:
[https://docs.moodle.org/34/en/Formulas_question_type < Formulas question type]


In addition to the answer box placeholders, the '''Formulas question type''' provides for two other types of placeholder which are used for multiple choice questions:
* Dropdown menu placeholder
* Radio buttons placeholder
===Why make a FQT multiple choice question?===
Because you can use all the power of the Formulas calculation engine to build the list of choices.
===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:113%;color:#6c336d;margin:10px 0 10px;> Example</div>
Use a dropdown menu placeholder to make a multiple choice question.
''Downloadable question file:'' [https://drive.google.com/open?id=14nEuyPwgA1rU2XSiSqRLmz2c4Hc4mde2 CapitalCanada.xml]
<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|695px]]
</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:113%;color:#6c336d;margin:10px 0 10px;> Example</div>
Use a radio buttons placeholder to make a multiple choice question.
''Downloadable question file:'' [https://drive.google.com/open?id=1_Mxdj9ESblarGu7XVbc5pR1z3csU_Jrw PlanetClosestSun.xml]
<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>
[https://docs.moodle.org/34/en/Formulas_question_type < Formulas question type]
[[Category:Formulas question type]]

Latest revision as of 16:47, 4 December 2017