Forums | Mahara Community

Developers /
Remove archived submissions


Jawyei Wong's profile picture
Posts: 23

18 August 2017, 15:11

Is there a way to remove archived submissions once they are no longer needed to reclaim space? There does not seem to be a way to do it on the front end. I see when you 'Export all data in CSV format' it gives you the filepath and filename of the archive, could those just be deleted?

Kristina Hoeppner's profile picture
Posts: 4863

21 August 2017, 9:28

Hi Jawyei,

You can simply remove them from the folder on the server. There is no front-end functionality at the moment. If you keep the CSV file, then you can match the files up with what's in the downloaded folder.

Cheers

Kristina

 

Jawyei Wong's profile picture
Posts: 23

29 August 2017, 14:51

Hi Kristina

Thanks for that. I just tried it and as I suspected, there is still a link to the file but it says file missing. Is there a way to remove the database entry (without breaking any references) so the list item does not appear in the archive submissions area as if there a hundreds, it will get troublesome to manage.

Jawyei Wong's profile picture
Posts: 23

29 August 2017, 15:32

Looks like removing the row in the archived_submissions table did the trick. Hopefully nothing needs that row...

Robert Lyon's profile picture
Posts: 773

29 August 2017, 15:40

Sounds like we need a cron job to check the validity of the info in db vs what is in dataroot and if file(s) not found then remove the relating db row.

However, we'd need to have this only remove bad links that are over so many days old otherwise db data would be deleted if/when someone accidentally moves or makes dataroot not readable

Cheers

Robert

Robert Lyon's profile picture
Posts: 773

29 August 2017, 15:41

Ah sounds like we don't need something special here - just need to delete the row in the table !

Kristina Hoeppner's profile picture
Posts: 4863

29 August 2017, 16:24

Hi Jawyei and Robert,

I created https://bugs.launchpad.net/mahara/+bug/1713610

Cheers

Kristina

 

7 results