Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Question not working in MySql Community Version 8x #62

Open
SanatSharma opened this issue Jan 11, 2022 · 0 comments
Open

Adding Question not working in MySql Community Version 8x #62

SanatSharma opened this issue Jan 11, 2022 · 0 comments

Comments

@SanatSharma
Copy link

SanatSharma commented Jan 11, 2022

Get the following error when trying to add a question using the plugin. Using Mysql Community Server 8.0.23.

Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'grouping = NULL,reviewoptions = '{"after":{"attempt":"1","correctness":' at line 1
UPDATE mdl2_activequiz SET course = ?,name = ?,intro = ?,introformat = ?,graded = ?,scale = ?,grademethod = ?,workedingroups = ?,groupattendance = ?,grouping = ?,reviewoptions = ?,timecreated = ?,timemodified = ?,defaultquestiontime = ?,waitforquestiontime = ?,questionorder = ? WHERE id=?
[array (
0 => '1942',
1 => 'Active Quiz 1',
2 => '',
3 => '1',
4 => '1',
5 => '10',
6 => '1',
7 => '0',
8 => '0',
9 => NULL,
10 => '{"after":{"attempt":"1","correctness":"1","marks":"1","specificfeedback":"1","generalfeedback":"1","rightanswer":"1","manualcomment":"1"}}',
11 => '1641182024',
12 => '1641182024',
13 => '30',
14 => '5',
15 => 9,
16 => '3',
)]
Error code: dmlwriteexception
×Stack trace:
line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1561 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1593 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 166 of /mod/activequiz/classes/activequiz.php: call to mysqli_native_moodle_database->update_record()
line 445 of /mod/activequiz/classes/questionmanager.php: call to mod_activequiz\activequiz->saveRTQ()
line 473 of /mod/activequiz/classes/questionmanager.php: call to mod_activequiz\questionmanager->set_question_order()
line 154 of /mod/activequiz/classes/questionmanager.php: call to mod_activequiz\questionmanager->update_questionorder()
line 185 of /mod/activequiz/classes/controllers/edit.php: call to mod_activequiz\questionmanager->add_question()
line 39 of /mod/activequiz/edit.php: call to mod_activequiz\controllers\edit->handle_action()

Is there something I can do to fix?

@SanatSharma SanatSharma changed the title Adding Question not working in MariaDB Adding Question not working in MySql Community Version 8x Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant