Referencing Variables
A dynamic question can reference variables in a variety of different
places in a question. In all places, a variable reference is required
to be delimited on both sides by the @@
character sequence.
Reference locations
Variable references are most commonly seen in the body of a question.
But they can also appear in the following locations:
Choices
In multiple choice, check all that apply, and ordering style questions it is possible to vary a portion or the entirety of the content of each choice.
Feedback
When creating dynamic questions it is often helpful to provide custom feedback that includes the actual values shown to the student.
Hints
Hints also can contain variable references.
Match expressions
The match expressions for numeric or text input questions can contain variable references.
Constraints and limitations
There are some constraints to keep in mind on how variables can be referenced and how dynamic content can be created.
Number of choices, hints
While variable references can be used to make the contents of a question choice or hint dynamic, there is no way to structure a dynamic question to vary the number of choices displayed to a student or to vary the number of hints available.
Images
Currently, varying the display of an image (e.g. displaying one image out of a set of five) is not supported.