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.
Directory structure
exercise.xml¶
An XML file containing all information about the exercise, see below for the XML format.
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" type="default">
<text>What is the energy of the particle?</text>
<expression>m*v^2/2</expression>
</question>
<question key="2" type="default">
<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 Question Types. |
|
|
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 |