Exercise configuration
Dodona allows setting the configuration of an exercise and a reading activity using config files. These files are in the JSON format and must be named config.json in exercise directories and dirconfig.json for other directories. To determine the final config values for a learning activity, Dodona merges the default config file with the dirconfigs in the parent directories of the exercise and with the exercise config. Merging happens in such a way that you can always override values set in a parent directory.
Config file structure for exercises
type: Must be set toexercisefor exercises. Defaults toexerciseif not present.programming_language(string): the programming language of the exercise, used for syntax highlighting and correct file extensions. The available programming languages can be found here.access(publicorprivate): determines who can use this exercisepublic: any other teacher on Dodona can use this exerciseprivate: only teachers with explicit permission can use this exercise. A course only gets this permission once it is added to the approved courses of the exercise's repository. Copying a course does not carry this over automatically; see copying a course for details.
description(object): the specification of the description of the exercisenames(object): the name of the exercise, with two-letter language codes as keys (e.g.,nl,en,fr)sandbox_files(array of strings, optional): a list of files under thedescription/mediadirectory that should be autoloaded in the sandbox
evaluation: the specification of the evaluation procedurehandler(string, optional): the name of the judge that is used for evaluation. By default, Dodona uses the judge specified for the repository. An overview of the available judges can be found here.image(string, optional): the name of the docker image that is used for evaluation. By default, Dodona uses the image specified by the judge.time_limit(integer, optional): the time in seconds before the evaluations times out. By default, the limit is 42 seconds, with a maximum of 120 seconds: a higher value is replaced by that maximum when the exercise is evaluated. The info page of the exercise shows the limit that is really used. On a simple exercise it is useful to lower this: a student who writes an infinite loop gets feedback after 5 seconds instead of 42, and less evaluation time is wasted. Leave enough room for a correct solution. The limit covers the whole evaluation, including starting the judge and compiling the code, not only the time the student's program runs, so a value that is fine for Python can be too tight for a compiled language.memory_limit(integer, optional): the amount of memory in bytes that is available for running the evaluation. By default, the limit is 256MB, or more if the judge sets a higher value. Only set this if you need more than the default. A lower value rarely produces a clear error message: it usually just makes every evaluation several times slower. See memory limits for the limits that apply and why a lower value causes problems.network_enabled(boolean, optional): set totrueif internet access should be enabled. This optional setting isfalseby default.
labels(array of strings, optional): a list of labels that can be used to search for this exercise using the Dodona web interface. Defaults to an empty list.contact(string, optional): info about the author of this exercise, formatted like an email To header.
Config file structure for reading activities
The structure for a reading activity is identical to that of an exercise. There are two big differences: the value of type must be set to content and keys that are not relevant for exercises can be omitted. The format of the description is also identical.
type: Must be set tocontentfor reading activitiesaccess(publicorprivate): determines who can use this exercisepublic: any other teacher on Dodona can use this exerciseprivate: only teachers with explicit permission can use this exercise
description(object): the specification of the description of the exercisenames(object): the name of the exercise, with two-letter language codes as keys (e.g.,nl,en,fr)
labels(array of strings, optional): a list of labels that can be used to search for this exercise using the Dodona web interface. Defaults to an empty list.contact(string, optional): info about the author of this reading activity, formatted like an email To header.
Example config file config.json
Exercise
{
"type": "exercise",
"programming_language": "python",
"access": "private",
"description": {
"names": {
"nl": "Voorbeeld oefening",
"en": "Example exercise",
"fr": "Exercice exemple"
}
},
"evaluation": {
"handler": "tested",
"test_suite": "suite.yaml",
"network_enabled": true
},
"labels": ["voorbeeld", "eenvoudige oefening"],
"contact": "Dodona <team@dodona.be>"
}Reading activity
{
"description": {
"names": {
"en": "Aeneid",
"nl": "Aeneis",
"fr": "Énéide"
}
},
"type": "content",
"access": "private",
"labels": ["test", "intro"]
}Example folder config file dirconfig.json
{
"access": "private",
"evaluation": {
"handler": "tested"
},
"programming_language": "python",
"contact": "Firstname Lastname <firstname_lastname@dodona.be>"
}