GibbonEdu / core

Gibbon is a flexible, open source school management platform designed to make life better for teachers, students, parents and leaders.
https://gibbonedu.org
GNU General Public License v3.0
460 stars 299 forks source link

Updated Format file to remove in-baked styling #1781

Closed felixOlesen closed 7 months ago

felixOlesen commented 7 months ago

Description Updated Format file to remove in-baked styling of Format::photo uses. The styling will now only be used as a default param.

Motivation and Context This change allows for more modular usage of the Format::photo method stylistically.

How Has This Been Tested? Tested Locally

yookoala commented 7 months ago

This would change the $class parameter behaviour from appending to overriding classes.

I've just search. We have 3 usages in core that uses the Format::photo() method:

None of these use the $class parameter to override the photo class. Not sure if there is any usage in the modules.

SKuipers commented 7 months ago

Thanks @yookoala for checking! I didn't recall this method even existing, so did some looking around in the code. It appears like this method was created by a community member, as part of Library refactoring work they contributed to the core, and has only been used in that context, and not in additional modules. Given this limited use, it looks like we're good to proceed in cleaning up this method a bit, as it also has some duplicate code that was intended only for the Format::userPhoto method.