Question types: CodeRunner

Maintained by Picture of Richard LobbRichard Lobb, Tim at Lone Pine Koala SanctuaryTim Hunt
A question type that allows question authors to set programming questions in which the student answer is code in some programming language, which is graded by running it. More generally it can handle any question to which the answer is text that can be graded by a computer program written by the question author.

CodeRunner 3.3.0

Release notes


Version: 3.3.0 February 2018

Authors: Richard Lobb, University of Canterbury, New Zealand. Tim Hunt, The Open University, UK

New features in V3.3:

  • A graph question type that allows you to set questions to which the answer is a graph that the student can draw directly into the answer box. This supports FSMs, directed graphs and undirected graphs. See below for a screenshot. Thanks to Emily Price (UCan) for the initial prototype version of this.
  • A multilanguage question type that provides "Write a program" questions that the student can answer in C, C++, Java or Python3. Other languages could be added if required.
  • An SQL question type that allows you to set questions that require SQL answers (but restricted to the sqlite3 dialect). Thanks to Trent Lewis (Monash Uni).
  • Programs can now output non-ASCII UTF-8 characters. However, this only works with the latest version of Jobe (version 1.4.0) and if the Apache LANG environment variable is set to a UTF-8 locale. See the Jobe installation instructions for details.
  • A question can be customised to use a different Jobe sandbox from normal, allowing for load balancing and specialist Jobe servers e.g. for a language not supported by the production Jobe server.
  • The question authoring UI now allows one-click correction of test cases that fail during "Validate on save" (assuming the sample answer is correct - caveat emptor). Thanks Andrei Bautu (Trier Uni).
  • PHP and Python scripts are now available to download and analyse all submissions to a quiz, rather than just the final one by each student.
  • Various bug fixes.

As part of the refactoring required to support pluggable user interfaces the capability of explicitly setting the width of the answer box has been removed. The answer box now expands to fit the available space. Only the height (num_rows) can be set by the author, and the student can increase the height if they wish (except with Microsoft browsers).

One known issue: course backups created with this version of CodeRunner cannot be restored on sites running earlier versions of CodeRunner - database errors will occur. CodeRunner must first be upgraded to the latest version before the course restore is attempted.

Moodle 3.0, 3.1, 3.2, 3.3, 3.4

Version information

Version build number
Version release name
Stable version
MD5 Sum
Supported software
Moodle 3.0, Moodle 3.1, Moodle 3.2, Moodle 3.3, Moodle 3.4

Version control information

Version control system (VCS)
VCS repository URL
VCS tag

Default installation instructions for plugins of the type Question types

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "myquestiontype") in the "question/type" subdirectory.
  4. Visit to finish the installation