← Back to team overview

mahara-contributors team mailing list archive

[Bug 1354222] Re: Files within a group aren't deleted after deleting the group

 

Kristina.
You are very welcome to assign me to this. I'd really love to contribute to Mahara.
Though I am a programmer for a decent amount of time now I was never working on an open source project.
Are there any guidelines on how to submit your changes/files and where can I find them?
Thanks in advance you for your help.

Christian.
I agree with you in deleting all files which aren't used in any view and are part of the deleted group.
As you suggested I'd put that into the delete_group() method.

Rather than creating a lookup table for the files, which are still in
use I would add kind of the same mechanism to the cron script which
searches for files in ALL deleted groups that aren't used in views no
more.

I feel like the query I worked on today is fast enough to be executed
every time the cron runs with no significant penalty for the cron
script's execution time.

I would add the user-messaging when they have a file in one of their
views which is part of a deleted group when everything is working fine.

Right now I am working on a test-environment with a huge database of 10.000.000 artefacts, 200,000 views and 200.000 groups to find out two things:
a) Is it necessary to implement this orphan-deleter as a part of the update process when updating to a new version of Mahara or can it be done through the cron
b) Is my query fast enough to be used in huge systems

I think I'll have an answer by the end of next week. Until then I'll
play around with my test scenario's settings and let you know.

Kind regards
Lars

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1354222

Title:
  Files within a group aren't deleted after deleting the group

Status in Mahara ePortfolio:
  Confirmed

Bug description:
  If you create a group that contains any files (e.g. image, file) and
  then delete that group you should see a warning message. In addition,
  the files are not deleted although the group is (or marked as deleted)

  To reproduce (Mahara master):

  1.- Click on the 'Group' tab and create a group
  2.- Click on the 'Files' tab and add a file or image
  3.- Delete the group and you should see the warning. To check that the added files/images weren't deleted you can check out the 'artefact_file_files' table.

  Is this a bug or is it an intended behaviour? If it is a bug I could
  provide a patch for review.

  
  Cheers,
  Moises

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1354222/+subscriptions


References