-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
2.2.2
-
None
-
MOODLE_22_STABLE
When marking work via the block, the following error occurs on save:
Debug info: SQLState: 23000<br>
Error Code: 515<br>
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert the value NULL into column 'grade', table 'moodle_DB.dbo.mdl_assignment_submissions'; column does not allow nulls. UPDATE fails.<br>
SQLState: 01000<br>
Error Code: 3621<br>
Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The statement has been terminated.<br>
UPDATE mdl_assignment_submissions SET assignment = '7',userid = '225',timecreated = '1334839267',timemodified = '1334839267',numfiles = '1',grade = NULL,submissioncomment = N'<p>To be marked. [TEST]</p>',format = '0',teacher = '6',timemarked = '1335093153',mailed = '0' WHERE id = '871'
[array (
0 => '7',
1 => '225',
2 => '1334839267',
3 => '1334839267',
4 => '1',
5 => NULL,
6 => '<p>To be marked. [TEST]</p>',
7 => 0,
8 => '6',
9 => 1335093153,
10 => 0,
11 => '871',
)]
Stack trace:
line 397 of \lib\dml\moodle_database.php: dml_write_exception thrown
line 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
line 368 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
line 1024 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
line 1056 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->update_record_raw()
line 364 of \blocks\ajax_marking\modules\assignment\block_ajax_marking_assignment.class.php: call to sqlsrv_native_moodle_database->update_record()
line 84 of \blocks\ajax_marking\actions\grading_popup.php: call to block_ajax_marking_assignment->process_data()