Closed Benjamin-unige closed 1 month ago
Hi @Benjamin-unige ,
Thanks for suggesting this and providing a fix. I'm wondering though, what is the general expected behavior in this case? Would sorting in the mod_choicegroup module not behave differently as in other parts of Moodle?
Hi @ndunand ,
My initial motivation for this edit was a teacher asking us why when they were sorting group by name it was "all messed up" but I see your point.
I'll see if I can submit a similar patch on moodle core
Hi @Benjamin-unige ! We discussed the matter with @ndunand and we decided to merge your PR, as this behaviour makes more sense in the end (even if it might be different in other parts of Moodle). Thanks for the fix! It will be available in the next release :)
When ordering groups by name the sorting is done alphabetically and would place "group 12" before "group 2" This patch does a CAST to UNSIGNED on the numbers in a group name to fix that