-
Bug
-
Resolution: Fixed
-
Minor
-
2.1.5
-
MOODLE_21_STABLE
-
MOODLE_24_STABLE
-
A number of bugs have arisen recently with course completion and some of these have highlighted issues with the 'deleted' column in several of the tables:
- course_completion_crit_compl
- course_completions
These tables have deleted columns which were added in 2be4d090c0c0b5d09aa6140e9348fb65d20263d6 as part of MDL-2631.
These fields are referenced in the class definition of:
- completion_completion: 'Set to 1 if this record has been deleted'; and
- completion_criteria_completion: 'Course deleted flag'.
However they're never actually set anywhere.
These class's fetch functions also appear to be add a check to only return rows where the deleted column is null.
I propose that these columns are either:
- removed and all references to them removed; or
- utilised and the data_object delete() function overridden by those classes to update the column instead of delete the row.
My gut says that we should be doing the latter to allow the potential for restoration of inadvertently deleted data but I'm not sure whether this is realistic in practice.
I don't know enough about the requirements of this side of the code - perhaps someone from Catalyst as the original contributors of the code could shed some light?
- has been marked as being related by
-
CONTRIB-4048 Deleted field "deleted" causing issues in 2.4 (but working fine in 2.3) by lib\dml code
-
- Closed
-