-
Bug
-
Resolution: Fixed
-
Major
-
1.7.2, 1.8.2, 1.9
-
None
-
any
-
Any
-
MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
-
MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Both assignment_submission->data1 and data2 are declared as NOT NULL.
This, obviously, means that, for each record, one meaningful value must be provided for both them. But it seems that, we are fulfilling them with:
1) empty values under normal grading (online assignments, for example).
2) NULL values under quick grading, because there is one insert where those fields are not set.
So, I will do one of this:
1) OR change both fields to nullable stopping them to default to empty where they are currently defaulting to empty.
2) OR leave both fields as not null, adding their empty values in the quick grading.
Final note: Only tested under 1.9 but I guess the same problem is there in older branches.
Sincerely, I think that, if the fields haven't a meaningful default and that, in fact, they can be empty, then 1) above is the correct solution and both fields should be redefined as NULLable.
Ciao