bdecentgmbh / moodle-format_kickstart

Kickstart adds a powerful course template engine to moodle – create courses easily and produce high quality courses, consistently.
http://bdecent.de/kickstart
5 stars 3 forks source link

Uploaded template file might not be removed from filearea when a template is deleted #41

Open abias opened 1 year ago

abias commented 1 year ago

Hi Stefan,

as discussed, I am re-using your template management code from this plugin in theme_boost_union. During the adoption of the existing code, I became aware that an uploaded template file might not be removed from the filearea when a template is deleted in the GUI.

The code are which is handling the template deletion is at https://github.com/bdecentgmbh/moodle-format_kickstart/blob/master/template.php#L131-L152, but there isn't any code which removes the file from the filearea.

You might want to double-check if you need to remove the file from the filearea during the template deletion and if you do, you will need to write a plugin update step which removes all orphaned files which might existing in plugin installations.