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 question page.

Formulas question page: Difference between revisions

From MoodleDocs
No edit summary
(Redirected page to Formulas: Question page)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Formulas question type}}
#REDIRECT [[Formulas:_Question_page]]
 
The Formulas question page, titled '''Adding a formulas question''', appears when a new Formulas question is added to a quiz. The page is titled '''Editing a formulas question''' when editing. To edit an existing question, simply click on the question.
 
The Formulas question page is shown below and the main settings, indicated by orange arrows, are described in order. Note that ''global'' settings affect the entire question, while ''local'' settings affect only each part. Settings marked with an asterisk must be defined.
 
Only Part 1 is shown. To see other parts, click on the '''Blanks for 2 more parts''' button.
 
[[File:Editing a formulas question .png|600px|thumb|center]]
 
==Random variables==
Random values can be generated each time a question is created. This is done by defining a set of values to choose from, for example:
 
<pre style="font-size:113%;">
A = {1,2,3};
C = {[1,-1], [2,-2], [3,-3]};
E = {10:100:10, 100, 1000};
</pre>
 
Values can be numbers, strings, lists of numbers, or lists of strings. At the beginning of a quiz, a value is taken in the set and assigned to the variable. Range notation may be used for sets of numbers, e.g. <span style="font-family:monospace;font-size:113%;">10:100:10</span> (=<span style="font-family:monospace;font-size:113%;">[10,20,30,40,50,60,70,80,90]</span>).
 
==Global variables==
Formulas can be specified here to manipulate instantiated random variables (all random variables are included here) and define global variables. The complete list of mathematical functions and operations is given in the '''Reference'''.
 
Examples:
 
<pre style="font-size:113%;">
a = 1.11111;
b = exp(3);
c = A + a + b;
d = sin(1.5*pi()) + c;
e = round(a, 0);
f = [0,1,2,3][A];
g = ["zero","one","two","three"][A];
distance = sqrt(a*a + b*b);
</pre>
 
==Question text*==
 
Global variables and placeholder can be used in the question text. Global variables are replaced by their values, and placeholders are replaced by the corresponding parts. A simple example with variables <span style="font-family:monospace;font-size:113%;">A</span>, <span style="font-family:monospace;font-size:113%;">B</span>, <span style="font-family:monospace;font-size:113%;">C</span> and placeholders <span style="font-family:monospace;font-size:113%;">#1</span>, <span style="font-family:monospace;font-size:113%;">#2</span>, <span style="font-family:monospace;font-size:113%;">#3</span> is shown below:
 
<pre style="font-size:113%;">
What is the result of {A} + {B}? {#1}
What is the result of {A} - {B}? {#2}
What is the result of {C} / {B}? {#3}
</pre>
 
==Part's mark*==
The mark for the answer in this part. This mark must be a value greater than 0. The score for the whole question is the sum of the marks for each part.
 
Note that if the part mark is left blank, the part will be deleted when the question is saved successfully.
 
==Local variables==
Local variables can be defined here in the same way as global variables. The scope includes local and global variables. These can be used in the answer, grading variables, part's text and feedback. Note that each part has its own scope of local variables.
 
==Answer type==
There are four types of answers. Number, numeric and numerical formula require a list of numbers as an answer. The algebraic formula requires a list of strings (formula) as the answer.
 
Different types of answers impose different restrictions when entering responses. Therefore, students need to know how to enter answers. The format check will also tell them when they enter an answer incorrectly. Please refer to the other documents for more details.
 
==Answer*==
The answer consists of a list of numbers or a list of strings, depending on the answer type. The number of elements in the list defines the number of answer boxes for this part.
 
Examples:
 
<pre style="font-size:113%;">
123
[1, 0, 0, 1]
a
[1, a, b]
"exp(-a t)"
["vx t","vy t - 0.5 a t^2"]
</pre>
 
==Grading variables==
The scope includes local variables and the student answers. See the other documents for this advanced feature.
 
==Grading criteria*==
A relative error or an absolute error with an error range can be chosen. Note that a relative error can not be used with the algebraic answer type. See the other documents for the precise definition of relative error and absolute error.
 
==Units==
The unit can be specified here.
 
==Other rules==
Conversion rules for other accepted base units. See the other documents for this advanced feature.
 
==Placeholder name==
The placeholder is used to identify the location in the main question text where it is replaced by the content of the part. The name of the placeholder consists of an alphanumeric character string preceded by <span style="font-family:monospace;font-size:113%;">#, for example <span style="font-family:monospace;font-size:113%;">#1</span>, <span style="font-family:monospace;font-size:113%;">#2a</span>, <span style="font-family:monospace;font-size:113%;">#2b</span>, and <span style="font-family:monospace;font-size:113%;">#A</span>.
 
If this field is left empty, the content of the part is added at the end of the main question text.
 
==Part's text==
The part text and answer box arrangement can be specified here. The answer box placeholders that can be used are:
 
<pre style="font-size:113%;">
{_0} {_1} {_2} ... {_u}
</pre>
 
<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> are the input boxes for the numbers and <span style="font-family:monospace;font-size:113%;">{_u}</span> is the input box for the unit. Any missing answer box is automatically added at the end.
 
If there is only one numerical response and one unit, and if {_0} and {_} are placed side by side, the input boxes are combined into a single long box for the answer and the unit.
 
==[Global] - Deduction for wrong unit (0-1)==
This setting specifies the deduction (penalty) that is applied for a wrong unit. The value of the deduction ranges between 0 to 1.
 
* If the value is 1, both the answer and the unit must be correct in order to get a full mark.
* If the value is 0, no deduction is applied for an incorrect unit.
* If the value is between 0 and 1, it is deducted as a penalty when the unit is incorrect. For example, if the value of the deduction is set to 0.1, a 10% deduction is applied on the mark when the unit is incorrect.
 
==[Global] - Basic conversion rules==
The Formulas question type has a build-in unit conversion system and has basic conversion rules. The basic system is the '''Common SI units''' which converts standard units, for example those for length (km, m, cm and mm). This option has no effect if no unit is used.
 
 
[https://docs.moodle.org/33/en/Formulas_question_type < Formulas question type]
[[Category:Formulas question type]]

Latest revision as of 23:19, 21 January 2018