QuestionFileType
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
template | TemplateFile | A question that uses a template |
normal | Question | A normal question |
TemplateFile
field | type | description |
---|---|---|
template | String | The path to the template to use. Relative to the exams or questions folder. |
[any] | YAML-value | The data to insert into the template. Maps template keys onto values. |
Question
field | type | description |
---|---|---|
statement | Translation | The statement is a content area which appears at the top of the question, before any input boxes. Use the statement to set up the question and provide any information the student needs to answer it. |
advice | Translation | Advice is a content area which is shown when the student presses the Reveal button to reveal the question’s answers, or at the end of the exam. The advice area is normally used to present a worked solution to the question. |
parts | Array of QuestionPart | A question consists of one or more parts. Each part can have a different type to create elaborate questions. |
builtin_constants | BuiltinConstants | Specifies which constants are enabled. You might want to disable the constant e so it can be used as a variable in the questions. |
custom_constants | Array of CustomConstant | Custom constants that are used in your question. |
variables | Map from String to VariableRepresentation | The (ungrouped) variables that are used in this question. |
grouped_variables | "none" or Map from String to Map from String to VariableRepresentation | The (grouped) variables that are used in this question. This is a map from a group name to a map of variables. Should mainly be used to make it easier to template multiple variables at once. |
variables_test | VariablesTest | The test to which your variables should comply. Sometimes it’s hard to define randomised question variables so they’re guaranteed to produce a usable set of values. In these cases, it’s easier to state the condition you want the variables to satisfy, Variable values are generated until this condition passes.While this tool allows you to pick sets of variables that would be hard to generate constructively, it’s a random process so you must be aware that there’s a chance no suitable set of values will ever be found. |
functions | Map from String to Function | The functions that are used in this question |
preamble | Preamble | Specify custom javascript and css code that should be loaded. |
navigation | QuestionNavigation | Specify some navigation options for the question. |
extensions | Extensions | Use this to enable the extensions that are used in the question |
diagnostic_topic_names | Array of Translation | The names of the topics used in diagnostic exams that this question belongs to |
resources | Array of ResourcePath | The paths to the resources |
custom_part_types | Array of CustomPartTypeDefinitionPath | The custom part types used in this exam |
rulesets | Map from String to JMERulesetItem | The rulesets defined in this question. A “ruleset” defines a list of named simplification rules used to manipulate mathematical expressions. https://numbas-editor.readthedocs.io/en/latest/question/reference.html#rulesets |
Translation
One of the following items:
type | description |
---|---|
TranslationStruct | A structured translatable string with placeholders. |
FileString | A simple filestring. This implies that it can also just be a string. |
TranslationStruct
field | type | description |
---|---|---|
content | TranslationContent | The content with optional placeholders ({{placeholder-name}}). |
placeholders | Map from String to Translation | The values for the placeholders. It maps the placeholder-name to it's translatable value. The value for a placeholder can thus (if needed) be different for different locales. |
TranslationContent
One of the following items:
type | description |
---|---|
Map from String to FileString | Map from locale to content. You can use this to specify different content for different locales. |
FileString | A filestring. Possibly to a file that is placed in locale folders and is therefore localized. |
FileString
One of the following items:
type | description |
---|---|
String | A string of the form file:<filepath> where filepath is the relative path (within the exams or questions folder) to a file containing content. This content can be localized by placing it in locale folders. e.g. file:examples/basic-explanation.html will search for files in folders with following form: questions/examples/locale-<localename>/basic-explanation.html If a file isn't found for a specific locale, questions/examples/basic-explanation.html will be used. |
String | A literal string. |
QuestionPart
One of the following items:
type | description |
---|---|
QuestionPartBuiltin | A question part using a builtin question part type |
QuestionPartCustom | A question part using a custom question part type |
QuestionPartBuiltin
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
jme | QuestionPartJME | Mathematical expression parts require the student to enter an algebraic expression, using JME syntax. |
gapfill | QuestionPartGapFill | Gap-fill parts allow you to include answer inputs inline with the prompt text, instead of at the end of the part. Each gap is a question part in itself. |
choose_one | QuestionPartChooseOne | Multiple choice part where the student must choose one of several options |
choose_multiple | QuestionPartChooseMultiple | Multiple choice part where the student can choose any of a list of options |
match_answers | QuestionPartMatchAnswersWithItems | The student is presented with a 2D grid of choices and answers. Depending on how the part is set up, they must either match up each choice with an answer, or select any number of choice-answer pairs. |
number_entry | QuestionPartNumberEntry | Number entry parts ask the student to enter a number, which is marked if it is in a specified range |
pattern_match | QuestionPartPatternMatch | Use a text pattern part when you want the student to enter short, non-mathematical text. |
information | QuestionPartInformation | An information part contains only a prompt and no answer input. It is most often used as a Step to provide a hint for a parent part. |
extension | QuestionPartExtension | An extension part acts as a placeholder for any interactive element added by an extension, or custom code in the question, which awards marks to the student. |
matrix | QuestionPartMatrix | Matrix entry parts ask the student to enter a matrix of numbers. Marks are awarded if every cell in the student’s answer is equal to the corresponding cell in the correct answer, within the allowed margin of error. |
QuestionPartJME
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
answer | Translation | The expected answer to the part. |
answer_simplification | JMEAnswerSimplification | Simplification rules to apply to the correct answer, if it is displayed to the student (for example, after clicking the Reveal answers button). This shouldn’t affect marking. The simplification rules to apply to the answer |
answer_display | JMEAnswerDisplay | The display rules to apply to the answer |
show_preview | Boolean | If ticked, a rendering of the student’s answer in mathematical notation is displayed beside the input box. |
accuracy | JMEAccuracy | Defines the range of points over which the student’s answer will be compared with the correct answer, and the method used to compare them |
check_variable_names | Boolean | If this is ticked, all variable names used in the student’s are checked against the variable names used in the correct answer. The first variable name which is not used in the correct answer will trigger a warning. You can use this option to prevent students incorrectly entering answers such as xy, which is interpreted as a single variable, when they mean x*y, the product of two variables. |
single_letter_variables | Boolean | If this is ticked, long variable names will be interpreted as implicit multiplication of variables with single-letter names. For example, xyz will be interpreted as x * y * z. Digits, primes and single-letter underscores are still valid in variable names: a'x12y_z will be interpreted as a' * x12 * y_z. Greek letters are considered to be a single letter: pix will be interpreted as pi * x. |
allow_unknown_functions | Boolean | If this is not ticked, the application of a function that is not defined in JME will be reinterpreted. If the function name can be split into several shorter names, each of which is defined in JME, it will be: for example, lnabs(x) will be interpreted as ln(abs(x)). Function names are recognised from right to left. Any remaining characters are interpreted as implicit multiplication by a variable. For example, xsin(x) will be interpreted as x * sin(x). |
implicit_function_composition | Boolean | If this is ticked, the multiplication symbol (or implicit multiplication) will be interpreted as function composition when the right-hand side is a function application with one argument, and the left-hand side is the name of a function defined in JME. For example, ln * abs(x) and ln abs(x) will be interpreted as ln(abs(x)). |
must_match_pattern | "none" or JMEPatternRestriction | The student’s answer must match the given pattern. If it does not, then a penalty is applied. |
value_generators | "none" or Array of JMEValueGenerator | Variable value generators override the default method used to pick values for variables when comparing the correct answer with the student’s answer. The expression for each variable can be written in terms of the other variables, as long as there are no circular dependencies. The values will be evaluated in order, like question variables. Each variable specified in the expected answer can be overriden The variable vRange represents the checking range defined for this part: a continuous interval between the checking range start and checking range end. |
max_length | "none" or JMELengthRestriction | DEPRECATED String restrictions are an unreliable method of restricting the form of a student’s answer. They are deprecated and retained only for backwards compatibility; use a pattern restriction instead.Before string restrictions are applied, surplus brackets and whitespace are removed, and spaces are inserted between some operations, to minimise the possibility of the length restrictions being triggered for the wrong reasons.If the student’s answer contains more than this many characters, the penalty is applied. A value of zero means no restriction is applied. The student’s answer is tidied up slightly so that things like extra or missing space characters don’t affect the calculated length. All spaces are removed, and then spaces are inserted between binary operations. For example, the answer 1+x (three characters) is marked as 1 + x (five characters). |
min_length | "none" or JMELengthRestriction | DEPRECATED String restrictions are an unreliable method of restricting the form of a student’s answer. They are deprecated and retained only for backwards compatibility; use a pattern restriction instead.Before string restrictions are applied, surplus brackets and whitespace are removed, and spaces are inserted between some operations, to minimise the possibility of the length restrictions being triggered for the wrong reasons.If the student’s answer contains fewer than this many characters, the penalty is applied. A value of zero means no restriction is applied. |
must_have | "none" or JMEStringRestriction | DEPRECATED String restrictions are an unreliable method of restricting the form of a student’s answer. They are deprecated and retained only for backwards compatibility; use a pattern restriction instead.Before string restrictions are applied, surplus brackets and whitespace are removed, and spaces are inserted between some operations, to minimise the possibility of the length restrictions being triggered for the wrong reasons.If the student’s answer doesn’t contain all of these strings, the penalty is applied. |
may_not_have | "none" or JMEStringRestriction | DEPRECATED String restrictions are an unreliable method of restricting the form of a student’s answer. They are deprecated and retained only for backwards compatibility; use a pattern restriction instead.Before string restrictions are applied, surplus brackets and whitespace are removed, and spaces are inserted between some operations, to minimise the possibility of the length restrictions being triggered for the wrong reasons.If the student’s answer contains any of these strings, the penalty is applied. |
Number
One of the following items:
type | description |
---|---|
Integer | An integer / whole number |
Float | A real number |
CustomMarking
field | type | description |
---|---|---|
algorithm_notes | Array of JMENote | This allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
extend_base_marking_algorithm | Boolean | If this is ticked, all marking notes provided by the part’s standard marking algorithm will be available. If the same note is defined in both the standard algorithm and your custom algorithm, your version will be used. |
JMENote
field | type | description |
---|---|---|
name | String | The name of the note |
description | "none" or String | A description of the note |
expression | Translation | The jme expression representing the note |
AdaptiveMarking
field | type | description |
---|---|---|
variable_replacements | Array of VariableReplacement | The variable replacements to do |
variable_replacement_strategy | VariableReplacementStrategy | The circumstances under which the variable replacements are used, and adaptive marking is applied. |
penalty | Integer | If adaptive marking is used, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. See steps_penalty for an example. |
VariableReplacement
field | type | description |
---|---|---|
variable | String | The name of the variable to replace |
part_answer_to_use | String | The path to the part whose answer the variable’s value should be replaced with. Different part types produce different types of values. |
must_be_answered | Boolean | If this is ticked, the student must submit an answer to the referenced part before they can submit an answer to this part. |
VariableReplacementStrategy
One of the following items:
name | description |
---|---|
"original_first" | The student’s answer is first marked using the original values of the question variables. If the credit given by this method is less than the maximum available, the marking is repeated using the defined variable replacements. If the credit gained with variable replacements is greater than the credit gained under the original marking, that score is used, and the student is told that their answers to previous parts have been used in the marking for this part. |
"always_replace" | The student’s answer is only marked once, with the defined variable replacements applied. |
JMEAnswerSimplification
field | type | description |
---|---|---|
simplify_basic | Boolean | Some basic rules: https://numbas-editor.readthedocs.io/en/latest/simplification.html?highlight=simplification#term-basic |
cancel_unit_factors | Boolean | Cancel products of 1 |
cancel_unit_powers | Boolean | Cancel exponents of 1 |
cancel_unit_denominators | Boolean | Cancel fractions with denominator 1 |
cancel_zero_factors | Boolean | Cancel products of zero to zero |
omit_zero_terms | Boolean | Omit zero terms |
cancel_zero_powers | Boolean | Cancel exponents of 0 |
cancel_powers_with_base_zero | Boolean | Cancel any power of zero |
collect_numbers | Boolean | Collect together numerical (as opposed to variable) products and sums. |
constants_first | Boolean | Numbers go to the left of multiplications |
collect_sqrt_products | Boolean | Collect products of square roots |
collect_sqrt_divisions | Boolean | Collect fractions of square roots |
cancel_sqrt_square | Boolean | Cancel square roots of squares, and squares of square roots |
evaluate_powers_of_numbers | Boolean | Evaluate powers of numbers. |
rewrite_to_no_leading_minus | Boolean | Rearrange expressions so they don’t start with a unary minus |
simplify_fractions | Boolean | Cancel fractions to lowest form |
simplify_trigonometric | Boolean | Simplify some trigonometric identities |
collect_terms | Boolean | Collect together and cancel terms. Like collectNumbers, but for any kind of term. |
collect_powers_of_common_factors | Boolean | Collect together powers of common factors. |
collect_like_fractions | Boolean | Collect together fractions over the same denominator. |
order_canonical | Boolean | Rearrange the expression into a “canonical” order, using canonical_compare.Note: This rule can not be used at the same time as rewrite_to_no_leading_minus - it can lead to an infinite loop. |
expand_brackets | Boolean | Expand out products of sums. |
JMEAnswerDisplay
field | type | description |
---|---|---|
broken_as_fractions | Boolean | This rule doesn’t rewrite expressions, but tells the maths renderer that you’d like non-integer numbers to be displayed as fractions instead of decimals. |
mixed_fractions | Boolean | Improper fractions (with numerator larger than the denominator) are displayed in mixed form, as an integer next to a proper fraction. |
flat_fractions | Boolean | Fractions are displayed on a single line, with a slash between the numerator and denominator. |
vector_as_row | Boolean | This rule doesn’t rewrite expressions, but tells the maths renderer that you’d like vectors to be rendered as rows instead of columns. |
always_show_multiplication_sign | Boolean | The multiplication symbol is always included between multiplicands. |
use_dot_as_multiplication_sign | Boolean | Use a dot for the multiplication symbol instead of a cross. |
matrices_without_parentheses | Boolean | Matrices are rendered without parentheses. |
JMEAccuracy
field | type | description |
---|---|---|
checking_type | CheckingType | The rule to use to compare the student’s answer with the correct answer. |
checking_range | Array of Float | The minimum and maximum value sample points can take [minimum, maximum] |
points_to_check | Integer | The number of comparisons to make between the student’s answer and the correct answer. |
max_failures | Float | If the comparison fails this many times or more, the student’s answer is marked as wrong. |
CheckingType
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
relative_difference | CheckingTypeDataFloat | Fail if studentanswer / expectedanswer - 1 > amount |
absolute_difference | CheckingTypeDataFloat | Fail if abs(studentanswer - expectedanswer) > amount |
decimal_places | CheckingTypeDataNatural | x and y are rounded to a certain amount of decimal places, and the test fails if the rounded values are unequal |
significant_figures | CheckingTypeDataNatural | x and y are rounded to significant figures, and the test fails if the rounded values are unequal. |
CheckingTypeDataFloat
field | type | description |
---|---|---|
max_difference | Float | Maximum relative or absolute difference |
CheckingTypeDataNatural
field | type | description |
---|---|---|
amount | Integer | Amount of decimal places or significant figures |
JMEPatternRestriction
field | type | description |
---|---|---|
partial_credit | Float | If the student’s answer does not match the given pattern, their score is multiplied by this percentage. |
message | Translation | Warning message |
pattern | String | See https://numbas-editor.readthedocs.io/en/latest/pattern-matching/examples.html#pattern-matching-examples for example patterns |
name_to_compare | String | The part of the expression to mark |
JMEValueGenerator
field | type | description |
---|---|---|
name | FileString | The name of the variable |
value | JMEFileString | The expression to generate the value |
JMEFileString
One of the following items:
type | description |
---|---|
String | A string of the form file:<filepath> where filepath is the relative path (within the exams or questions folder) to a file containing content. This content can be localized by placing it in locale folders. e.g. file:examples/basic-explanation.html will search for files in folders with following form: questions/examples/locale-<localename>/basic-explanation.html If a file isn't found for a specific locale, questions/examples/basic-explanation.html will be used. |
String | A literal string. |
JMELengthRestriction
field | type | description |
---|---|---|
partial_credit | Float | The partial credit (percentage) attributed when failing the restriction |
message | Translation | Warning message |
length | Integer | The minimum or maximum length |
JMEStringRestriction
field | type | description |
---|---|---|
partial_credit | Float | The partial credit (percentage) attributed when failing the restriction |
message | Translation | Warning message |
strings | Array of Translation | The strings that are required or forbidden |
show_strings | Boolean | Whether to show the strings |
QuestionPartGapFill
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
sort_answers | Boolean | If ticked, then the student’s answers will be put in ascending order before the gaps are marked. The lowest answer will be submitted against the first gap, and so on. Because the order of marking might not correspond with the order in which the gaps are shown to the student, no feedback icon is shown next to the gap input boxes, only in the feedback summary for the whole part. |
gaps | Array of QuestionPart | The question parts for the gaps |
QuestionPartChooseOne
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
answer_data | MultipleChoiceAnswerData | Specify the options, score per option and feedback per option. Old name was answers |
shuffle_answers | Boolean | If this is ticked, the choices are displayed in random order. |
show_cell_answer_state | Boolean | If ticked, choices selected by the student will be highlighted as ‘correct’ if they have a positive score, and ‘incorrect’ if they are worth zero or negative marks. If this is not ticked, the ticked choices will be given a neutral highlight regardless of their scores. |
display | ChooseOneDisplay | How should the options be shown? |
MultipleChoiceAnswerData
One of the following items:
type | description |
---|---|
Array of MultipleChoiceAnswer | Specify a list of answer with it's marks and feedback |
MultipleChoiceAnswerDataNumbasLike | Specify the answers, marks and feedback as separate lists. The first answers, matches the first mark and the first feedback etc |
MultipleChoiceAnswer
field | type | description |
---|---|---|
statement | Translation | The statement of the answer |
feedback | Translation | The feedback shown when this answer is chosen |
marks | Translation | The marks to assign when this answer is chosen |
MultipleChoiceAnswerDataNumbasLike
field | type | description |
---|---|---|
answers | jme-string or Array of Translation | The possible answers |
marks | jme-string or Array of Translation | The marks for the corresponding answers |
feedback | "none" or Array of Translation | The feedback for the corresponding answers. |
ChooseOneDisplay
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
"dropdown" | “Drop down list” means that the choices are shown as a selection box; the student can click to show the choices in a vertical list. | |
radio | ChooseOneDisplay_radio | “Radio” means that choices are shown separately, in-line with the part prompt. |
ChooseOneDisplay_radio
field | type | description |
---|---|---|
columns | Integer | This dictates how many columns the choices are displayed in. If 0, the choices are displayed on a single line, wrapped at the edges of the screen. |
QuestionPartChooseMultiple
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
answer_data | MultipleChoiceAnswerData | Specify the options, score per option and feedback per option. Old name was answers |
shuffle_answers | Boolean | If this is ticked, the choices are displayed in random order. |
show_cell_answer_state | Boolean | If ticked, choices selected by the student will be highlighted as ‘correct’ if they have a positive score, and ‘incorrect’ if they are worth zero or negative marks. If this is not ticked, the ticked choices will be given a neutral highlight regardless of their scores. |
should_select_at_least | Integer | The student must select at least this many choices. The value 0 means “no minimum”, though the student must make at least one choice to submit the part. |
should_select_at_most | "none" or Integer | The student must select at most this many choices. The value 0 means “no maximum”. |
columns | Integer | This dictates how many columns the choices are displayed in. If 0, the choices are displayed on a single line, wrapped at the edges of the screen. |
wrong_nb_answers_warning_type | MultipleChoiceWarningType | What to do if the student picks the wrong number of responses? Either "none" (do nothing), "prevent" (don’t let the student submit), or "warn" (show a warning but let them submit) |
minimal_achievable_marks | "none" or Integer | If the student would have scored less than this many marks, they are instead awarded this many. Useful in combination with negative marking. |
maximal_achievable_marks | "none" or Integer | If the student would have scored more than this many marks, they are instead awarded this many. The value 0 means “no maximum mark”. |
marking_method | MultipleChoiceMarkingMethod | This determines how the student’s score is determined, based on their selections and the marking matrix. |
MultipleChoiceWarningType
One of the following items:
name | description |
---|---|
"none" | Do nothing |
"prevent" | Prevent submission until they pick an acceptable number of answers |
MultipleChoiceMarkingMethod
One of the following items:
name | description |
---|---|
"sum_ticked_cells" | For each checkbox the student ticks, the corresponding entry in the marking matrix is added to their score. Unticked cells are ignored.This marking method is suitable for situations where the student should only select choices they’re sure about. You could apply negative marks for incorrect choices. |
"score_per_matched_cell" | For each checkbox, the student is awarded an equal proportion of the Maximum marks, if their selection for that cell matches the marking matrix. A positive value in the marking matrix signifies that the student should tick that checkbox, while a value of zero signifies that the student should not tick that box.This marking method is suitable for situations where the student must separate the available choices into two sets. |
"all_or_nothing" | the student is awarded the Maximum marks available if their selection exactly matches the marking matrix, and zero marks otherwise.This marking method is suitable for situations where the student must exactly match a certain pattern, and there is no meaningful “partially correct” answer. |
QuestionPartMatchAnswersWithItems
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
answer_data | MultipleChoiceMatchAnswerData | Specify the options, score per option and feedback per option. Old name was answers |
shuffle_answers | Boolean | If this is ticked, the choices are displayed in random order. |
shuffle_items | Boolean | If this is ticked, the items (horizontal) are displayed in random order. |
show_cell_answer_state | Boolean | If ticked, choices selected by the student will be highlighted as ‘correct’ if they have a positive score, and ‘incorrect’ if they are worth zero or negative marks. If this is not ticked, the ticked choices will be given a neutral highlight regardless of their scores. |
should_select_at_least | Integer | The student must select at least this many choices. The value 0 means “no minimum”, though the student must make at least one choice to submit the part. |
should_select_at_most | "none" or Integer | The student must select at most this many choices. The value 0 means “no maximum”. |
display | MatchAnswerWithItemsDisplay | How should the options be shown? |
layout | MatchAnswersWithChoicesLayout | How should the options be shown? |
wrong_nb_answers_warning_type | MultipleChoiceWarningType | What to do if the student picks the wrong number of responses? Either "none" (do nothing), "prevent" (don’t let the student submit), or "warn" (show a warning but let them submit) |
minimal_achievable_marks | "none" or Integer | If the student would have scored less than this many marks, they are instead awarded this many. Useful in combination with negative marking. |
maximal_achievable_marks | "none" or Integer | If the student would have scored more than this many marks, they are instead awarded this many. The value 0 means “no maximum mark”. |
MultipleChoiceMatchAnswerData
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
item_based | MultipleChoiceMatchAnswers | Specify a list of answers and a list of items with marks for different answers |
numbas_like | MultipleChoiceMatchAnswerDataNumbasLike | Specify a list of answers, choices and marks in separate lists. |
MultipleChoiceMatchAnswers
field | type | description |
---|---|---|
answers | Array of Translation | Values of the answers |
items | Array of MatchAnswersItem | Items for which the answer can be selected |
MatchAnswersItem
field | type | description |
---|---|---|
statement | Translation | The statement for the item |
answer_marks | Array of MatchAnswersItemMarks | Map points to strings of answers ! use anchors in yaml |
MatchAnswersItemMarks
field | type | description |
---|---|---|
marks | JMEString | The marks a student get's for selecting the answer |
answer | Translation | The answer that yields marks for the item |
MultipleChoiceMatchAnswerDataNumbasLike
field | type | description |
---|---|---|
answers | jme-string or Array of Translation | The possible answers |
choices | jme-string or Array of Translation | The possible choices |
marks | jme-string or Array of Array of JMEString | The marks for the corresponding answers |
MatchAnswerWithItemsDisplay
Internal tag named type.
One of the following items:
tag-value | datatype of value | description |
---|---|---|
"radio" | One from each row | |
check | MatchAnswersWithChoicesDisplayCheck | Any number from each row |
MatchAnswersWithChoicesDisplayCheck
field | type | description |
---|---|---|
marking_method | MultipleChoiceMarkingMethod | The marking method to use |
MatchAnswersWithChoicesLayout
field | type | description |
---|---|---|
type | MatchAnswersWithChoicesLayoutType | Which fields should be shown |
MatchAnswersWithChoicesLayoutType
One of the following items:
name | description |
---|---|
"all" | All options are shown |
"lower_triangle" | Only the lower triangle is shown |
QuestionPartNumberEntry
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
answer | NumberEntryAnswer | The expected answer |
display_correct_as_fraction | Boolean | If this is ticked, the correct answer to the part will be rendered as a fraction of two whole numbers instead of a decimal. For example, if the answer is 0.5, it will be displayed as 1/2 instead of 0.5. |
allow_fractions | Boolean | If this is ticked, the student can enter a ratio of two whole numbers, e.g. -3/8, as their answer. |
fractions_must_be_reduced | Boolean | This option only applies when “allow_fractions” is ticked. If this is ticked, the student must enter their fractional answer reduced to lowest terms. For example, consider a part whose correct answer is 5/4. If this is ticked, 10/8 will be marked as incorrect. |
fractions_must_be_reduced_hint | Boolean | If this is ticked and fractions_must_be_reduced is ticked, then text explaining that the student must reduce their fraction to lowest terms is shown next to the input box. |
partial_credit_if_fraction_not_reduced | Number | The proportion of credit to award if the student’s answer is a non-reduced fraction. |
allowed_notation_styles | Array of AnswerStyle | The styles of number notation that the student can use to enter their answer. There are different ways of writing numbers, based on culture and context. Tick an option to allow the student to use that style in their answer. Note that some styles conflict with each other: for example, 1.234 is a number between 1 and 2 in English, while it’s the integer 1234 in French. The student’s answer will be interpreted using the first allowed style for which it is a valid representation of a number. |
display_correct_in_style | AnswerStyle | The style of number notation to use when displaying the student’s answer. |
NumberEntryAnswer
One of the following items:
type | description |
---|---|
JMEString | The answer is accepted as correct when it equals this value |
NumberEntryAnswerRange | The answer is accepted as correct when it is within a range |
NumberEntryAnswerRange
field | type | description |
---|---|---|
from | JMEString | The smallest value accepted as correct. |
to | JMEString | The largest value accepted as correct. |
AnswerStyle
One of the following items:
name | description |
---|---|
"english" | English style - commas separate thousands, dot for decimal point |
"english-plain" | Plain English style - no thousands separator, dot for decimal point |
"english-si" | English SI style - spaces separate thousands, dot for decimal point |
"european" | Continental European style - dots separate thousands, comma for decimal poin |
"european-plain" | Plain French style - no thousands separator, comma for decimal point |
"french-si" | French SI style - spaces separate thousands, comma for decimal point |
"indian" | Indian style - commas separate groups, dot for decimal point. The rightmost group is three digits, other groups are two digits. |
"scientific" | Significand-exponent ("scientific") style |
"swiss" | Swiss style - apostrophes separate thousands, dot for decimal point |
QuestionPartPatternMatch
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
case_sensitive | Boolean | If this is ticked, the capitalisation of the student’s answer must match that of the answer pattern. If it doesn’t, partial credit will be awarded. |
wrong_case_partial_credit | Float | The partial credits awarded if the students capitalisation is wrong |
pattern | Translation | The text or pattern the student must match. |
display_answer | Translation | A representative correct answer string to display to the student, in case they press the Reveal answers button. |
match_mode | PatternMatchMode | The test to use to decide if the student’s answer is correct. Some examples https://numbas-editor.readthedocs.io/en/latest/question/parts/match-text-pattern.html#regular-expressions |
PatternMatchMode
One of the following items:
name | description |
---|---|
"regex" | The pattern is interpreted as a regular expression (https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions) |
"exact" | Marks the student’s answer as correct only if it is exactly the same as the text given in Answer pattern. Space characters are removed from the start and end of the student’s answer as well as the answer pattern before comparison. |
QuestionPartInformation
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
QuestionPartExtension
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
QuestionPartMatrix
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
correct_answer | JMEString | The expected answer to the part. This is a JME expression which must evaluate to a matrix. |
dimensions | QuestionPartMatrixDimensions | The dimensions of the student's answer field |
max_absolute_deviation | Float | If the absolute difference between the student’s value for a particular cell and the correct answer’s is less than this value, then it will be marked as correct. |
mark_partial_by_cells | Boolean | If this is set to true, the student will be awarded marks according to the proportion of cells that are marked correctly. If this is not ticked, they will only receive the marks for the part if they get every cell right. If their answer does not have the same dimensions as the correct answer, they are always awarded zero marks. |
display_correct_as_fraction | Boolean | If this is ticked, then non-integer numbers in the correct answer will be displayed as fractions instead of decimals. |
allow_fractions | Boolean | If this is ticked, the student can enter a ratio of two whole numbers, e.g. -3/8, as their answer. |
QuestionPartMatrixDimensions
field | type | description |
---|---|---|
rows | QuestionPartMatrixDimension | The number of rows in the student’s answer field. |
columns | QuestionPartMatrixDimension | The number of columns in the student’s answer field. |
QuestionPartMatrixDimension
One of the following items:
name | description |
---|---|
"Fixed" | The dimensions are fixed |
"Resizable" | The student can change the dimensions |
QuestionPartMatrixRangedDimension
field | type | description |
---|---|---|
default | jme-string or Integer | The default size |
min | jme-string or Integer | The minimal size |
max | "none" or jme-string or Integer | The maximal size, if this is none, there is no limit |
QuestionPartCustom
field | type | description |
---|---|---|
prompt | Translation | A content area used to prompt the student for an answer. |
marks | Number | The number of marks to award for answering the part correctly. |
part_name | "none" or String | An optional custom part name, to use in part path's |
show_correct_answer | Boolean | When the student reveals answers to the question, or views the question in review mode, should a correct answer be shown? You might want to turn this off if you’re doing custom marking and the part has no “correct” answer. |
show_feedback_icon | Boolean | After the student submits an answer to this part, should an icon describing their score be shown? This is usually shown next to the input field, as well as in the feedback box. This option also controls whether feedback messages are shown for this part. You might want to turn this off if you’ve set up a question with a custom marking script which assigns a score based on the answers to two or more parts (or gapfills), meaning the individual parts have no independent “correct” or “incorrect” state. |
steps | Array of QuestionPart | A (possibly empty) list of sub-parts which the student can reveal by clicking on a button. Marks awarded for steps don’t increase the total available for the part, but are given in case the student gets a lower score for the main part. |
steps_penalty | Number | If the student reveals the Steps, reduce the total available marks by this amount. Credit for the part is scaled down accordingly. For example, if there are 6 marks available and the penalty for revealing steps is 2 marks, the total available after revealing steps is 4. An answer worth 3 marks without revealing steps is instead worth 3 * 4/6 = 2 marks after revealing steps. |
custom_marking | "none" or CustomMarking | The marking algorithm tab allows you to customise the script used to mark the student’s answer, and test that it works correctly on answers that you provide. |
adaptive_marking | "none" or AdaptiveMarking | Adaptive marking allows you to incorporate the student’s answers to earlier parts when marking their answer to another part. You could use this to allow an “error carried forward” marking scheme, or in more free-form questions where one part has no correct answer - for example, “think of a number and find its square root”. This is achieved by replacing the values of question variables with the student’s answers to other parts. When a variable is replaced, any other variables depending on that one are recalculated using the new value. All other variables keep their original values. See for more info and a warning https://numbas-editor.readthedocs.io/en/latest/question/parts/reference.html#adaptive-marking |
type | String | The name of the custom part name |
settings | Map from String to CustomPartInputTypeValue | The settings for the CustomPartType |
BuiltinConstants
field | type | description |
---|---|---|
e | Boolean | Whether the constant e is enabled |
pi | Boolean | Whether the constant pi is enabled |
i | Boolean | Whether the constant i is enabled- |
CustomConstant
field | type | description |
---|---|---|
name | String | The name of the constant |
value | JMEString | The value of the constant |
tex | String | The tex code use to display the constant |
VariablesTest
field | type | description |
---|---|---|
condition | JMEString | A JME expression which should evaluate to true when the set of variables generated has the properties you want. For example, if a, b and c are the coefficients of a quadratic equation and you want it to have real roots, the condition could be b^2-4ac>=0. |
max_runs | Integer | The maximum number of times the system should regenerate the set of variables without finding a set which satisfies the condition before giving up. If the system exceeds this number in a compiled exam, the entire exam will fail, so try to avoid it! |
Preamble
field | type | description |
---|---|---|
js | FileString | The JavaScript to add to the outputfiles |
css | FileString | The CSS to add to the outputfiles |
QuestionNavigation
field | type | description |
---|---|---|
can_regenerate | Boolean | Whether the student can regenerate the question Old name was allow_regenerate |
show_title_page | Boolean | Whether the title page should be shown. Old name was show_frontpage |
confirm_when_leaving | Boolean | Whether the student will be asked to confirm when leaving the exam. |
Extensions
field | type | description |
---|---|---|
chemistry | Boolean | |
download_text_file | Boolean | |
eukleides | Boolean | The Eukleides extension provides functions to embed diagrams created using the Eukleides language. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#eukleides |
geogebra | Boolean | The GeoGebra extension provides functions to embed GeoGebra worksheets in a question. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#geogebra |
graphs | Boolean | This extension provides some functions for working with and drawing graphs (networks of vertices joined by edges) in Numbas. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#graph-theory |
jsx_graph | Boolean | The JSXGraph extension provides functions to create and manipulate interactive diagrams with the JSXGraph library. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#eukleides |
linear_algebra | Boolean | |
linear_codes | Boolean | This extension provides a new data type and some functions to deal with linear codes. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#linear-codes |
optimisation | Boolean | |
permutations | Boolean | |
polynomials | Boolean | This extension provides a new data type and some functions to deal with rational polynomials. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#polynomials |
quantities | Boolean | This extension wraps the js-quantities library to provide a “quantity with units” data type to Numbas. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#quantities |
random_person | Boolean | The “random person” extension provides a collection of functions to generate random people, for use in word problems. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#random-person |
stats | Boolean | The statistical functions extension provides many new functions for generating samples from random distributions, and calculating statistics. https://numbas-editor.readthedocs.io/en/latest/extensions/first-party.html#statistical-functions |
sqlite | Boolean | |
text | Boolean | |
written_number | Boolean |
ResourcePath
field | type | description |
---|---|---|
resource_name | String | |
resource_path | Filesystem path |