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
90 stars 158 forks source link

Auto-linking filters move text element position if reference point is center #629

Closed rhell4 closed 1 month ago

rhell4 commented 1 month ago

This issue happens for both "Activity names auto-linking" and "Glossary auto-linking". This is because the html link tags the filters adds around the text are included when getting the string width to calculate the positioning.

Testing instructions:

  1. Have a course with the "Activity names auto-linking" filter turned on
  2. Add any activity called "Foo"
  3. Add a custom certificate activity
  4. Add two text elements
    • One "Foo" and the other "Bar"
    • "Reference point location" set to "Center"
    • "Alignment" set to anything other than "Center"
  5. Reposition the elements to be in line with each other
  6. View the certificate
  7. Note that "Foo" is now misaligned and moved to the left
mdjnelson commented 1 month ago

Thanks for your work and replication steps, its much appreciated.