mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
89 stars 155 forks source link

you should be able to pick background image rightaway #613

Closed Urpokarhu1 closed 2 months ago

Urpokarhu1 commented 2 months ago

Hello, When you add background image element to a certificate > edit it > upload an image > you need to save > and edit again before you can pick the image from the "Image" menu.

The process should be more logical/simplified by add background image element > edit it > upload image > select image from the drop down menu > save

mdjnelson commented 2 months ago

You can blame Moodle for that behaviour. ;) It's the same in all other image places that has a select box to choose an image. It would take some time to fix this, so for now people put up with the nuisance. Basically the image doesnt get saved into the data directory location for custom certificates but instead is put in a temporary space (draft area) until the form is saved. So, you have to go back and choose it when it exists. If you cancel the form instead of saving the image is never uploaded to the proper location. This is just how Moodle works - it periodically deletes files in the draft area to get rid of them and prevent unnecessary disk usage.

mdjnelson commented 1 month ago

Pushed a fix, thanks again @tailetan.