Mangle key to orphan data - #35
Conversation
To fix the buggy behavior reported in TNL-3880, we need to ensure that the submission we're dropping is unlinked from the student_item used to find it. This prevents code (say, an ORA staff tool) from constructing a student item with an id, a course, and a problem, and using that to find a "cleared" submission.
|
Initial testing looks good on my devstack |
c7d3a9d to
049a92d
Compare
|
Updated to append @robrap is out today, but FYI Robert if you could take a look and weigh in here we'd appreciate it. The problem that needs to be solved is:
The 3 options I've investigated are:
I personally think the mangling option addresses our problems most cleanly, but I'm curious what others think. |
e6c738d to
6b6c99c
Compare
|
Do we know if this will still work for analytics though? When the submissions are fetched for download, I am concerned that these will not be included because the item_id does not match. Can you confirm if it will work? |
|
I'll leave the actual yes/no call to @mulby, but my thinking was that it should be possible to, when exporting data from the SQL tables, do a bit of processing to match any "mangled" |
|
@efischer19 another option is to move the records to an archive table when they are deleted. Something like "submissions_studentitem_deleted". I'll follow up with an email to the data layer working group. |
|
It sounds like there may be some precedent in the ORA code to implement a "tombstone" record combined with an append-only history. This would also work well for analytics. Not sure how feasible it is to implement in this area of the code, however, I'll leave that decision up to you and @ormsbee |
Potentially supersedes #34, still testing it out
Sibling changes: