mudrd8mz / moodle-tool_pluginskel

Generator of Moodle plugins skeletons
https://moodle.org/plugins/tool_pluginskel
Other
51 stars 46 forks source link

sort module types alphabetically #110

Closed danielneis closed 3 years ago

danielneis commented 3 years ago

this sorts module types alphabetically making it easier to find them on the list hope you like

best, Daniel

mudrd8mz commented 3 years ago

Thank you @danielneis for contributing this! I am never sure which solution is a good one for sorting plugin types. Sometimes (such as in the Moodle administration UI itself) it feels more natural when more essential plugin types (such as activity modules) are enlisted first as they are simply more important. And then it makes sense to have subplugins below their parent type etc.

However I agree that in this case, alphabetical order is probably more appropriate.

In either case, as the values here are localised strings, we will need UTF-8 safe sorting, not the PHP native asort(). Please amend the patch and use https://docs.moodle.org/dev/String_API#asort.28.29

danielneis commented 3 years ago

thank you, David and Jonathan!

mudrd8mz commented 3 years ago

Thanks both. To be released as a part of 1.5.2