For those of us who use rosters arranged in lastname, firstname format, Moodle presents some challenges! Most common is display of firstname lastname format, compounded by the problem that in some places the users might be listed alphabetized by first name.
When assigning students to a course in Moodle 1.8.x, users are now alphabetized by lastname, but continued to be displayed firstname lastname. (Earlier versions of Moodle, i.e. 1.6.3, ordered students by firstname AND displayed them by firstname.) Of course in some places, a sort link was provided so you could order by surname. But our problems were particularly with assigning roles and assigning users to groups, since those lists were quite hard to read when they did not match the course rosters from which the faculty were working!
Therefore, Anthony Borrow was kind enough to share two hacks with me to help with this problem in Moodle 1.8.2. The first hack has to do with moodle/admin/roles/assign.html and assign.php. (See file attached--includes diffs)
And he posted a second hack to force the display of lastname, firstname when assigning members to groups within a course in the Moodle issue tracker. While it is true that the participants for assigning roles to a group is limited to those who are members of the course, we have some situations where up to 300 students are assigned to a course and separated into sections using groups. It was quite difficult to assign the students to groups manually when they were ordered by firstname.
http://tracker.moodle.org/browse/MDL-7163#action_28075
Anthony Borrow - [18/Mar/07 12:54 PM ] To change the order of the list of members in the group members box I changed line 63 of /group/lib/utillib.php
from: $fullname = fullname($user, true);
to: $fullname = $user->lastname.', '.$user->firstname;
I have applied both these fixes on my instance, and so far have had no problems. I am posting this information here with Anthony's permission.
Related issues filed in tracker (if you are disposed to go vote!)
http://tracker.moodle.org/browse/MDL-7163
http://tracker.moodle.org/browse/MDL-7591
Related discussion: