Quick Start Guides


Exercises are grouped in exercise groups. The normal exercises are meant to be non-mandatory training exercises, which means the users will be able to submit solutions at any time, and the best submission will determine the exercise status (solved, attempted or un-attempted). Assignment exercises are on the other hand meant to be handed in, see assignments for further details.

Exercise Group

An exercise group is a set of normal exercises. When creating/editing an exercise group the following properties can be set:

The name shown in the list of exercise groups (like 'Week X' etc).
Visible From
The date and time from which the exercise group will be visible for the users.


An exercise has the following properties:

The name shown in the list of exercises in the exercise group.
A description of the exercise visible to the users. The description can be styled using markdown.
Select the programming languages which the exercise may be solved in. Selecting Default Languages will allow the default language(s) of the course, see settings.
Attached Files
Files such as templates, header-files can be attached to an exercise, which then will be available to the users. Make sure not to upload test data here.


The solution to the exercise can be uploaded (optional) and can serve two purposes: The solution can be used to generate the output of the test data automatically (see expected output) and/or the solution can be used as a suggested solution shown to the users. For the solution the following properties are thus available:

Solution Files
Upload the solution file(s) to the exercise (as users would have to).

Show Suggested Solution

Select when if/when a suggested solution should be shown to the users:

  • After exercise is solved - the suggested solution will only be visible to the user after he/she has solved the exercise.
  • Always - the suggested solution will always be visible to the users.
  • Never - the suggested solution will never be visible to the users.

Suggested Solution Type

If the suggested solution is not set to Never, then the type of the suggested solution can be selected:

  • Use solution files - the uploaded solution files will be shown as the suggested solution.
  • Custom - a custom suggested solution can be written, see next option.
Suggested Solution Text
The suggested solution can be written in the text area using markdown.

Test Groups

Finally the test data should be uploaded. The tests are uploaded in test groups, which are sets of tests with the the same configuration (see configuration). An exercise can have as many test groups as you want. For each test group the following properties can be set:

The name of the test group, visible to the user (e.g. Tests, Sample tests, etc).

Run If

Select when the test group should be run:

  • Always - the test group will always be run when a new submission to the exercise is made.
  • [TestGroup] succeeds - the test group will only be run if the test group [TestGroup] succeeds, i.e. all tests are passed.
  • Never - the test group will not be run automatically. You can manually run it on submissions afterwards.


Select what should be visible to the users after submitting a solution:

  • All - All test data and judge output will be visible.
  • No test files - Only the judge output will be visible.
  • No test files or judge - Only the result (Succeeded, Wrong Answer, etc.) of each test is visible.
  • Not visible - The entire test group will not be visible.
Config Template
A configuration template can be selected. See templates for more details.
(Overwrite) Test Data
All the relevant test data to the test group should be uploaded either as individual files or as a zip-file. The new test data will overwrite any existing test data. For details on the test data files, see test data.
Advanced Configurations
A number of advanced configurations can also be specified. See configuration for more details. If a template is selected, then these configurations will be merged onto the configurations from the template.

For training exercises we suggest having only one test group with full feedback (visibility set to All), and execution mode to until failure (see configuration). With these settings the users can focus on correcting one test at a time. We also encourage you to upload a suggested solution and let it be visible after the exercise is solved, because we believe that the best way to learn is by trying yourself first, and then afterwards see the correct solution for comparison.


Exercises and exercise groups can be imported to CodeJudge by uploading a single zip-file. To import a single exercise file the uploaded zip-file should contain a folder with the exercise name and the following files in it:

NOTE: This function is very strict with the contents of the uploaded file, and only limited error messages helping diagnosing problems are currently available.

A JSON-file containing the exercise properties.
(optional) The description of the exercise.
(optional) The suggested solution of the exercise.
Folder(s): [Test group name]
Folder(s) containing the test data. For details on how to set up the actual test data, see test data.

To import an entire exercise group, simply place all the exercise folders in a zip file and upload it. Exercises and exercise groups can also be exported in the same format as described above.


An assignment consists of a set of exercises like an exercise group, but since the solutions to these exercises are to be handed in, the exercises have a due-date. Here the last submission to each exercise before the due date will count as the solution handed in. (If by mistake a user submits a wrong solution as the last, the users other submissions can still be seen in the list of all submissions.)

For an assignment an overview of all hand-ins will also be available (see Overview of Hand-ins for more details). Assignment exercises also support plagiarism detection, see Plagiarism.

Creating an Assignment

An assignment have the following properties.

The name of the assignment.
Visible From
The date and time from which the assignment will be visible for the users.
Due Date
The due date for the assignment.
Time Limit
The assignment can have a time limit, which will be the amount of time the users have to solve the exercises. The time starts when the user 'opens' the assignment, and only then will the exercises be available. After the time has passed the user will not be able to submit solutions anymore.
Post Submissions
Selects whether or not the users can submit solutions after the due date (or time limit has passed). These submissions will not count as handed in, but can be used after feedback has been given to try and correct possible mistakes.
Selects whether or not group hand in is allowd. NOTE: groups are not supported for time limited assignments at the moment.
Allow Comments
Selects whether or not the users can write a comment on the assignment, which can be seen with their hand-in.
Visible to Authors
Selects whether or not the assignment is visible to course authors before the "Visible From" date.
A description of the overall assignment. Each exercise still has their own description.

The exercises of an assignment are created exactly as training exercises, see exercise.

For assignments we recommend to always have a test group called "Sample Tests" (or similar) consisting of a few small test cases, with full feedback, and then have another test group with all the hard tests, which is either invisible or has no feedback, depending on what suits the course best. The sample tests will help the users correcting very stupid mistakes in their handed in solution, but they will still not know if the solution is completely correct.

Overview of Hand-ins

For assignments a complete overview of all hand-ins to the assignment can be seen. Here all users/groups are listed, and for each group/user it can be seen what exercises they have solved or attempted. The submissions of a hand-in will be available by selecting the user/group. Here a comment from the user/group can also be seen (if they have written one), and feedback can be given to them.


After the users have handed in, a plagiarism report can be generated per exercise of the assignment. The plagiarism check compares the solutions two by two, and find identical sequences (variable names are all considered identical and white spaces are ignored), all solutions are then ranked by the amount of code that is identical to another solution. An overview of all solutions' plagiarism score for the exercise will then be available. Each plagiarism score can then be opened to exactly what code is identical between the compared solutions.