Don't delete access information for deleted course materials
#10,006 opened on Nov 20, 2023
Repository metrics
- Stars
- (776 stars)
- PR merge metrics
- (PR metrics pending)
Description
What problem are you trying to solve with Submitty If an instructor uploads a course material, it is available on the site for some period fo time, and users access this course material, those accesses will be stored in the course_materials_access table. If the course material is later deleted, that id is removed from the course_materials table and also all accesses to that course_materials_id are removed from the course_materials_access table.
Describe the way you'd like to solve this problem Let's not delete the information from the access table. It is still relevant for student activity that they downloaded the file (and the instructor may want to know who accessed the now deleted file).
ADDITIONALLY, we should consider leaving the information about the deleted course material in the course_materials table. We can remove the file from the file system, but perhaps leave the row in the course_materials table... if necessary adding a column "deleted". This might be more involved, so perhaps this is a second PR.
NOTE: This is related to issue #10005