I am using Moodle 3.11. I am trying to create a personal plugin, of the block type, that allows teachers, through a form, to create achievements, the achievements are a series of activities that must be completed and / or have a minimum grade, in addition it also has a associated name, description and image.
My problem comes when I try to display the image. When the form is submitted, I save the image with "file_prepare_standard_filemanager (...)" and "file_postupdate_standard_filemanager (...)". I have also implemented the NAMEOFMYPLUGIN__pluginfile (...) function in my lib.php.
But now I don't know how to use this last function to show the achievement image, in the student's block, if the achievement has been achieved.
I would appreciate any help.
Sorry for my English.