I've started to look into it and I have the main functionality working. But Moodle 4.0 has made a lot of major changes and it will be at least several weeks before a version of CodeRunner for Moodle 4.0 is officially released through the Moodle plugin repository. There will perhaps be a beta release on github in the development branch in a week or two if you want to be a beta tester?
Well that was very timely. I just this minute pushed to the development branch what I hope is a release candidate for Moodle 4.0. I've got all the test suite working and apart from some rough edges in the bulk tester I don't know of any bugs. But it hasn't been subjected to much in the way of user testing yet. I'd be thrilled if you'd check it out on your system. Many thanks for offering.
I had problems updating to Moodle 4.0 on my shared hosting (not because of coderunner). Probably I will have to switch to another server.
I tried Moodle 4 with coderunner (development branch) on the server where I am running jobe. Because I can't update my production site, I can't do massive testing yet. But first tests with some simple Java and Python questions did work.
Thank you very much for updating coderunner very quickly. It seems to work for me!
Guess Moodle 4.0 has to wait a little bit for me. Not all plugins I use work already, and moving to another server will be more work than I hoped I have to invest to update...
Many thanks for checking it out Thomas. I can't really do massive testing with Moodle 4 either. We're certainly not upgrading our production servers in the middle of the semester. We will consider upgrading for semester 2 which starts in early July, though I'm a little nervous even there. Not so much because of CodeRunner but because Moodle 4 is still very new and while it has lots of exciting features I suspect it still hasa few rough edges. I failed to import a course into it the other day and I don't think the problems were CodeRunner related though I need to more closely.
I just want to give feedback:
I spent a little bit of time setting up a new Moodle 4.0 site since upgrading did not work with the webspace I used.
Moodle 4.0 is now my production site. I use it only with few students, but until now every coderunner test (Java and Python) they had to do, did work!!!
I've released a 4.0-compatible CodeRunner plugin in the Moodle plugins directory. I'm calling it a Release Candidate rather than Stable as we're not yet running Moodle 4.0 in our institution and so I haven't tested under typical student load. All normal tests pass, however. When some institutions report back (here, for example) that the plugin has been in production use for some weeks without any significant issues I'll upgrade it to Stable.
The IT department plans to switch the main University Moodle server to Moodle 4 for the start of the 2023 academic year: February 2023. We aim to switch our departmental server, which runs the biggest CodeRunner courses, to Moodle 4.0 for the summer school this year, which starts late November.
Getting following errors on upgrading coderunner in Moodle. 4.0
Upgrade of coderunner is failing with this error:
Upgrading to new version
Error reading from database
More information about this error
Debug info: Unknown column 'q.category' in 'on clause'
FROM mdl_question q JOIN mdl_question_categories cats
ON q.category = cats.id
AND q.name LIKE '%PROTOTYPE_%'
0 => 1,
Error code: dmlreadexception
line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 65 of /question/type/coderunner/db/upgradelib.php: call to mysqli_native_moodle_database->get_records_sql()
line 43 of /question/type/coderunner/db/upgradelib.php: call to delete_existing_prototypes()
line 437 of /question/type/coderunner/db/upgrade.php: call to update_question_types()
line 709 of /lib/upgradelib.php: call to xmldb_qtype_coderunner_upgrade()
line 1935 of /lib/upgradelib.php: call to upgrade_plugins()
line 719 of /admin/index.php: call to upgrade_noncore()
Your version of CodeRunner is 2022022300, but this is not compatible with Moodle 4. There is not yet an official release of CodeRunner for Moodle 4, but the development branch on github (https://github.com/trampgeek/moodle-qtype_coderunner/tree/development) is a release candidate that works for at least a couple of other users (see above). Please try this, and report back to say if you have any problems or not.
I installed Moodle4 on a new server.
Backed up course from the old one with Moodle3 and restore on the new with 4.
Then I installed coderunner. It did not work, because it was version fh Moodle3. I reinstalled the correct version.
And now when I open question or test with it I get a lot error lines like this
Notice: Undefined property: stdClass::$coderunnertype in /var/www/html/moodle/question/type/questiontypebase.php on line 1015
Notice: Undefined property: stdClass::$prototypetype in /var/www/html/moodle/question/type/questiontypebase.php on line 1015
Notice: Undefined property: stdClass::$allornothing in /var/www/html/moodle/question/type/questiontypebase.php on line 1015
The problem here is the order in which things happened. It's not related to the version of Moodle or the plugin.
Every question type has its own code for backing up and restoring its questions. This includes copying all the question-specific info to the question type's own database table(s).
It seems you did a course restore onto a Moodle system that didn't have CodeRunner installed. So the question-specific processing didn't take place and all the extra info was lost. The only way to recover is to go back to the course backup and repeat the restore.
Note that this is true of all plugins: you need to install any required plugins before restoring a course that requires them. The system should have warned you it couldn't properly restore the course, but the severity of the warning is perhaps somewhat understated.
I have got same problem with moodle 4. I read https://github.com/trampgeek/moodle-qtype_coderunner :
"You can then 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."
and I think i need to be an admnistrator on my web server to install coderunner from git; I 'm not an administrator so How can i install coderunner plugins?
OK I understood administrator mean -> moodle administrator.
Now I choose wrong plugin it was a bad idea. When I update my database erros occured. To end this loop I downloaded https://github.com/trampgeek/moodle-qtype_coderunner/tree/development in a zip file and unzip it in moodle/question/type/coderunner and update database and now ereything is fined.
Sorry for the question