Hello
1. When I try to add a file (1.docx for example) to a course by dragging with the mouse (drag and drop) I get an error
2. But when I add the same file through the menu Add an activity or resource - its ok, file adding
In first case I get error in PHP:
[19-Jul-2022 16:27:59 Europe/Kiev] Default exception handler: Error writing to the database Debug: Field 'idnumber' doesn't have a default value
INSERT INTO mdl_course_modules (section,visible,course,module,groupmode,groupingid,instance,completion,completionview,added) VALUES(?,?,?,?,?,?,?,?,?,?)
[array (
0 => 1,
1 => '1',
2 => '2651',
3 => '17',
4 => '0',
5 => '0',
6 => 0,
7 => 1,
8 => 1,
9 => 1658237279,
)]
Error code: dmlwriteexception
* line 489 of \lib\dml\moodle_database.php: dml_write_exception thrown
* line 1357 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1403 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
* line 692 of \course\lib.php: call to mysqli_native_moodle_database->insert_record()
* line 567 of \course\dnduploadlib.php: call to add_course_module()
* line 504 of \course\dnduploadlib.php: call to dndupload_ajax_processor->create_course_module()
* line 476 of \course\dnduploadlib.php: call to dndupload_ajax_processor->handle_file_upload()
* line 41 of \course\dndupload.php: call to dndupload_ajax_processor->process()
Has anyone encountered such a problem?
Can it be solved somehow?
This issue has been observed from version to version of Moodle. The update didn't help.
The current version of Moodle is 3.11.2+ (Build: 20210827)