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 Using variables in text and text equations.

FQT Using variables in text and text equations: Difference between revisions

From MoodleDocs
(Replaced content with "{{Deletion}}")
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Using variables in text==
{{Deletion}}
 
It is simple to substitute the variables in the text, you only need to enclose the corresponding variables with { }. Each text field has a scope of variables. All variables x of either number or string in the scope of the text can be used to replace the corresponding placeholder {x} in the text.
 
It is also possible to evaluate an expression directly in the text by adding an equal sign at the beginning of the bracket such as {=x/1000}. It is easier to use if the named variables are not required. However, no error check is done unless the question is being instantiated in the quiz. An example is the rescaling of meters to kilometers below:
 
What is the speed of the rocket if it travels with distance {=x/1000} km in {t} s?
 
==Using variables in text equations==
 
Text equations are equations that are displayed in the text using an equation syntax such as:
*TeX
*MathML
*AsciiMath
 
Variables can be substituted in these equations, as in the text, by enclosing them with {}. Expressions such as {=x/1000} can also be substituted in these equations.
 
«math xmlns=¨http://www.w3.org/1998/Math/MathML¨»«mn»{a}«/mn»«msup»«mi»x«/mi»«mn»2«/mn»«/msup»«mo»+«/mo»«mn»{b}«/mn»«mi»x«/mi»«mn»{c}«/mn»«mo»=«/mo»«mn»0«/mn»«/math»
 
 
[https://docs.moodle.org/33/en/Formulas_question_type < Formulas question type]
[[Category:Formulas question type]]

Latest revision as of 02:49, 31 December 2017

This page requires deletion. Please use the page comments if necessary to state the reason for deletion.