damithc / testrepo3

0 stars 0 forks source link

Remove orphan entiies when deleting an account #199

Open damithc opened 10 years ago

damithc commented 10 years ago

From arnold.k...@gmail.com on December 11, 2013 10:30:27

This is from one of the TODO in the code.

When an account is deleted courses, submissions, etc will be orphaned as there's no more users that can access it. They should instead be deleted together with the account when the account is deleted.

I think this is especially true when an instructor account is deleted. When a student account is deleted instructor might still want to see the student's submission but if the instructor is deleted, I assume all the courses he owns are now "useless" and all submissions for that course can be safely deleted along with the course and the instructor.

Correct me if this is not the case, though.

Original issue: http://code.google.com/p/teammatespes/issues/detail?id=1313

damithc commented 10 years ago

From arnold.k...@gmail.com on December 10, 2013 21:16:33

On a side note, there seem to be a downgradeInstructorToStudentCascade method that demotes an instructor into a student. Not sure if the instructor's course should be deleted in this case also.

damithc commented 10 years ago

From dam...@gmail.com on December 11, 2013 02:01:05

courses can have multiple instructors too. So we have to be careful in deleting an instructor's data. In fact, it may be better to leave the orphan entities alone if they don't cause any harm. Having them makes it easier to undo an accidental deletion of an instructor account.

Status: Accepted
Labels: -Priority-Medium Priority-Low