Skip to main content

Create a Programming Exercise

This page walks through the creation form section by section, in the order the sections appear on screen. Most settings can be changed later; the few that cannot are marked, because they determine how the repositories and build plans are set up.

If you already have a suitable exercise in another course, importing it is usually faster than starting from scratch.

Open the Create Dialog

Exercises in your course's management navigation opens the exercise list. Create, in the page header, opens the Manage Exercises dialog on its Create tab, with one card per exercise type. The Programming card — the card itself is the button — opens the creation form.

Manage Exercises dialog listing the exercise types
Choosing what to create

The same dialog also has Import and Export tabs, which is where importing an exercise starts.

Simple and Advanced Mode

The creation form opens in simple mode, which shows only the settings a basic exercise needs. Everything else is hidden until you switch modes. This is the most common reason a setting described below cannot be found on screen.

The Switch to advanced mode button sits in the footer at the bottom of the form, on the left, with the Generate button at the opposite end. Your choice is remembered in the browser, so the form opens in whichever mode you used last, and values you set in advanced mode are kept when you switch back.

The table below lists which settings each mode shows.

Form sectionSimple modeAdvanced mode adds
GeneralTitle, Categories, DifficultyShort Name, Channel Name, Auxiliary Repositories, Checkout Paths
ModeParticipation Mode, Team Size, Allow Offline IDE, Allow Online Editor, Allow Online IDE
LanguageProgramming Language, Package NameProject Type, Exemplary Dependency, Static Code Analysis, Sequential Test Runs, Build Plan
Version ControlAllow Custom Branches, Branch Name Pattern
ProblemProblem StatementLinked Competencies
GradingScore inclusion, Points, Bonus Points, Release Date, Due Date, Assessment Due Date, Grading InstructionsSubmission Policy, Start Date, Run Tests after Due Date, Example Solution Publication Date, Complaints on Automatic Assessment, Show Test Names, Include Tests in Example Solution, Presentation Score, Plagiarism Control

Difficulty is the one setting that moves rather than appears: simple mode shows it in General, because Mode is hidden there, and advanced mode shows it in Mode.

General

General section of the programming exercise form
General

Naming

  • Title: The title of the exercise, shown to students. Can be changed after creation.
  • Short Name: Combined with the course short name, this identifies the exercise across Artemis, including its repository and build plan names. Cannot be changed after creation.
  • Channel Name: The communication channel created for this exercise, if the course has messaging enabled.
  • Preview: Shows the names of the repositories that will be created. With Integrated Code Lifecycle it also shows the directories each repository is checked out into during a build; with Jenkins it shows the build plan names instead.

Categories

Define up to three categories per exercise. Categories are visible to students, so use them consistently to group related exercises.

Auxiliary Repositories

Auxiliary repositories are additional repositories beyond the template, solution and test repositories. Each one has a name, a checkout directory and a description. You can add, edit and remove them after the exercise exists as well — Artemis creates or deletes the corresponding Git repository when you save.

If a checkout directory is set, the repository is checked out there during every build, which is how you provide extra resources to the tests or overwrite parts of the template.

Mode

Shown in advanced mode only; in simple mode Difficulty sits in General instead and the rest takes its defaults.

Mode section of the programming exercise form
Mode
  • Difficulty: Indicates to students how hard the exercise is.
  • Participation Mode: Whether students work individually or in teams. Cannot be changed after creation. See team exercises.
  • Team Size: For team mode, the recommended team size. Instructors and tutors define the actual teams after the exercise exists.

Three settings control how students can work on the exercise:

  • Allow Offline IDE: Students download the exercise via Git and work locally in their preferred IDE.
  • Allow Online Editor: The Artemis online code editor, with a file explorer, editor and syntax highlighting, but no ability to compile or run code.
  • Allow Online IDE: An online coding environment based on Visual Studio Code, pre-configured for the exercise's language, which can compile and run code.

Language

Language section of the programming exercise form
Language
  • Programming Language: Determines which template Artemis uses. See supported languages.
  • Project Type: The project structure of the template, for example Gradle or Maven for Java. Not available for every language.
  • With exemplary dependency: Java only. Adds an external Apache Commons Lang dependency as an example of using a third-party library.
  • Package Name: The package structure students must use. Not available for every language.
  • Enable Static Code Analysis: Adds automated code quality checks to the build. Cannot be changed after creation. See Configure Static Code Analysis.
  • Sequential Test Runs: Runs structural tests before behavioral ones. Not compatible with static code analysis. Cannot be changed after creation.
  • Build plan: Artemis creates a default build plan for the exercise. You adapt it after creation on the dedicated build plan editor page, see Adapt Build Phases. Only available with Integrated Code Lifecycle; Jenkins exercises use their own build plan configuration.

Version Control

Shown in advanced mode only.

