Referenceaward (Basic Use)

<award>

Specifies conditions for awarding credit in an answer

<award> is an Evaluation component that defines conditions for awarding credit and evaluating user responses. An <award> is the child of an <answer> and can be used to refine credit awarded in a variety of applications.

Many attributes for <answer> can be applied to an <award> to control the behavior of just that <award>.

The following examples illustrate some of the basic award forms.
See the following pages for additional examples on using the attributes and properties.

Attributes and Properties

Attributes for <award>

Other (19)
allowedErrorInNumbers

number. Default value: 0. Maximum allowed numeric error when comparing numbers (relative or absolute).

boolean. Default value: false. Whether allowedErrorInNumbers is interpreted as an absolute (rather than relative) tolerance.

boolean. Default value: false. Whether text comparisons ignore letter case.

number. Default value: 1. Fraction of credit (0 to 1) granted when this award matches.

expandOnCompare

boolean. Default value: false. Whether to expand math expressions before comparing them.

textList. Codes that select reusable feedback messages when this award matches.

text. Custom feedback text shown when this award matches.

boolean. Default value: false. Whether the allowed numeric error also applies to numbers in exponents.

boolean. Default value: false. Whether unfilled blanks in a math expression count as a match.

boolean. Default value: false. Whether to match list responses by exact position rather than by content.

boolean. Default value: false. Whether to award partial credit when the response is partially correct.

numPeriodicSetMatchesRequired

integer. Default value: 3. Number of consecutive elements of a periodic set required to count as a match.

numSignErrorsMatched

number. Default value: 0. Maximum number of sign errors that still count as a match.

parseScientificNotation

boolean. Default value: false. Whether to parse expressions like 1e3 as scientific notation.

reference. References to components whose values should be treated as responses for this award.

simplifyOnCompare

keyword. Level of simplification applied to math expressions before comparing them.

ValueDescription
none (default)No simplification is applied before comparing.
fullFully simplify both expressions before comparing.
numbersSimplify numeric subexpressions only, leaving symbolic structure intact.
numbersPreserveOrderLike numbers, but does not reorder commutative operands.
normalizeOrderReorder commutative operands into a canonical form without simplifying values.
splitSymbols

boolean. Default value: true. Whether multi-character symbols should be split into a product of single-character variables when parsing.

boolean. Default value: false. Whether comparison uses symbolic equality (rather than numeric evaluation).

unorderedCompare

boolean. Default value: false. Whether order is ignored when comparing list-like responses.

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <award name="a">

Other (30)
$a.allowedErrorInNumbers

number. Maximum allowed numeric error when comparing numbers (relative or absolute).

$a.allowedErrorIsAbsolute

boolean. Whether allowedErrorInNumbers is interpreted as an absolute (rather than relative) tolerance.

boolean. Whether this award was matched at the last submission.

$a.caseInsensitiveMatch

boolean. Whether text comparisons ignore letter case.

$a.credit

number. Fraction of credit (0 to 1) granted when this award matches.

number. Credit (0 to 1) this award granted at the last submission.

$a.creditAchievedIfSubmit

number. Credit (0 to 1) this award would grant if submitted with the current response.

$a.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$a.expandOnCompare

boolean. Whether to expand math expressions before comparing them.

$a.feedback

feedback. The first feedback message produced by this award.

$a.feedbackCodes

textList. Codes that select reusable feedback messages when this award matches.

[ feedback ]. The feedback messages produced by this award.

$a.feedbackText

text. Custom feedback text shown when this award matches.

$a.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$a.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

number. Fraction (0 to 1) by which this award's match condition was satisfied at last submission.

$a.fractionSatisfiedIfSubmit

number. Fraction (0 to 1) by which this award's match condition is currently satisfied.

$a.hidden

boolean. Whether this component is hidden from the rendered output.

$a.includeErrorInNumberExponents

boolean. Whether the allowed numeric error also applies to numbers in exponents.

$a.matchBlanks

boolean. Whether unfilled blanks in a math expression count as a match.

$a.matchByExactPositions

boolean. Whether to match list responses by exact position rather than by content.

$a.matchPartial

boolean. Whether to award partial credit when the response is partially correct.

$a.numFeedbacks

number. The number of feedback messages associated with this award.

$a.numPeriodicSetMatchesRequired

integer. Number of consecutive elements of a periodic set required to count as a match.

$a.numSignErrorsMatched

number. Maximum number of sign errors that still count as a match.

$a.parseScientificNotation

boolean. Whether to parse expressions like 1e3 as scientific notation.

$a.simplifyOnCompare

text. Level of simplification applied to math expressions before comparing them.

$a.splitSymbols

boolean. Whether multi-character symbols should be split into a product of single-character variables when parsing.

$a.symbolicEquality

boolean. Whether comparison uses symbolic equality (rather than numeric evaluation).

$a.unorderedCompare

boolean. Whether order is ignored when comparing list-like responses.

Common to all components (4)
$a.doenetML

text. The DoenetML source code that produced this component.

$a.hide

boolean. Whether to hide this component from the rendered output.

$a.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$a.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: <award> multiple correct responses

Multiple <award> children can be used within an <answer> to ascribe credit to multiple responses.


Example: <award> based on a boolean

An <answer> can be based on a boolean condition by giving each <award> a <when> child. An <award> will be awarded if its <when> evaluates to true.


Example: <award> for partial credit

The credit attribute of the <award> component is used to assign partial credit to specific responses.


Example: <award> for tailored feedback

A named <award> can be referenced within a <feedback> to target specific responses.