С некоторыми курсами, Я получаю dmlwriteexception при попытке добавить задание или открыть зачетную книжку со следующей трассировки стека:Назначение и Gradebook ошибка
Debug info: Column 'grademax' cannot be null
INSERT INTO mdl_grade_items (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) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '206',
1 => NULL,
2 => NULL,
3 => 'course',
4 => NULL,
5 => '73',
6 => NULL,
7 => NULL,
8 => NULL,
9 => NULL,
10 => 1,
11 => NULL,
12 => 0,
13 => NULL,
14 => NULL,
15 => 0,
16 => 1,
17 => 0,
18 => 0,
19 => 0,
20 => 1,
21 => 0,
22 => NULL,
23 => 0,
24 => 0,
25 => 1,
26 => 0,
27 => 1474281854,
28 => 1474281854,
29 => 0,
)]
Error code: dmlwriteexception
×Stack trace:
· line 477 of /lib/dml/moodle_database.php: dml_write_exception thrown
· line 1172 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
· line 1218 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
· line 343 of /lib/grade/grade_object.php: call to mysqli_native_moodle_database->insert_record()
· line 472 of /lib/grade/grade_item.php: call to grade_object->insert()
· line 2259 of /lib/grade/grade_category.php: call to grade_item->insert()
· line 2230 of /lib/grade/grade_category.php: call to grade_category->get_grade_item()
· line 2447 of /lib/grade/grade_category.php: call to grade_category->load_grade_item()
· line 897 of /lib/gradelib.php: call to grade_category->is_course_category()
· line 850 of /course/moodleform_mod.php: call to grade_get_categories_menu()
· line 191 of /mod/assign/mod_form.php: call to moodleform_mod->standard_grading_coursemodule_elements()
· line 201 of /lib/formslib.php: call to mod_assign_mod_form->definition()
· line 95 of /course/moodleform_mod.php: call to moodleform->__construct()
· line 255 of /course/modedit.php: call to moodleform_mod->__construct()
×Output buffer: <br /> <b>Notice</b>: Undefined property: stdClass::$requiremodintro in <b>/var/www/html/moodle/course/moodleform_mod.php</b> on line <b>894</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$gradepointdefault in <b>/var/www/html/moodle/course/moodleform_mod.php</b> on line <b>814</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$gradepointdefault in <b>/var/www/html/moodle/lib/grade/grade_item.php</b> on line <b>270</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$gradepointdefault in <b>/var/www/html/moodle/lib/grade/grade_item.php</b> on line <b>270</b><br />
Это не происходит во всех курсах, и я использую Moodle 3.1 на CentOS.
Пожалуйста, как я могу исправить это?
Не уверен, но просто беспокоитесь о неопределенном свойстве, которое появляется в последней строке. Вы уверены, что это не проблема? – Rajesh
Это строка 894 этого файла: $ required = $ CFG-> requiremodintro; – BackPacker777