CodeRunner icon

CodeRunner

Maintained by Tim Hunt, Richard Lobb
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.
Price option: Free

Supports Moodle 2.9-5.2 See all versions
Latest release: 1 month ago
Installations: 4170
Downloads (last 90 days): 1317

Frankenstyle name: qtype_coderunner
Question types

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Doing it again. I reverted to 3.8 backup and with coderunner already installed in 3.8 version i checked out the 3.9 stable branch of moodle. I then restarted the site and it asked to upgrade to 3.9 which I clicked on continue. After that it said:
[pluginname,qtype_coderunner]
/question/type/coderunner
2020012500 Additional Missing from disk!
Similar errors are there for many other plugins including Attendance etc. whiever were not supported for 3.9.
I clicked then on "Upgrade Moodle Database Now"
it stppoed at
Plugin "mod_attendance" is defective or outdated, can not continue, sorry.
More information about this error
×Debug info: Missing version.php
Error code: detectedbrokenplugin
×Stack trace:
line 750 of /lib/upgradelib.php: plugin_defective_exception thrown
line 565 of /lib/upgradelib.php: call to upgrade_plugins_modules()
line 1917 of /lib/upgradelib.php: call to upgrade_plugins()
line 711 of /admin/index.php: call to upgrade_noncore()
I removed attendance by removing its older and so on for every plugin including coderunner and then it installed fine.
Later when i try to reinstall coderunner i get the error I sent earlier.
I removed the coderunner and adaptive folders by moving them elsewhere. That is how I uninstalled. They was no other way. I did not edit anything in the database.
Can you clarify how you uninstalled coderunner, please? CodeRunner doesn't have an Uninstall button, so how did you do it?
I installed coderunner in Moodle 3.4.
I upgraded to 3.8 with no issues
However when I upgraded to 3.9 It showed coderunner along with several other plugins to be missing on disk errors and would not continue the installation. At that point of time i thought on uninstalling coderunner and later to reinstall. So I uninstalled coderunner and then the upgrade went fine. Later when I tried to reinstall, it gave that error.
I'd like to be able to replicate this problem. Earlier you said "I upgraded to 3.9 and then installed coderunner". But I have the impression you already had CodeRunner installed, as you were posting to the CodeRunner forum a year or two ago. That suggests you are not installing CodeRunner from scratch. However, if you are installing CodeRunner from scratch you must be getting it from github as the version in the Moodle plugin repository doesn't officially support Moodle 3.9.
Can you explain in some detail please:
1. What was your starting point? i.e. which version of Moodle did you have installed, what OS was it on, and what version of CodeRunner was installed within it (if any)?
2. What upgrade sequence did you follow to get to the above situation?
Again, same error:
Upgrading to new version
qtype_coderunner
Error writing to database
More information about this error
×Debug info: Table 'moodle.mdl_question_coderunner_options' doesn't exist
DELETE FROM mdl_question_coderunner_options WHERE questionid = ?
[array (
0 => '38844',
)]
Error code: dmlwriteexception
×Stack trace:
line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1686 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1977 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->delete_records_select()
line 67 of /question/type/coderunner/db/upgradelib.php: call to moodle_database->delete_records()
line 43 of /question/type/coderunner/db/upgradelib.php: call to delete_existing_prototypes()
line 342 of /question/type/coderunner/db/upgrade.php: call to update_question_types()
line 692 of /lib/upgradelib.php: call to xmldb_qtype_coderunner_upgrade()
line 1917 of /lib/upgradelib.php: call to upgrade_plugins()
line 711 of /admin/index.php: call to upgrade_noncore()
I did and table is missing. . I can go back to the backup by restoring to an older version though. I did not do any manual database changes. I only upgraded to 3.9. Probably the tables got deleted when I tried to make coderunner to work. It was not loading so I thought I will reinstall. At t hat point it probably removed the tables and then during reinstall it gave the above error.
That looks serious. The table mdl_question_coderunner_options seems not to be in the database. I've no idea how that could happen during any normal upgrade. There's no 'drop table' command anywhere in the CodeRunner plugin and I seriously doubt the Moodle upgrade would have deleted that table. Have you done any manual SQL operations on the database?
Before doing anything else, I suggest rebooting the server and listing all the moodle database tables to confirm that the table really is missing.
If that table is missing, all existing CodeRunner questions are irretrievably broken. Do you have a backup of your server? If so, I suggest going back to that backup and carefully repeating the upgrade instructions at https://docs.moodle.org/39/en/Upgrading
I upgraded to 3.9 and then installed coderunner. I am stuck at:
Upgrading to new version
qtype_coderunner
Error writing to database
More information about this error
×Debug info: Table 'moodle.mdl_question_coderunner_options' doesn't exist
DELETE FROM mdl_question_coderunner_options WHERE questionid = ?
[array (
0 => '38844',
)]
Error code: dmlwriteexception
Any help will be welcome
Hi Richard, Tim,
will you propose an update soon for Moodle 3.9 ?
Regards
OK: solved ! I put the developing level to "Developer" and got the error "Maximum execution time of 30 seconds exceeded". I made the necessary modification in php.ini and the installation ended properly. Thanks a lot ! smile
If you are getting a 500 error, there will be an error message. You may need to change Admin -> Development -> Debugging to show 'Developer' level error messages.
Hello Richard,
First of all, thanks a lot for your help.
1. At what stage in the update did the site break - i.e. what was the GUI action or shell command that led to that outcome?
When I go on the "Plugin overview "page, "Available update", I click on "Install this update". I then get the "Confirmation page" (Downloading qtype_coderunner ... OK Validating qtype_coderunner ... OK [Warning] Target location already exists and will be removed […] Validation successful, installation can continue). I click on "Continue" then … 500 error
2. What are the details associated with the 500 error? [You might need to check in the Apache error log, /etc/apache2/error.log on Linux, to find out.]
Well, strange but no message in log
3. Were you installing any other plugins or making any other changes to your site at this time?
I have a few plugins installed, but of course I update them one at a time
4. What OS is your Moodle site running?
Raspian buster (debian 10 for raspberry)
A precision (I found this morning): not all the site is broken. But the installation lead to an 500 error page
I'm not aware of any way that CodeRunner can break your site in this way, but I'll need to know more if I'm to help. For starters:
1. At what stage in the update did the site break - i.e. what was the GUI action or shell command that led to that outcome?
2. What are the details associated with the 500 error? [You might need to check in the Apache error log, /etc/apache2/error.log on Linux, to find out.]
3. Were you installing any other plugins or making any other changes to your site at this time?
4. What OS is your Moodle site running?
Hello everybody,
I had a version 3.6.1 of your plugin installed on a moodle v3.7. It was working well.
The system said there was an update to do but when I did so the update broke my site (error 500).
I tried to update moodle to 3.8 and try again to update the plugin : but there again same problem.
I wanted to desinstall then reinstall but there is no "button" to desinstall…
Can you help me ?