Backup and Restore plugin within plugin

Re: Backup and Restore plugin within plugin

by Roberto Becerra -
Number of replies: 0
Picture of Plugin developers
News. For now solved part of the the issue. The part of not saving. The reason had been a php error in another custom plugin, (that was completely elsewhere, not even included in the course being backed up). Corrected the error and this backup, and that of the HTML block also started to save the configdata.

I got a cue from this discussion from a years back: https://moodle.org/mod/forum/discuss.php?d=328219

Still have the issue that the files from my custom display file block are either not backed up or restored. So I actually get the files in the filearea in the file picker ,but they are not displayed from the moment the course is restored. I have to go into the block settings and see the files in the filepicker, click on save and only then I see the files displayed in the block as they should be.

I remember reading this exact same issue somewhere in this forum... and I found it: https://moodle.org/mod/forum/discuss.php?d=315000

But I didn't completely understand how to go around this. In this last link, the user Urs says that is as "easy as to declare the »filearea« where the image gets stored in the »get_fileareas« function in the backup and restore task classes of the block". But I couldn't find the documentation to use that get_fileareas function :/