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
(Redirected page to Formulas: Question page)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
[https://docs.moodle.org/33/en/Formulas_question_type < 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.
 
The system of units of the Formulas question type complies with the [https://www.bipm.org/en/publications/si-brochure/ International System of Units (SI)] (available free of charge). For example, the multiplication of unit symbols is indicated by a space, as prescribed in Section 5.1 of SI. The half-high (centred) dot (⋅) is not supported. Division of unit symbols is indicated by a solidus (oblique stroke, <span style="font-family:monospace;font-size:113%;">/</span>) or by negative exponents. Exponentiation is indicated by the circumflex accent (<span style="font-family:monospace;font-size:113%;">^</span>, UTF-8 <span style="font-family:monospace;font-size:113%;"><span style="font-size:165%;">﹠</span>#94;</span> or ASCII code 94 (alt+94)). Parentheses are required when there is a risk of misinterpretation. Permutations of the unit symbols are considered identical.
 
Examples:
<pre style="font-size:113%;">
1 m
0.1 m^2
20 m s^(-1)
400 kg m/s
100 kW
</pre>
 
==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 option specify how penalties are applied for a wrong unit. It uses a value between 0 to 1. If the value is 1, both answer and unit must be correct at the same time in order to get mark. That is, the answer and the unit are treated as one entity. If the value is 0, students can get full mark for only the correct answer and all random strings at the end of answer will have no effect.
 
==[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]

Latest revision as of 23:19, 21 January 2018