Hi all,
Been ripping my hair out over this one, trying to upgrade our 1.9 install to 2.2. Upgraded to the latest build of 1.9 first. I've also tried going to 2.1 first instead of straight to 2.2. - same problem.
Obviously I'm not doing this on the production server :P Each time it falls over I revert back to its original state.
Most of the upgrade process seems to complete quite happily then it falls over when upgrading quiz attempts.
I've found a few other instances of people having the same problem but finding it hard to follow steps to resolve. I'm quite capable of navigating the database and modifying it where required but I'm not exactly a SQL whiz so not so great at writing queries etc.
The database is MySQL.
Any help is greatly appreciated, need to get this shifted to 2.2 as soon as.
Here's the error:
Error writing to database
INSERT INTO mdl_question_attempts (questionid,variant,behaviour,questionsummary,rightanswer,maxmark,minfraction,flagged,responsesummary,timemodified,questionusageid,slot) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '271',
1 => 1,
2 => 'adaptive',
3 => 'Look at the image below and then match the statements up correctly below {60% of heat is lost through the; 25% of the heat lost is through the; This could be used to prevent heat loss through the roof; This could be used to prevent heat loss through the windows; This process is when the gap between the walls in a house is filled with foam} -> {walls and roof; windows and doors; Loft insulation; Double glazing; Floor and doors; Pipe lagging; Chimney; Cavity wall insulation}',
4 => '60% of heat is lost through the -> walls and roof; 25% of the heat lost is through the -> windows and doors; This could be used to prevent heat loss through the roof -> Loft insulation; This could be used to prevent heat loss through the windows -> Double glazing; This process is when the gap between the walls in a house is filled with foam -> Cavity wall insulation',
5 => '1.0000000',
6 => 0,
7 => 0,
8 => 'This could be used to prevent heat loss through the windows -> Double glazing; This could be used to prevent heat loss through the roof -> Loft insulation; 60% of heat is lost through the -> walls and roof; 25% of the heat lost is through the -> Cavity wall insulation; This process is when the gap between the walls in a house is filled with foam -> Loft insulation',
9 => '1350500844',
10 => '3361',
11 => 1,
)]
- line 397 of \lib\dml\moodle_database.php: dml_write_exception thrown
- line 893 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 935 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
- line 299 of \question\engine\upgrade\upgradelib.php: call to mysqli_native_moodle_database->insert_record()
- line 253 of \question\engine\upgrade\upgradelib.php: call to question_engine_attempt_upgrader->insert_record()
- line 221 of \question\engine\upgrade\upgradelib.php: call to question_engine_attempt_upgrader->save_usage()
- line 176 of \question\engine\upgrade\upgradelib.php: call to question_engine_attempt_upgrader->convert_quiz_attempt()
- line 131 of \question\engine\upgrade\upgradelib.php: call to question_engine_attempt_upgrader->update_all_attempts_at_quiz()
- line 1112 of \mod\quiz\db\upgrade.php: call to question_engine_attempt_upgrader->convert_all_quiz_attempts()
- line 545 of \lib\upgradelib.php: call to xmldb_quiz_upgrade()
- line 271 of \lib\upgradelib.php: call to upgrade_plugins_modules()
- line 1461 of \lib\upgradelib.php: call to upgrade_plugins()
- line 317 of \admin\index.php: call to upgrade_noncore()