While restoring a course an error occurs (it is written into error log):
[Tue Dec 19 09:19:41 2006] [error] [client *****] SQL Unknown column 'positionkey' in 'where clause' in /var/moodle/lib/datalib.php on line 579. STATEMENT: SELECT * FROM mdl_question_multianswer WHERE question = '376' AND positionkey = '' LIMIT 1
It appears that the columnt positionkey has been removed from the DB as obsolete:
In /mod/quiz/db/mysql.php there is an upgrade to DB [ if ($success && $oldversion < 2005051401) ] which (among others) states (line 738):
$success = $success && modify_database('', 'ALTER TABLE `prefix_quiz_multianswers` DROP `positionkey`');
At the same time, file /question/type/multianswer/questiontype.php states (line 504) references the column
$db_multianswer = get_record ("question_multianswer","question",$new_question_id,
"positionkey",$multianswer->positionkey);
This obviously leads to an error in SQL. Don't know whether it affects question sessions.
It happens with backing up courses with or without user data.
- duplicates
-
MDL-5482 Restoring of user attempts in quiz module (attached solution)
-
- Closed
-