A block displays an image. The block image is set with the filemanager.
How do I backup and restore the image with the course backup. I have searched the Moodle documentation for block backup, for the file API, the backup API etc. but found no description how to backup and restore images/files in blocks. I didn't find Moodle core blocks that handle file/image backup and restore and I didn't find other blocks that backup and restore images.
When I backup and restore a course with this image block no image is shown after the restore. When I open the block settings the filemanager shows the image which has been chosen before the course has been backuped and restored. When I save this image again it is shown again. The »itemid« of the image is saved in the block »configdata« and restored with the course restore. Is there a way to create a new file entry for this image? There should be a possibility to write the image information to the database during the block restore or after restore.
Please can somebody explain how to backup and restore an image in a block?
Thank you very much for your help.