Project

General

Profile

Bug #8044

Session deletion doesn't delete session-specific resources from DB

Added by Yannick Warnier almost 4 years ago. Updated almost 4 years ago.

Status:
Bug resolved
Priority:
High
Assignee:
Category:
Sessions
Target version:
Start date:
12/01/2016
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

When deleting a session, it doesn't delete documents that are session-specific.
  • 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).


Files

files.png (72.3 KB) files.png Yannick Warnier, 03/03/2016 22:03

Associated revisions

Revision e4f33554 (diff)
Added by jmontoyaa almost 4 years ago

Delete documents inside a session see #8044

Revision 961375ba (diff)
Added by Julio Montoya almost 4 years ago

Delete c_document and c_item_propery see #8044

History

#1

Updated by Julio Montoya almost 4 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Julio Montoya to Yannick Warnier
#2

Updated by Yannick Warnier almost 4 years ago

  • Status changed from Needs more info to Needs testing
  • % Done changed from 0 to 80
#3

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...!?

#4

Updated by Julio Montoya almost 4 years ago

I added a correction

#5

Updated by Yannick Warnier almost 4 years ago

  • Status changed from Assigned to Needs testing
  • Assignee changed from Julio Montoya to Yannick Warnier
#6

Updated by Yannick Warnier almost 4 years ago

  • Status changed from Needs testing to Bug resolved
  • Assignee changed from Yannick Warnier to Julio Montoya
  • % Done changed from 70 to 100

Tested and approved, although I might not have tested all the possibilities...

Also available in: Atom PDF