-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.8.2
-
None
-
RHEL5, PHP 5.1.6, Apache 2.2.3, Microsoft SQL Server 2005 SP2
-
Microsoft SQL
-
MOODLE_18_STABLE
Assignment module table assignment_submissions fields data1 and data2 are defined as not allowing null values with no default defined. When quick grading, a query like this is sent to the database if going from no grade to adding a grade entry to the table:
INSERT INTO mdl_assignment_submissions ( ASSIGNMENT, USERID, TIMECREATED, TIMEMODIFIED, NUMFILES, GRADE, SUBMISSIONCOMMENT, FORMAT, TEACHER, TIMEMARKED, MAILED ) VALUES ( 108, 109, 0, 0, 0, 14, '', 0, 109, 1184945275, 0 )
Notice that data1 and data2 are not included in the insert, so the insert fails as those fields do not accept NULL values and have no default defined. The result is a blank page.
I fixed this issue by commenting out lines 594 and 595 of mod/assignment/lib.php. These lines were added, according to the comments, because the data1 and data2 fields don't need to be updated. Is there any harm in updating them? Perhaps only avoid updating them when actually performing an update instead of an insert?
- has been marked as being related by
-
MDL-29181 Grades Entered with Quick Grading Not Saving
-
- Closed
-