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: FQT Multiple choice placeholders.

FQT Multiple choice placeholders: Difference between revisions

From MoodleDocs
No edit summary
mNo edit summary
Line 29: Line 29:
   Answer*              3
   Answer*              3
   Grading criteria*    Absolute error == 0
   Grading criteria*    Absolute error == 0
   Placehoder name     #1
   Placeholder name     #1
   Part's text          What is the capital city of Canada?
   Part's text          What is the capital city of Canada?
                       {_0:cities:MCE}
                       {_0:cities:MCE}
Line 58: Line 58:
   Answer*              3
   Answer*              3
   Grading criteria*    Absolute error == 0
   Grading criteria*    Absolute error == 0
   Placehoder name     #1
   Placeholder name     #1
   Part's text          What is the closest planet to the sun?
   Part's text          What is the closest planet to the sun?
                       {_0:planets}
                       {_0:planets}

Revision as of 20:28, 3 December 2017

< 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

Dropdown menu 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.

Example

Use a dropdown menu placeholder to make a multiple choice question.

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}


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.

Example

Use a radio buttons placeholder to make a multiple choice question.

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}


< Formulas question type