Export to GitHub

moodle-coordinate-question - QuestionOptions.wiki


The following are the explanation of options in the editing page of formulas question type. These options are divided into the global options that affect the all subquestions answer and the local options for each individual answer.

| You may also want to see the Tutorial for creating simple question and the full Documentation for precise usage. | |:----------------------------------------------------------------------------------------------------------------------------------------------------|


Question text

In addition to the main question text, you can also use global variables and placeholder here.

The global variables will be replaced by its value and the placeholders will be replaced the subquestion. A simple example with variables A, B, C and placeholders #1, #2, #3 are shown.

What is the result of {A} + {B}? {#1} What is the result of {A} - {B}? {#2} What is the result of {C} / {B}? {#3}


Random variables

New random values can be generated whenever a question is created. It can be done by defining a set of elements to choose from:

A = {1,2,3}; C = {[1,-1], [2,-2], [3,-3]}; E = {10:100:10, 100, 1000};

The elements can be number, string or lists of them. During the start of a quiz, one element will be drawn from the set and assign to the variable on the left. Also, for the set of number, you can use the range notation like 10:100:10 (e.g. E).

Global variables

Formula can be specified here to manipulate the instantiated random variables (all random variables are included here). The full list of mathematical function and operation is given in the documentation.

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);

Per answer grading result

Grading results can be shown for each subquestion/answer, instead of whole question.

Per answer submit button

This option only has effect in the adaptive mode.

Submission button can be shown for each subquestion/answer, instead of whole question.

Global - Trial mark sequence

This option only has effect in the adaptive mode. Required.

This option will override the behavior of penalty in adaptive mode. Default behaviour of adaptive mode always has infinite trial and deduct equal mark for each wrong trial. With this option, both finite trial or infinite trials can be used. For finite trial, say, you want to have three trials, the first one has 100%, second one has 60% and third one has 20%, you can type:

1.00, 0.6, 0.2

If you want to have infinite trial, each has 10% penalty, you can end the sequence by a comma:

1, 0.9,

Global - Deduction for wrong unit

This option specify the mark you want to penalize the student for a wrong unit.

It takes value between 0 to 1. If it takes value 1, the unit and answer must be correct at the same time in order to get mark. That is the unit and answer are treated as one entity. On the other hand, if it takes value 0, students can get full mark for only correct answer, all random string will have no effect at the end of answer. Therefore, it is recommended to use value 1 whenever the answer has no associated unit.

Global - Basic conversion rules

This question type has a build-in unit conversion system and has basic conversion rules.

The basic one is the "Common SI unit" rules that will convert standard unit such as unit for length, say, km, m, cm and mm. This option has no effect if no unit has been used.


Default answer mark

Required. The mark for the answer of this subquestion, which should be a number greater than 0. The default mark of the whole question is the sum of the default mark of all subquestions.

Note: If this answer mark field is left blank, this subquestion will be deleted when the question is successfully saved.

Local variables

You can define variables here similar to the global variables. The scope includes all global variables and it can be used in the answer, subquestion and grading variables. Note that each subquestion has its own scope of local variables.

Answer type

There are four answer types. The number, numeric and numerical formula requires a list of number as answer. The algebraic formula requires a list of string (formula) as answer.

Different answer type will impose different restriction while inputting answer, so students will need to know how to input them here. The format check in the quiz will also tell them when they type something wrong. Please read the documentation for details.

Answer

Required. It is a list of number, or a list of string depending on the answer type chosen. When there is only one answer, a number or string can be entered directly. Please note that the number of elements in the list defines the number of answer box for this subquestion.

123 [1, 0, 0, 1] a [1, a, b] "exp(-a t)" ["vx t","vy t - 0.5 a t^2"]

Grading variables

This scope include all local variables and the responses from the student. See documentation for the advance usage.

Grading criteria

Required. You can choose either relative error and absolute error with error range. Please note that relative error cannot be used in the algebraic answer type.

For the precise definition of the relative error and absolute error when there is more than one answer box, see documentation.

Unit

You can specify the unit here. It is specially designed for SI unit, so an empty space represents the 'product' of different 'base unit' and ^ for the exponent. Also, / can be used for inverse exponent. Any permutation of the base unit are treated the same.

Students are required to use the same input format. For example,

1 m 0.1 m^2 20 m s^(-1) 400 kg m/s 100 kW

Other rules

It defines the conversion rules for other accepted base units. See documentation for the advance usage.

Placeholder

A placeholder is a used to identify the location in the main question text that will be replaced by the content in the subquestion. It is a string of alphanumeric characters prefixed by '#', such as #1, #2a, #2b and #A.

If this field is left empty, the content in the subquestion answer format will be appended at the end of the main question text.

Subquestion text

Subquestion text and the arrangement of answer boxes can be specified here. The answer box placeholders that can be used are:

{_0} {_1} {_2} ... {_u}

The {_0}, {_1}, {_2} are the input boxes for numbers and {_u} is the input box for unit.

All missing box are automatically appended at the end. A special case is that if {_0}, {_u} are specified consecutively, and there is only one numerical answer and unit., i.e. {_0}{_u}, they will be combined into a single long input answer box for both answer and unit.