CodeRunner
Version: 5.9.2 May 10, 2026. Requires MOODLE V4.3 or later + PHP >=8.1. Earlier versions
of Moodle must use CodeRunner V4.
CodeRunner is a Moodle question type that allows teachers to run a program in
order to grade a student's answer. By far the most common use of CodeRunner is
in programming courses where students are asked to write program code to some
specification and that code is then graded by running it in a series of tests.
CodeRunner questions have also been used in other areas of computer science and
engineering to grade questions in which a program must be used to assess correctness.
Authors: Richard Lobb, University of Canterbury, New Zealand.
Paul McKeown, University of Canterbury, New Zealand.
Tim Hunt, The Open University, UK.
For full documentation, see https://trampgeek.github.io/moodle-qtype_coderunner/
NOTE: A few sample quizzes containing example CodeRunner questions
are available at coderunner.org.nz. 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.
Changes since V5.8.0
Fix issues #288, #289 to make CodeRunner Moodle 5.2 compatible (but also need new version of adaptive_adapted_for_coderunner behaviour).
Management scripts such as bulk tester, question browser etc now accessed via a new script <coderunner-base>/management.php.
New managements scripts added:
- Integrity check question bank and delete all old question versions, keeping only the most recent or any other in-use versions.
- Estimate time on task by each student over a given period of time or for a given activity.
- Plot student mark trajectory for a selected student, i.e. a plot of mark as a function of time-on-task for a given quiz. Useful only for quizzes with adaptive behaviour.
Bug fix: updating CodeRunner resulted in (hidden) orphaned system level prototypes, which should have been deleted
Some styling changes, e.g. to tables, for better Moodle 5.1 compatibility.
Bug fix: QUIZ parameter was not being passed to prototype when its template parameters were evaluated.
Bug fix: support files from one question could (rarely) be copied into another question if both were simultaneously open for edit and save-and-continue was licked on both in sequence.
Update GitHub CI testing to include PHP8.4 and Moodle 5.2.
Twig updated to version 3.19.0
Bug fix: Ace editor window resizing was failing when window width was reduced.