When creating a cloze question with a MC question type I get a dml write exception.
I'm using Moodle 2.1+ (Build: 20110713) with Mysql
Are other people having this problem?
Question:
Q1 {1:MC:~bad~=good}
Debug info: Incorrect integer value: 'b' for column 'answerformat' at row 1
UPDATE mdl_question_answers SET question = ?,answer = ?,feedback = ?,answerformat = ?,fraction = ?,feedbackformat = ? WHERE id=?
[array (
0 => 47097,
1 => 'b',
2 => '',
3 => 'b',
4 => '0',
5 => '1',
6 => 60942,
)]
UPDATE mdl_question_answers SET question = ?,answer = ?,feedback = ?,answerformat = ?,fraction = ?,feedbackformat = ? WHERE id=?
[array (
0 => 47097,
1 => 'b',
2 => '',
3 => 'b',
4 => '0',
5 => '1',
6 => 60942,
)]
Stack trace:
- line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 984 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 1016 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
- line 92 of /question/type/multichoice/questiontype.php: call to mysqli_native_moodle_database->update_record()
- line 424 of /question/type/questiontypebase.php: call to qtype_multichoice->save_question_options()
- line 139 of /question/type/multianswer/questiontype.php: call to question_type->save_question()
- line 424 of /question/type/questiontypebase.php: call to qtype_multianswer->save_question_options()
- line 181 of /question/type/multianswer/questiontype.php: call to question_type->save_question()
- line 264 of /question/question.php: call to qtype_multianswer->save_question()