CodeRunner

Question types ::: qtype_coderunner
Maintained by Richard Lobb, TimTim 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 5.7.1+

Moodle 4.3, 4.4, 4.5, 5.0
Released: Monday, 26 May 2025, 3:47 PM

CodeRunner

Version: 5.7.1+ May 26, 2025. Requires MOODLE V4.3 or later + PHP >=8.1. Earlier versions of Moodle must use CodeRunner V4.

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

For full documentation of this plugin, see here.

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.

Release Notes Version 5.7.1+ May 26, 2025.

This update is mainly relevant only to people attempting to use CodeRunner on Moodle 5.0. However, the caveat from the previous release notes (see below) still applies: WARNING: Moodle 5.0 functionality should be regarded as alpha-level only. It has not been tested in a full production environment.

New feature

  • The Unsupported question types folder now includes "C program with scanf echoing of stdin plus scratchpad."

Bug fixes:

  • With Moodle 5.0, questions using prototypes that were not in the Front Page question bank were working for teachers but not students.
  • The layout of Scratchpad expand/collapse button for Scratchpad UI was broken in Moodle 5.0.
  • The Help icon for Scratchpad UI was not working in Moodle 5.0.
  • The test suite was reporting errors in the signature of the onnotsuccessfultest function.

Release Notes Version 5.7.0 May 5, 2025.

New features

  • #249 The plugin now implements the API changes made necessary by the fix for MDL-83541. Without this update to CodeRunner, any site that has installed the MDL-83541 fix (e.g. Moodle 4.5.3+) will have found that all CodeRunner questions in the question bank were duplicated whenever any quiz was duplicated or a course was restored onto the same server on which the original copy still resided.
  • Functionality to support Moodle 5.0 added. WARNING: Moodle 5.0 functionality should be regarded as alpha-level only. It has not been tested in a full production environment.
  • Twig has been updated to the latest version.
  • Various enhancements to the bulk tester, including the ability to purge the grade cache prior to testing.
  • Various enhancements to the Jobe grade cache functionality.
  • Updates and additions to the Unsupported question types.
  • The Scratchpad Run button has been made much more distinctive to reduce the likelikhood of confusing it with the Check button.

Bug fixes

  • The copy-got-to-expected buttons displayed on question validation failures were either not available at all when using combinator template graders or did not work with them when the ordering of test cases was changed from the default.
  • The downloadquizattempts script was failing on systems with pgsql.
  • #244 Some test code was failing due to the misnaming of \Exception as just Exception in cache_purger.php.

Version information

Version build number
2025052100
Version release name
5.7.1+
Maturity
Stable version
MD5 Sum
9d8ddf0c86892c443ddadcd20e3de65c
Supported software
Moodle 4.3, Moodle 4.4, Moodle 4.5, Moodle 5.0
  • Latest release for Moodle 4.3
  • Latest release for Moodle 4.4
  • Latest release for Moodle 4.5
  • Latest release for Moodle 5.0

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS tag
v5.7.1+

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 http://yoursite.com/admin to finish the installation