Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Part text placeholders.

Part text placeholders: Difference between revisions

From MoodleDocs
(Created page with "You can insert a part's text and an answer box at a given point using placeholders. There are two kinds of placeholder: the part's text placeholder and the answer box placehol...")
 
(Redirected page to Formulas: Parts' placeholders)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
You can insert a part's text and an answer box at a given point using placeholders. There are two kinds of placeholder: the part's text placeholder and the answer box placeholder.
#REDIRECT [[Formulas:_Parts'_placeholders]]
 
 
 
This kind of placeholder allows you to insert a part's text at a particular point in the main question. The placeholder name is a string starting with <span style="font-family: monospace;">#</span> and followed by any characters of <span style="font-family: monospace;">[A-Z a-z 0-9]</span> , such as <span style="font-family: monospace;">#1</span>, <span style="font-family: monospace;">#a</span>, <span style="font-family: monospace;">#a1</span>, <span style="font-family: monospace;">#1a</span> or <span style="font-family: monospace;">#SubQuestion01</span>.
 
At the point of insertion in the main question text, the placeholder name must be enclosed by curly braces <span style="font-family: monospace;">{ }</span>. In the parts, the placeholder name is specified in the field called '''Placeholder name'''.
 
<span style="font-family:Lucida Sans Unicode;font-size:112%;color:#6c336d;> Example</span>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding:0px 15px 0px;">
 
Use part's text placeholders in the main question to insert the part's text of three parts.
 
<pre style="width: 98%;">
General
  Question name*      A formulas question with three parts and part's text placeholders
Main question
  Question text*      With part's text placeholders
                      Two subquestions on the addition:
                      {#1a}
                      {#1b}
                      One subquestion on the subtraction:
                      {#2}
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              7
  Grading criteria*    Absolute error == 0
  Placehoder name      #1a
  Part's text          What is 3 + 4?
Part 2
  Part's mark*        1
  Answer type          Number
  Answer*              9
  Grading criteria*    Absolute error == 0
  Placehoder name      #1b
  Part's text          What is 4 + 5?
Part 3
  Part's mark*        1
  Answer type          Number
  Answer*              3
  Grading criteria*    Absolute error == 0
  Placehoder name      #2
  Part's text          What is 9 − 6?
</pre>
 
The formulas question should look like this:
 
[[File:FormulasDocumentation01.png|695px]]
</div>
 
 
You could obtain the same question as above with the following, but clearly it is more convenient in general to use placeholders:
 
<pre style="width: 98%;">
General
  Question name*      A formulas question with three parts and no part's text placeholders
Main question
  Question text*      Without part's text placeholders
                      Note: In general, it is more convenient to use placeholders as is done above.
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              7
  Grading criteria*    Absolute error == 0
  Placehoder name
  Part's text          Two subquestions on the addition:
                      What is 3 + 4?
Part 2
  Part's mark*        1
  Answer type          Number
  Answer*              9
  Grading criteria*    Absolute error == 0
  Placehoder name
  Part's text          What is 4 + 5?
Part 3
  Part's mark*        1
  Answer type          Number
  Answer*              3
  Grading criteria*    Absolute error == 0
  Placehoder name
  Part's text          One subquestion on the subtraction:
                      What is 9 − 6?
</pre>
 
==== Note ====
Although the designation of the part's text placeholders is quite flexible, a simple designation such as #1, #2, #3, etc. is often sufficient.

Latest revision as of 01:32, 22 January 2018