Hi.
Question
-------------
How files and database's records are deleted when you are working with moodledata and external repositories?
Because I've seen that there are a lot of records that are saved when you store a new file and some of them are not deleted when you delete the file.
Context:
-----------
I have been working on a function to create a carousel of information to put it on my theme's frontpage.
The plugin is working fine, but I am worried about the quantity of records that are created when I update or create slides for the carousel.
I checked what happen when you add images on the summary section and there are much more records added to the mdl_files table than with my function.
But I still worried because I dont understand perfectly how Moodle delete draft files and maybe my draft files are not going to be deleted.
Thanks in advance,
Daniel.