There are two different sets of needs that external contest formats strive to satisfy.
CMS provides an exporter cmsContestExporter and an importer cmsContestImporter working with a format suitable for the first set of needs. This format comprises a dump of all serializable data regarding the contest in a JSON file, together with the files needed by the contest (testcases, statements, submissions, user tests, ...). The exporter and importer understand also compressed versions of this format (i.e., in a zip or tar file). For more information run
cmsContestExporter -h
cmsContestImporter -h
As for the second set of needs, the philosophy is that CMS should not force upon contest creators a particular environment to write contests and tasks. Therefore, we encourage you to write importer and reimporter scripts, modeled upon those we wrote for the environment used in the Italian Olympiads, that can be run with the commands cmsYamlImporter and cmsYamlReimporter and inspected at cmscontrib/YamlImporter.py and cmscontrib/YamlReimporter.py. If you want to use the Italian environment there is a description in the next section, but please be aware that it has severe limitations: for example, many handles are in Italian and the support for complex task types is a bit cumbersome.
You can follow this description looking at this example. A contest is represented in one directory, containing:
The exact structure of these files and directories is detailed below. Note that providing confusing input to cmsYamlImporter can, unexpectedly, confuse it and create inconsistent tasks and/or strange errors. For confusing input we mean parameters and/or files from which it can infer no or multiple task types or score types.
The contest.yaml file is a plain YAML file, with at least the following keys.
The following are optional keys.
Each contest user (contestant) is described in one element of the utenti key in the contest.yaml file. Each record has to contains the following keys.
The following are optional keys.
The task YAML files requires the following keys.
The following are optional keys.
The following are optional keys that must be present for some task type or score type.
The content of the task directory is used both to retrieve the task data and to infer the type of the task.
These are the required files.
The following are optional files, that must be present for certain task types or score types.