Dzień dobry,
proszę o pomoc.
Podczas tworzenia aktywności typu zadanie, quiz, czy lekcja wywala błąd zapisu do bazy danych.
Poniżej zrzut debugowania:
Błąd zapisu do bazy danych
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '27273,sortorder = '6',display = '0',decimals = NULL,locked = '0',locktime = '0',' at line 1
UPDATE mdl_grade_items SET courseid = ?,categoryid = ?,itemname = ?,itemtype = ?,itemmodule = ?,iteminstance = ?,itemnumber = ?,iteminfo = ?,idnumber = ?,calculation = ?,gradetype = ?,grademax = ?,grademin = ?,scaleid = ?,outcomeid = ?,gradepass = ?,multfactor = ?,plusfactor = ?,aggregationcoef = ?,aggregationcoef2 = ?,sortorder = ?,display = ?,decimals = ?,locked = ?,locktime = ?,needsupdate = ?,weightoverride = ?,timecreated = ?,timemodified = ?,hidden = ? WHERE id=?
[array (
0 => '58',
1 => NULL,
2 => '',
3 => 'category',
4 => NULL,
5 => '459',
6 => NULL,
7 => '',
8 => '',
9 => NULL,
10 => '2',
11 => 6.0,
12 => 1.0,
13 => '7',
14 => NULL,
15 => '0.00000',
16 => 1.0,
17 => 0.0,
18 => 0.0,
19 => 0.27272999999999997,
20 => '6',
21 => '0',
22 => NULL,
23 => '0',
24 => '0',
25 => 1,
26 => '0',
27 => '1588828582',
28 => 1590314170,
29 => '0',
30 => '3661',
)]
Error code: dmlwriteexception
UPDATE mdl_grade_items SET courseid = ?,categoryid = ?,itemname = ?,itemtype = ?,itemmodule = ?,iteminstance = ?,itemnumber = ?,iteminfo = ?,idnumber = ?,calculation = ?,gradetype = ?,grademax = ?,grademin = ?,scaleid = ?,outcomeid = ?,gradepass = ?,multfactor = ?,plusfactor = ?,aggregationcoef = ?,aggregationcoef2 = ?,sortorder = ?,display = ?,decimals = ?,locked = ?,locktime = ?,needsupdate = ?,weightoverride = ?,timecreated = ?,timemodified = ?,hidden = ? WHERE id=?
[array (
0 => '58',
1 => NULL,
2 => '',
3 => 'category',
4 => NULL,
5 => '459',
6 => NULL,
7 => '',
8 => '',
9 => NULL,
10 => '2',
11 => 6.0,
12 => 1.0,
13 => '7',
14 => NULL,
15 => '0.00000',
16 => 1.0,
17 => 0.0,
18 => 0.0,
19 => 0.27272999999999997,
20 => '6',
21 => '0',
22 => NULL,
23 => '0',
24 => '0',
25 => 1,
26 => '0',
27 => '1588828582',
28 => 1590314170,
29 => '0',
30 => '3661',
)]
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 253 of /lib/grade/grade_object.php: call to mysqli_native_moodle_database->update_record()
- line 307 of /lib/grade/grade_item.php: call to grade_object->update()
- line 1743 of /lib/grade/grade_category.php: call to grade_item->update()
- line 453 of /lib/grade/grade_category.php: call to grade_category->auto_update_weights()
- line 1180 of /lib/gradelib.php: call to grade_category->pre_regrade_final_grades()
- line 378 of /course/modlib.php: call to grade_regrade_final_grades()
- line 180 of /course/modlib.php: call to edit_module_post_actions()
- line 154 of /course/modedit.php: call to add_moduleinfo()