Referenceaward (Properties)

<award>

Property Examples

The following examples illustrate use of the <award> tag properties.


Property Example: Attributes as Properties

The <award> attributes listed above are also accessible as properties.


Property Example: creditAchieved

The creditAchieved property of the named <award> renders the credit that award could earn.


Property Example: fractionSatisfied

The fractionSatisfied property of the named <award> ignores the credit attribute of the award indicates the fraction of its conditions are satisified.


Property Example: awarded

The awarded property of an <award> is true when the answer is submitted and the award was used to determine the credit achieved for the answer.
Typically (unless the answer attribute numAwardsCredited was specified), at most a single <award> will be awarded — the matched award with the largest credit.

A common use for awarded is to base feedback on particular answers. It’s so common that we allow a shortcut to just use the name of award in a macro (see the use of $notFully in this example).


Property Example: feedbacks

The feedbacks property renders any feedback that is defined within the <answer> itself. To specify more customized feedback, use a <feedback> tag.