<when>

<when> is an Evaluation component that is used for creating boolean conditions within an <award>.

Attributes and Properties

Attributes for <when>
AttributeTypeValues
allowedErrorInNumbers = "…"number
allowedErrorIsAbsolute = "…"boolean"true" "false"
caseInsensitiveMatch = "…"boolean"true" "false"
expandOnCompare = "…"boolean"true" "false"
includeErrorInNumberExponents = "…"boolean"true" "false"
matchBlanks = "…"boolean"true" "false"
matchByExactPositions = "…"boolean"true" "false"
matchPartial = "…"boolean"true" "false"
numPeriodicSetMatchesRequired = "…"integer
numSignErrorsMatched = "…"number
simplifyOnCompare = "…"text"none" "full" "numbers" "numberspreserveorder"
symbolicEquality = "…"boolean"true" "false"
unorderedCompare = "…"boolean"true" "false"
Props for <when name="w">
PropertyType
$w.allowedErrorInNumbersnumber
$w.allowedErrorIsAbsoluteboolean
$w.caseInsensitiveMatchboolean
$w.conditionSatisfiedboolean
$w.disabledboolean
$w.expandOnCompareboolean
$w.fixedboolean
$w.fixLocationboolean
$w.fractionSatisfiednumber
$w.hiddenboolean
$w.includeErrorInNumberExponentsboolean
$w.matchBlanksboolean
$w.matchByExactPositionsboolean
$w.matchPartialboolean
$w.numPeriodicSetMatchesRequiredinteger
$w.numSignErrorsMatchednumber
$w.simplifyOnComparetext
$w.symbolicEqualityboolean
$w.texttext
$w.unorderedCompareboolean
$w.valueboolean

Example: <when> in an <award> with <mathInput/>

<when> is used to specify the boolean condition within an <award>.


Example: <when> in an <award> with graphical input

<when> is used to specify the boolean condition within an <award>. In this case, the boolean is based on graphical interactions performed by the user to update the radius of the named <circle/>.


Example: <when> in an <award> with <textInput/>

<when> is used to specify the boolean condition within an <award>. In this case, the boolean is based on the value of a <textInput/>.


Attribute Example: matchPartial

The matchPartial attribute signifies that partial credit is to be awarded if any part of the enclosed boolean condition is true.


Property Example: value

The value property renders the value of the boolean condition enclosed by the <when> component.


Property Example: fractionSatisfied

The fractionSatisfied property renders the fractional value corresponding to which portion of the boolean condition enclosed by the <when> evaluates to true.


Property Example: conditionSatisfied

The conditionSatisfied property renders the boolean value corresponding to whether the <when> condition has been satisfied.


Property Example: matchPartial

The matchPartial attribute of the <when> component is also accessible as a property.