Upgrade to 2.2.11 - coding error detected

Re: Upgrade to 2.2.11 - coding error detected

by Tim Hunt -
Number of replies: 1
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin 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 http://docs.moodle.org/21/en/Upgrading_to_Moodle_2.1#Planning_the_question_engine_upgrade. 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 http://docs.moodle.org/22/en/Verify_Database_Schema on your Moodle 2.1 site, paying particular attention to the question_ and quiz_ tables.

 

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: Upgrade to 2.2.11 - coding error detected

by Marc Wenger -

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?