File structure
Exercises are stored on the server’s file system. An exercise consists
of a directory containing a definition file exercise.xml together
with a file exercisekey and possibly additional assets such as
figures/pdf. This directory must be located somewhere under the root
exercises/ directory to be recognized by the system.
exercise.xml
An XML file containing all information about the exercise, see below for the XML format.
exercisekey
A text file containing a unique key (up to 255 bytes of UTF8 encoded ASCII) that identifies the exercise in the database. A key file can be added and assigned manually, but is automatically generated as a uuid4 identifier if not present.
Exercise XML format
This first part describes the XML tags that are common to all exercises.
Example
<exercise>
<exercisename>Momentum and energy</exercisename>
<global>
m = 3 kg; v = 5 meter / second;
</global>
<text>
A particle with mass $m$ is moving with velocity $v$.
</text>
<question key="1">
<text>What is the energy of the particle?</text>
<expression>m*v^2/2</expression>
</question>
<question key="2">
<text>What is the momentum of the particle?</text>
<expression>m*v</expression>
</question>
</exercise>
Specifications
Tag |
Attributes |
Description |
|
Root tag |
|
|
The visible name/title of the exercise |
|
|
|
Question root tag. See Functions. |
|
|
Data that will be passed to all questions in this exercise. For example variables for multiple symbolic questions. |
|
|
A figure (usually an image) that aids in explaining the
question. Specify the filename of image that was added to the
exercise folder, or uploaded via the assets browser in |