Metadata
Structure
<task trackingId="244a854f-c562-45b7-b425-198cd00b8380" lang="java" attempts="25" protectedRegions="disabled">
<name>Appointment</name>
<evaluator>java@java25</evaluator>
<evaluatorParams>
<!-- if assert statements are used in the solution -->
<param key="jvm.enable_asserts" value="true"/>
</evaluatorParams>
<description>Termine</description>
<submissionModes default="TEXT">
<submissionMode name="TEXT"/>
<submissionMode name="FILE"/>
</submissionModes>
<files>
<file public="true" type="template" path="Appointment.java"/>
<file public="false" type="test" path="AppointmentTest.java"/>
<file public="false" type="acceptanceTest" path="AppointmentAbnahmeTest.java"/>
<file public="false" type="include" path="Date.java"/>
<file public="false" type="include" path="DateTime.java"/>
<file public="false" type="include" path="Time.java"/>
<file public="false" type="solution" path="Appointment.java"/>
<file public="true" type="misc" path="Anhang.pdf"/>
</files>
<mimeMappings>
<!-- not necessary in this example, only included for completeness -->
<mimeMapping map=".java" to="text/x-java-source"></mimeMapping>
</mimeMappings>
<custom>
<sample>Hello World!</sample>
</custom>
</task>
An XSD
is available for local validation of meta.xml. It won't catch everything,
but it saves you unnecessary round-trips over syntax errors.
Header
<task trackingId="244a854f-c562-45b7-b425-198cd00b8380" lang="java" attempts="25" protectedRegions="disabled">
...
</task>
| Attribute | Required | Type | Description |
|---|---|---|---|
trackingId | yes | UUID4 | ID used for preserving the link between solutions and the task they were submitted to. Must be unique within a task pool and should never be changed. |
attempts | no | int | How many times a solution can be submitted for this task. Solutions submitted after the limit was reached are still accepted, but flagged accordingly. |
lang | yes | string | Identifier for the language that best fits the task. See possible values in Subato under Verwaltung -> Sprachen (the value outside parentheses is the identifier, the one in parentheses is the display name). If you need additional languages, feel free to add them in Subato. |
protectedRegions | no | ProtectedRegionMode | See Protected Regions |
General
<name>Appointment</name>
<evaluator>java@java25</evaluator>
<evaluatorParams>
<param key="jvm.enable_asserts" value="true"/>
</evaluatorParams>
<description>Termine</description>
| Element | Required | Type | Description |
|---|---|---|---|
name | yes | string | The task's display name. |
description | no | string | Short description shown in the UI. |
evaluator | no | string | Reference to the evaluation stack used for solution evaluation (compiling, testing, style). Format: <evaluator_id>[@(<environment_id>)]. Available stacks (with a reference to the docs in Eva) are listed in Subato under Verwaltung -> Eva. |
evaluatorParams | no | - | Parameters sent along with the evaluation. See the docs in Eva of the chosen evaluator for available parameters. Currently limited to simple key-value pairs with primitive values. |
Submission Mode
Configures how solutions can be submitted for this task.
<submissionModes default="TEXT">
<submissionMode name="TEXT"/>
<submissionMode name="FILE" extensions="java" archives="true" extract="true"/>
</submissionModes>
| Attribute | Required | Type | Description |
|---|---|---|---|
submissionModes.default | no | SubmissionMode | Submission mode selected by default in the UI. |
submissionMode.name | yes | SubmissionMode | |
submissionMode.extensions | no (default: every extension of defined template files) | string | Allowed file extensions (separated with ;) of submitted files. File extensions are checked for submitted files only. Files nested inside archives are not checked recursively. Extensions can be specified only when submissionMode.name = FILE. |
submissionMode.archives | no (default: true) | boolean | Whether submitting an archive is allowed. If set to true, files with the archive extensions listed in SubmissionMode can be submitted. This can be specified only when submissionMode.name = FILE. |
submissionMode.extract | no (default: true if evaluator is configured, false otherwise) | boolean | Whether archives are extracted, e.g. to view solutions directly in the UI. Must be true if evaluator is configured, since the source files need to be extracted for evaluation. This can only be specified when submissionMode.name = FILE |
Specifying the submissionModes element is optional. If omitted, FILE is always enabled
(with default values set for extensions, archives, and extract), and TEXT is
enabled when there's exactly one template file. If the default attribute is omitted, it will be resolved to TEXT if
enabled, otherwise FILE. If TEXT is configured explicitly and there's no template file, an empty
editor is shown and the submitted file is saved as unnamed.txt.
Choose TEXT for smaller tasks (for example, short-answer questions) that can be completed using a web editor. Choose FILE for tasks that require or benefit from editing in an IDE.
File References
Defines metadata for the task's files. Every file placed in the task's directory must be listed here
to be picked up by Subato. As there may be tasks that do not need any files, specifying the files elements is optional.
<files>
<file public="true" type="template" path="Appointment.java"/>
<file public="false" type="test" path="AppointmentTest.java"/>
<file public="false" type="acceptanceTest" path="AppointmentAbnahmeTest.java"/>
<file public="false" type="include" path="Date.java"/>
<file public="false" type="include" path="DateTime.java"/>
<file public="false" type="include" path="Time.java"/>
<file public="false" type="solution" path="Appointment.java"/>
<file public="true" type="misc" path="Anhang.pdf"/>
</files>
Define a file element per file, with these attributes:
| Attribute | Required | Type | Description |
|---|---|---|---|
type | no (default: misc) | FileType | |
path | yes | string | Relative path to the file, from the files/<type> directory. See the docs on file organization. |
public | no (default: false) | boolean | Is the file visible to non-instructors? |
You can also give each file a short description to be shown in the UI. For example:
<file public="true" type="template" path="Appointment.java">A description</file>
Mime-Type Mappings
Task-specific mappings from file extensions to mime types (e.g.
text/plain). The mime type determines whether a file can be shown in a
code editor, which syntax-highlighting rules apply, and whether submitting a given file is allowed.
<mimeMappings>
<mimeMapping map=".eva" to="text/plain"></mimeMapping>
</mimeMappings>
| Attribute | Required | Type | Description |
|---|---|---|---|
mimeMapping.map | yes | string | Filename suffix to match |
mimeMapping.to | yes | string | Mime type to use if the suffix matches |
Specifying these mappings is optional. By default, Subato tries to infer the mime type automatically, but this can fail or produce the wrong result. In particular, when the task involves files with custom domain-specific languages.
Extensibility
Additional elements must live inside the custom element. For example:
<custom>
<sample>Hello World!</sample>
</custom>
They can't be placed anywhere else, because meta.xml is validated against an XSD 1.0 schema. XSD
1.1 wouldn't have this limitation, but Subato only supports XSD 1.0.