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 toexercise
for exercises. Defaults toexercise
if 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
(public
orprivate
): 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 exercisenl
: the name of the exercise in Dutchen
: the name of the exercise in English
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.memory_limit
(integer, optional): the amount of memory in bytes that is available for running the evaluation. By default, the limit is 100MB.network_enabled
(boolean, optional): set totrue
if internet access should be enabled. This optional setting isfalse
by default.
labels
(array of strings, optional): a list of labels that can be used to search for this exercise using the Dodona web interface.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 tocontent
for reading activitiesaccess
(public
orprivate
): 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 exercisenl
: the name of the exercise in Dutchen
: the name of the exercise in English
labels
(array of strings, optional): a list of labels that can be used to search for this exercise using the Dodona web interface.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"
}
},
"evaluation": {
"handler": "python",
"image": "dodona/dodona-python",
"time_limit": 10,
"memory_limit": 10000000,
"network_enabled": true
},
"labels": ["voorbeeld", "eenvoudige oefening"],
"contact": "Dodona <dodona@ugent.be>"
}
Reading activity
{
"description": {
"names": {
"en": "Aeneid",
"nl": "Aeneis"
}
},
"type": "content",
"access": "private",
"labels": ["test", "intro"]
}
Example folder config file dirconfig.json
{
"access": "private",
"evaluation": {
"handler": "python",
"time_limit": 15,
"memory_limit": 100000000
},
"programming_language": "python",
"contact": "Firstname Lastname <firstname_lastname@ugent.be>"
}