I'm running Moodle 3.2 and have changed the user login information so that the first name field is now the course code and the last name field is now the students full name.
This has worked well for admin purposes, but poses a problem with chat rooms where the first two letters of the first name field is normally used to identify chat room users. In my case this comes out as the first two letters of the course code which makes it impossible to distinguish between chat users on the same course as they all come up with the same id.
Is there any way of changing the chat id so it comes up with the first two letters of the last name field instead, which in my case would be the students full name?
I've had a look at mod/chat/lib.php, but can't see what needs changing.
Any help greatly appreciated.