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.7.2

Release notes


A plug in that allows teachers to set coding questions. For full documentation see here.

Version: 3.7.2 November 2019

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

NOTE: A few sample quizzes containing example CodeRunner questions are available at There's also a forum there, where you can post CodeRunner questions, such as requests for help if things go wrong, or are looking for ideas on how to write some unusual question type.

This release includes bug fixes for the new Attachments capability introduced in V3.6, including one that results in a debug message "Call to a member function get_files() on string".

New features:

  • A new globalextra field in the question author form allows authors of customised questions to define code that can, for example, be included in all test cases.

  • A new experimental "gap filler" UI allows question authors to provide students with code that has bits missing. Students enter the missing bits into html text input or text area fields. A demo of this capability will soon be made available on

  • System administrators can specify that the connection to Jobe should be via https rather than http, though it is over to them either to configure Jobe to accept https or to place Jobe behind a reverse proxy to terminate the SSL connection. [Thanks Eric Villard.]

  • The Table UI now has two new template parameters: table-row-labels to allow row labels as well as or instead of column headers and table_locked_cells to lock certain cells in a table to prevent students modifying them.

  • The Twig template engine has been updated to the most recent 1.n version.

Bug fixes:

  • A message "Call to a member function get_files() on string" was being logged if debugging was turned on.

  • If students attached files after submitting a question without attachments they got a runtime error.

  • Student file attachments didn't work in conjunction with author-supplied support files.

  • UI plugins such as TableUI that used template parameters broke if Twig code was used within the author form's template parameters field, e.g. for randomisation.

  • The nodejs prototype was broken.

Moodle 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7

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, Moodle 3.5, Moodle 3.6, Moodle 3.7

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