Session deletion doesn't delete session-specific resources from DB
- create a session (let's say session.id = 6)
- add a course to the session
- go to the session-course
- create a document (this one is specific to the session 6
- go to the list of sessions
- delete session 6
- the session is deleted but the document remains in c_document with a session_id = 6
This probably happens with all other resources that can be session-specific. It has to be fixed for all of them (deleting those resources).
I have added (today) a deletion of session-specific items in c_item_property because it generated a foreign key constraint error, but those records in c_item_property could probably be used to find the resources to be deleted. Otherwise use the code found in the course deletion process. There's probably an exhaustive list there.
The code should be added to the sessionmanager.lib.php::delete() function (before c_item_property deletion).
Updated by Julio Montoya almost 4 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yannick Warnier
Updated by Yannick Warnier almost 4 years ago
- File files.png files.png added
- Status changed from Needs testing to Assigned
- Assignee changed from Yannick Warnier to Julio Montoya
- % Done changed from 80 to 70
That's almost OK, but I have a weird effect here: there is still a /certificates folder that remains... See the last 5 lines of the database table: the /certificates folder appears once as deleted and then another one as not deleted but belonging to session 4 as well...!?