danmarsden / moodle-mod_attendance

Allows an attendance log to be kept in Moodle
https://moodle.org/plugins/mod_attendance
64 stars 156 forks source link

Remove special chars from acronym fieldnames #752 #753

Closed Limekiller closed 5 months ago

Limekiller commented 5 months ago

This small change encodes the acronym field names in base64 (removing trailing equals) to fix https://github.com/danmarsden/moodle-mod_attendance/issues/752, where acronyms with special characters cause an issue because reportbuilder requires that filters and columns be alphanumeric. This keeps acronym names unique while removing special characters.

It does require removing the strtolower() call, since base64 uses both upper and lower case letters -- I hope that isn't an issue. Everything worked well when testing.

danmarsden commented 5 months ago

I vaugely recall field names needing to be lower case for some reason - but I can't remember why...... sounds like your testing would have identified if it's a problem though! - I'll try to review this properly sometime soon!

thanks!

danmarsden commented 5 months ago

merged this in manually and cherry-picked to all supported branches - thanks heaps for the PR!