Details
Description
still working on a project at Federal University of Santa Catarina, in Brasil. Some users reported that the course list on profiles isn't on the same order of my moodle.
The attached patch correct this, passing 'visible DESC, sortorder ASC' to $sort param instead of null. Maybe the function should be corrected to handle null differently from an empty string, but i don't have much time to test it now.
Daniel, thanks for your report and patch.
Reassigning to moodle.com for consideration.