FQT Multiple choice placeholders: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[https://docs.moodle.org/33/en/Formulas_question_type < Formulas question type] | [https://docs.moodle.org/33/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 for multiple choice | 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 | * Dropdown menu placeholder | ||
* Radio buttons placeholder | * Radio buttons placeholder | ||
Line 10: | Line 10: | ||
<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%;">_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. | <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 part's text placeholders in the main question to insert the text of three parts. | |||
<pre style="font-size:113%;width: 98%;"> | |||
General | |||
Question name* A formulas question with a dropdown menu multiple choice question | |||
Variables | |||
Variable 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 | |||
Placehoder name #1 | |||
Part's text What is the capital city of Canada? | |||
{_0:cities:MCE} | |||
</pre> | |||
===Radio buttons placeholder=== | ===Radio buttons placeholder=== |
Revision as of 19:49, 3 December 2017
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
The syntax for this placeholder is {_n:choices:MCE} where _n is the placeholder name (_0, _1, _2, etc.) as for the answer box placeholders, choices is a list of strings to appear as the menu choices and MCE must appear as is.
Use part's text placeholders in the main question to insert the text of three parts.
General Question name* A formulas question with a dropdown menu multiple choice question Variables Variable 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 Placehoder name #1 Part's text What is the capital city of Canada? {_0:cities:MCE}
Radio buttons placeholder
The syntax for this placeholder is {_n:choices} where _n is the placeholder name (_0, _1, _2, etc.) as for the answer box placeholders and choices is a list of strings to appear as the menu choices. The list of buttons is only vertical.