Welcome to Moodle CodeRunner
CodeRunner is a free open-source question-type plug-in for Moodle that can run program code submitted by students in answer to a wide range of programming questions in many different languages. It is intended primarily for use in computer programming
courses although it can be used to grade any question for which the answer is text. Experienced users can also present users with questions formatted in HTML with additional JavaScript; almost any sort of question can be accommodated using this facility (see the Html UI).
CodeRunner is normally used in Moodle's adaptive quiz mode; students paste in their code in answer to each programming question and get to see their test-case
results immediately. They can then correct their code and resubmit, typically for a small penalty.
For example:
CodeRunner is currently used on over 2600 registered Moodle sites worldwide, as shown in the following chart from the Moodle plugin repository:
Demo quizzes
To see how CodeRunner quizzes behave, try taking the Python3 demo quiz below. You'll be asked to register as a user on the site first, but this is painless and straightforward. Don't worry, we won't spam you as a consequence.
The Python quiz is recommended to give you a feel for CodeRunner's capabilities, even if you don't understand Python3; the questions could (for the most part) be written in any of the supported Languages (Python2, Python3, C, C++, Java, PHP, JavaScript, Octave).
The other quizzes shows a few simple C and Java questions, and demonstrate a few other features of CodeRunner such as SQL, the GraphUI and a Python3 'sandpit' that provides students with a question in which they can test out any code, including code that plots a graph using matplotlib.
CodeRunner Authors' Forum
A forum for exchange of question ideas and suggestions, bug-reports or anything else related to CodeRunner. Subscribe yourself to this forum if you wish to receive such news.
Documentation
There is lots of in-line documentation while authoring CodeRunner questions - just click the help icons (
).
The full documentation, required for any advanced CodeRunner question development, is in this github repository.
The Ace-inline Filter
The ace-inline filter is a new experimental Moodle plugin that works with CodeRunner versions 4.2.3 or later to allow teachers to embed executable code anywhere in Moodle content pages. The code is editable, using the Ace editor, and there is a Try it! button that allows students to run the code and observe its output.Click the link below to see a demo of the capabilities of this filter.The Python + Scratchpad question type
The following quiz demonstrates an in-house question type at the University of Canterbury, NZ, in which every question has a 'scratchpad' area in which the student can experiment with arbitrary Python code.