Installing and upgrading help

Upgrade to 2.2.11 - coding error detected

Tim at Lone Pine Koala Sanctuary
Re: Upgrade to 2.2.11 - coding error detected
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

Well, you are right that normally all of this upgrade would run when you moved to Moodle 2.1.

Except that, it was a very big upgrade, and on large Moodle sites it took a huge amout of time.

Therefore we made a clever system that let you delay that bit of the upgrade until later. See So, it is possible to get to 2.1 without upgrading all the data. As it happens, I have just decided to add a check to Moodle 2.7 upgrade, so you can't upgrade to 2.7 if you never finished the upgrade. That lets us delete a lot of old code. smile

Anyway, the strange thing is, looking at your error message:

line 1112 of /mod/quiz/db/upgrade.php: call to question_engine_attempt_upgrader->convert_all_quiz_attempts()

That line 1112 is a bit of the quiz upgrade script that should have been executed as part of the upgrade to Moodle 2.1. I don't understand ...

Oh! here is a guess. Suppose that, during the upgrade to 2.1.2, the admin encoutered this error, and just chose to ingore it, so the quiz was never properly updated. Now that you are trying to upgrade to 2.2.x, it notices that this upgrade step was never run, and tries to do it now. I bet that is what happened.

Anyway, the real test is to look in the quiz_attempts table. Are there any rows there where needsupgradetonewqe is 1? If so, they should show up in qeupgradehelper, and you should be able to upgrade them from there, before you try to upgrade your site from 2.1 to 2.2.

But, that still does not explain why you are getting that error... unless you have bigger problem. Can you try on your Moodle 2.1 site, paying particular attention to the question_ and quiz_ tables.


Average of ratings: Useful (1)
Picture of Marc Wenger
Re: Upgrade to 2.2.11 - coding error detected

Would it make sense to spin up a new server, install the latest version of Moodle and migrate the old data towards the new one?  Can a migration of data from one version to another work?

Average of ratings: -