Version Control section of the programming exercise form
Version Control
  • Allow Custom Branches: Lets students push to branches other than the default one.
  • Regular Expression for branch name: Custom branch names are matched against this Java regular expression, and a push is only allowed if it matches.

Problem

Problem section of the programming exercise form
Problem

The problem statement is the exercise description students read. It is written in Markdown and supports interactive tasks that report which tests currently pass. Writing it is covered in Write the Interactive Problem Statement.

You do not have to finish it now — the problem statement can be edited at any time, including in the online code editor next to the code.

In advanced mode this section also offers Linked Competencies, which connect the exercise to the course's competencies for adaptive learning.

Grading

Grading section of the programming exercise form
Grading

Should this exercise be included in the course or exam score calculation?

  • Yes: The exercise counts toward the score. Define Points and optionally Bonus points.
  • Bonus: The achieved points count as bonus only.
  • No: The achieved points do not count toward the score.

Max Static Code Analysis Penalty appears when static code analysis is enabled. It caps how much of the exercise's points can be lost to code quality issues, as a percentage. With 10 points and a maximum penalty of 20%, at most 2 points can be deducted. Empty means 100%.

Submission Policy

Shown in advanced mode only. A submission policy limits or penalizes repeated submissions:

  • None: Unlimited submissions.
  • Lock Repository: After a fixed number of submissions, the repository is locked.
  • Submission Penalty: Unlimited submissions, but points are deducted for each submission beyond the limit.

The policy chosen here is the initial one. Changing it later happens on the grading page — see Submission Policy Configuration.

Timeline

  • Release Date: When the exercise becomes visible to students.
  • Start Date: When students can begin participating. If unset, they can start as soon as the exercise is released. Advanced mode only.
  • Due Date: The submission deadline. Commits after it are not graded.
  • Run Tests after Due Date: Rebuilds each student's last in-time submission at this date, which is how hidden tests are executed. Must be after the due date. Advanced mode only.
  • Enable manual assessment: Off by default, so the exercise is graded automatically from the test results. Switch it on to have tutors review submissions afterward. It can only be set once the exercise has a due date.
  • Assessment Due Date: The deadline for manual reviews. All assessments are released to students at once on this date.
  • Example Solution Publication Date: When the solution repository becomes available to students. Blank means never. Advanced mode only.

Assessment Options

Shown in advanced mode only.

  • Complaint on Automatic Assessment: Lets students complain about an automatic assessment after the due date. Requires complaints to be enabled for the course, or an exam exercise.
  • Show Test Names to Students: Shows the names of automated test cases. With this off, students cannot tell automatic feedback from manual feedback.
  • Include tests into example solution: Ships the test cases with the example solution so students can run them locally.
  • Presentation Score: Counts the exercise toward the course's presentation score, if the course uses one.
  • Plagiarism Control: Configures the plagiarism check for this exercise. Not available for exam exercises.

Grading Instructions

Available with Manual Assessment. Structured criteria that tutors apply while assessing, and that can be dragged onto feedback in the online editor.

Generate the Exercise

Generate, in the form's footer, creates the exercise. If anything is still missing the button is disabled and the footer lists what needs fixing.

The exercise then appears on the course's exercise list.

Course exercise list with the new programming exercise
The exercise on the course's exercise list

Artemis creates three repositories:

  • Template: The code every student starts from. May be empty.
  • Test: The test cases and, if enabled, the static code analysis configuration. Never visible to students.
  • Solution: A working solution, hidden from students unless you publish it.

Artemis also builds the template and the solution against the tests straight away. The solution build is what registers the test cases and proves the exercise is solvable; the template build should score zero.

With Jenkins these are two real build plans, Template (BASE) and Solution (SOLUTION), and student build plans are copied from the template one. With Integrated Code Lifecycle there are no build plans to copy — Artemis runs each build from the exercise's build configuration instead.

The next step is writing the exercise code and tests.

Import an Existing Exercise

Importing copies the repositories, build plans, problem statement and grading configuration from an existing exercise, so you only adjust what differs.

  1. Open Exercises in your course.

  2. Import, in the page header, opens the Manage Exercises dialog on its Import tab; the Programming card leads to the list of exercises you can copy.

    Dialog listing the programming exercises available to import
    Choosing an exercise to import
  3. Adjust the settings. All of them are shown, regardless of the mode you last used.

    Import options with the settings the copy can change
    Import options

    Recreate Build Plans creates fresh build plans instead of copying the originals. Artemis sets it automatically when the static code analysis setting differs from the imported exercise, because that option can only change when the build plans are rebuilt. The plugins, dependencies and tool configurations are then added, removed or copied to match.

  4. Import, at the end of the form, finishes the copy.

Edit Several Exercises at Once

On the Exercises page, select the exercises you want to change and click Edit selected. This is the quickest way to shift dates for a whole set of exercises, for example when a course is repeated in a later semester.

Search documentation