Thanks Rob. I should have turn on the debugging in the first place. This is what I got:
Debug info: Out of range value adjusted for column 'grade' at row 1
INSERT INTO mdl_oublog (name,summary,allowcomments,individual,maxvisibility,maxbytes,maxattachments,grade,course,completionposts,completioncomments,accesstoken) VALUES(?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => 'test',
1 => '<p>dasjklsdafjkl;</p>',
2 => '1',
3 => '0',
4 => '100',
5 => '52428800',
6 => '9',
7 => '-15',
8 => '389',
9 => 0,
10 => 0,
11 => '106ead6bc3d37e425ccd5c1509191bda',
)]
Stack trace:
- line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
- line 893 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 935 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
- line 31 of /mod/oublog/lib.php: call to mysqli_native_moodle_database->insert_record()
- line 443 of /course/modedit.php: call to oublog_add_instance()