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: Formulas: Hon Wai Lau's examples.

Formulas: Hon Wai Lau's examples: Difference between revisions

From MoodleDocs
(Redirected page to Formulas question type)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Formulas question type}}
#REDIRECT [[Formulas_question_type]]
 
=Hon Wai Lau's examples=
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:30px 0 25px;">
====<div style="font-family:Lucida Sans Unicode;font-size:116%;color:#f98012;margin:-20px 0 10px;>Example 1.1: Minimal question</div>====
 
For a minimal question, you must define a sub-question with:
* mark
* answer
* grading criteria
* question text (optional)
 
<pre style="font-size:113%;width: 97%;">
General
  Question name!      Minimal question
Main question
  Question text!      What is 2 + 2?
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              4
  Grading criteria*    Relative error < 0.01
</pre>
 
The Formulas question should look like this:
 
[[File:Formules201801261903.png|818px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=291 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
</div>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:30px 0 25px;">
====<div style="font-family:Lucida Sans Unicode;font-size:116%;color:#f98012;margin:-20px 0 10px;>Example 1.2: Generate random data</div>====
 
Random data can be defined in the random variables, such as <span style="font-family:monospace;font-size:113%;">a = {2,3,4,5}</span>. Upon quiz generation, one deterministic value will be chosen.
 
<pre style="font-size:113%;width: 97%;">
General
  Question name!      Generate random data
Variables
  Random variables    a = {2,3,4,5};
Main question
  Question text!      In this instantiation, a takes the value {a}.
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              a
  Grading criteria*    Relative error < 0.01
  Part's text          Enter the value of a:
</pre>
 
The Formulas question should look like this:
 
[[File:Formules201801261929.png|680px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=293 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
</div>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:30px 0 25px;">
 
====<div style="font-family:Lucida Sans Unicode;font-size:116%;color:#f98012;margin:-20px 0 10px;>Example 1.3: Multiple parts</div>====
 
By default, all parts will be added at the end of the question. If placeholders are used, the parts will be inserted at the location of placeholders.
 
<pre style="font-size:113%;width: 97%;">
General
  Question name        Multiple parts
Main question
  Question text        This is the beginning of the main question text.
                      {#1}
                      This is the continuation of the main question text.
                      {#2}
                      This is the continuation and the end of the main question text.
Part 1
  Part's mark          1
  Answer type          Number
  Answer              3
  Grading criteria    Relative error < 0.01
  Placeholder name    #1
  Part's text          This is the text of Part 1. The correct answer is 3:
Part 2
  Part's mark          1
  Answer type          Number
  Answer              1
  Grading criteria    Relative error < 0.01
  Placeholder name    #2
  Part's text          This is the text of Part 2. The correct answer is 1:
Part 3
  Part's mark          1
  Answer type          Number
  Answer              4
  Grading criteria    Relative error < 0.01
  Part's text          This is the text of Part 3. The correct answer is 4:
</pre>
 
With the question behaviour set to '''Interactive with multiple tries''', the Formulas question should look like this:
 
[[File:Formules201801262037.png|818px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=319 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
With the question behaviour set to '''Adaptive mode''', the Formulas question should look like this:
 
[[File:Formules201801262039.png|818px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=318 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
<div style="background-color:#d3ffd3;
            border:1px solid #abdaac;
            border-radius:4px;
            color:#4f691a;
            padding:5px 15px 5px;
            margin: 15px 0 0;
            ">
An important advantage of the '''Adaptive mode''' behaviour is that '''''all''''' the answers do not have to be entered before they can be checked by clicking the '''Check''' button. Thus, the answers for each part can be checked one at a time or as they are entered.
</div>
 
</div>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:30px 0 25px;">
 
====<div style="font-family:Lucida Sans Unicode;font-size:116%;color:#f98012;margin:-20px 0 10px;>Example 1.4: Placeholders of numbers and unit</div>====
 
This question shows different display methods of the number and unit boxes.
 
<pre style="font-size:113%;width: 97%;">
General
  Question name        04  Placeholders of numbers and unit
Variables
Random variables      v = {20:100:10};
                      dt = {2:6};
Global variables      s = v*dt;
Main question
  Question text        If a car travels {s} m in {dt} s, what is the speed of the car?
Part 1
  Part's mark          1
  Answer type          Number
  Answer              v
  Grading criteria    Relative error < 0.01
  Unit                m/s
  Part's text          Number box and unit box side by side
                      {_0}{_u}
Part 2
  Part's mark          1
  Answer type          Number
  Answer              v
  Grading criteria    Relative error < 0.01
  Unit                m/s
  Part's text          Number box and unit box side by side
                      {_0} {_u}
Part 3
  Part's mark          1
  Answer type          Number
  Answer              v
  Grading criteria    Relative error < 0.01
  Unit                m/s
  Part's text          No unit box
                      {_0} m/s
Part 4
  Part's mark          1
  Answer type          Number
  Answer              v
  Grading criteria    Relative error < 0.01
  Unit                m/s
  Part's text          No unit box
                      speed = {_0} m/s
</pre>
 
The Formulas question should look like this:
 
[[File:Formules201801272226.png|680px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=325 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
 
</div>
 
<div style="border:1px solid #bce8f1;border-radius:4px;padding: 0px 15px 0px; margin:30px 0 25px;">
====<div style="font-family:Lucida Sans Unicode;font-size:116%;color:#f98012;margin:-20px 0 10px;>Example 3.2: Multiple and within range</div>====
 
This question is similar to [[Formulas:_Answers_and_marking#Example:_Multiples_of_7_between_10_and_100.C2.A0.C2.A0.C2.A0.28Mark_.3D_0.2C_0.5_or_1.29|'''Example: Multiples of 7 between 10 and 100  (Mark = 0, 0.5 or 1)''']], except that the multiples are multiple of a variable ''d'' which can be 5, 6, 7, 8 or 9, and that the range is variable by requiring that ''x'' satisfies ''a'' < ''x'' < ''b'' where ''a'' = ''k''*''d''-3, ''b'' = (''k''+2)*''d''-2 and ''k'' ranges from 4 to 9.
 
<pre style="font-size:113%;width: 97%;">
General
  Question name!      Minimal question
Main question
  Question text!      What is 2 + 2?
Part 1
  Part's mark*        1
  Answer type          Number
  Answer*              4
  Grading criteria*    Relative error < 0.01
</pre>
 
The Formulas question should look like this:
 
[[File:Formules201801261903.png|818px]]
 
<div style="margin:20px 0 20px;">
<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;">[http://35.193.77.29/mod/quiz/view.php?id=291 <span style="color:white;">Play it </span>]</span>   [[Formulas_question_type#Examples|Login info]]  ''(Open in new tab: Ctrl+Shift+Click)''
</div>
</div>
 
 
 
[[#top|Back to top of page]]
 
[[Formulas_question_type|← FORMULAS QUESTION TYPE]]
 
===In other languages===
[https://docs.moodle.org/all/es/F%C3%B3rmulas:_Los_ejemplos_de_Hon_Wai_Lau Español]<br>
[https://docs.moodle.org/3x/fr/Formules:_Les_exemples_de_Hon_Wai_Lau Français]

Latest revision as of 00:59, 1 February 2018