Print this chapterPrint this chapter

CodeRunner Documentation (V2.4.2)

2.1 Upgrading from an earlier version

CodeRunner version 2.4 uses different database table names from earlier versions and some of the column names have been changed too. The script upgrade.php will make these changes for you, and the code for importing questions and restoring courses has been extended to handle legacy-format exports. All the same, because the database is being significantly altered it is recommended that:

  1. You do not attempt such an upgrade during term time.

  2. You make a complete backup of your existing server's database before attempting the upgrade so that you can, if necessary, revert to the previous version of the code.

  3. You do a full backup of any existing courses that use CodeRunner questions before starting the upgrade.

  4. You export all your CodeRunner questions from the question database in Moodle XML format.

Also, please feel free to contact the developer (richard.lobb@canterbury.ac.nz) either to discuss your upgrade beforehand or afterwards if any problems occur.

With all those caveats, upgrading from an earlier version should be as simple as a raw installation. Move the existing moodleHome/local/CodeRunner folder to a backup location, then just follow the instructions in the next section.

Note that all existing questions in the system CR_PROTOTYPES category with names containing the string PROTOTYPE_ are deleted by the installer, which then re-loads them from the file

local/CodeRunner/coderunner/db/questions-CR_PROTOTYPES.xml

Hence if you have developed your own question prototypes and placed them in the system CR_PROTOTYPES category you must export them in Moodle XML format before upgrading. You can if you wish place that exported file in the 'db' directory with a name ending in _PROTOTYPES.xml; they will then be automatically loaded by the installer. Alternatively you can import them at your leisure later on using the usual question-bank import function in the web interface.