Print this chapterPrint this chapter

CodeRunner Documentation (V3.0.0)

2.2 Installing CodeRunner from scratch

To conform to Moodle standards, the CodeRunner question type is now in two different github repositories: github.com/trampgeek/moodle-qbehaviouradaptiveadaptedforcoderunner and github.com/trampgeek/moodle-qtype_coderunner. Install the question behaviour first (see the instructions within that repository), then the question type second.

To install the question type, either:

  1. Download the zip file of the required branch from github, unzip it into the directory moodle/question/type and change the name of the newly-created directory from moodle-qtype_coderunner-<branchname> to just coderunner.

  2. Get the code using git by running the following command in the top level folder of your Moodle install:

    git clone git://github.com/trampgeek/moodle-qtype_coderunner.git question/type/coderunner
    

Whichever of the two methods you used, you will also need to change the ownership and access rights to ensure the directory and its contents are readable by the webserver.

Having carried out one of the above methods, if you have local question prototypes to add to the built-in prototype set you should now copy them into the <moodlehome>/question/type/coderunner/db folder. They should be Moodle XML file(s) with names ending in _PROTOTYPES.xml (case-sensitive). [If you don't understand what this paragraph means, then it probably doesn't concern you ... move on.]

After carrying out one of the above install methods, you can complete the installation by logging onto the server through the web interface as an administrator and following the prompts to upgrade the database as appropriate.

In its initial configuration, CodeRunner is set to use a University of Canterbury Jobe server to run jobs. You are welcome to use this during initial testing, but it is not intended for production use. Authentication and authorisation on that server is via an API-key and the default API-key given with CodeRunner imposes a limit of 100 per hour over all clients using that key. If you decide that CodeRunner is useful to you, please set up your own Jobe sandbox as described in Sandbox configuration below. Alternatively, if you wish to continue to use our Jobe server, you can apply to the developer for your own API key, stating how long you will need to use the key and a reasonable upper bound on the number of jobs you will need to submit per hour. We will do our best to accommodate you if we have sufficient capacity.

WARNING: at least a couple of users have broken CodeRunner by duplicating the prototype questions in the System/CR_PROTOTYPES category. Do not touch those special questions until you have read this entire manual and are familiar with the inner workings of CodeRunner. Even then, you should proceed with caution. These prototypes are not for normal use - they are akin to base classes in a prototypal inheritance system like JavaScript's. If you duplicate a prototype question the question type will become unusable, as CodeRunner doesn't know which version of the prototype to use.