ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

[Fix] Certificate #0046484: Change Behaviour on global BackgroundImage changes

Open fhelfer opened this issue 1 month ago • 0 comments

Behaviour on Setting an Installation-Wide Default Background Image

(https://mantis.ilias.de/view.php?id=46484)

This PR proposes to change the background image handling for certificates to align with the expected global background behavior.

In previous versions (e.g., ILIAS 9), when a global certificate background was changed, objects referencing it automatically updated as well. If the global background had been deleted, however, the object would still retain its background image. As also documented here: https://testrail.ilias.de/index.php?/tests/view/84458

After the IRSS changes (ILIAS 11), this behavior was modified: when the global background was removed or changed, object‑level backgrounds remained unchanged. This change was introduced because IRSS allowed cleaning up files once the last template using them was deleted. A template would then be seen as a copy from the moment of saving.

This change reintroduces the previous update logic by restoring the call to ilCertificateTemplateDatabaseRepository::updateDefaultBackgroundImagePaths(), which had been previously removed with https://github.com/ILIAS-eLearning/ILIAS/commit/db03ec299a5d849dd19edda0e53c82cde2f50979#diff-bdd87c6f36d74bd9cdd7cdc2e3f5f162ec617e8bc166d6497991bbb2a7324d8bL145

Effect:

When the global certificate background image changes, all certificate templates that use the global background will automatically update to the new global image. When the global background image is deleted, these templates will revert to having no background image, consistent with the new global state.

Note:

Templates that previously had no background will automatically adopt the global background once one is set. This is expected behavior, as it is currently not possible to have “no image” when a global background is defined.

Result:

Object certificates now consistently follow the global default background rules during updates and deletions, restoring the intuitive behavior seen in earlier ILIAS versions.

Best @fhelfer

fhelfer avatar Dec 08 '25 11:12 fhelfer