Hi!
I am a happy moodle-newbie, but there is one feature I can't seem to find that I guess would be greatly appreciated.
Is it possible to use usernames instead of full name in forums, as a form of alias?
All the best from a sunny Stockholm,
Erich N
Dear Erich N
It is not possible to display usernames as opposed to full names in
the forums, without hacking the code at least.
The fact that usernames are never shown helps to improve Moodle
security, but agreed it would be nice to have the choice.
Thinking about hacking...
Looking at mod/forum/lib it seems that "fullname" is used quite a bit throughout the code, and more than once with $USER the user data array.
So it would be necessary to change all these, I guess. And anyway there are lots of other places in moodle, other than the forums, where the users' real name is displayed (such as in the recent activities)
The easiest way would be, PERHAPS, simply change the language pack that you are using so that instead of asking for family name and given name to ask for "Alias" or (two of them!) but then you would loose track of the users' real names.
OR perhaps, if you can find, perhaps the one(?) place in the Moodle code (Is it only one place?) where "fullname" is generated from the concatenation of family name and given name....
My guess is that somewhere in the moodle libraries (moodle/lib) there is a line, perhaps in moodlelib.php where there is something like
fullname=$USER->familyname." ".$USER->givenname
(this is probably not correct php, but the full stop is used for concatenation of strings, I believe)
Then if you changed this to
fullname=$USER->familyname (so that the given name is not concatenated into the fullname)
And then if you change your language pack entry for familyname into "Alias" and the language pack entry for *given name* to "Full name"
Then in all those places where the fullname of the user is displayed, the new Alias will be displayed.
I think that there are some places where the family name is displayed alone. These too would result in the display of the alias.
Then find all the places where the given name is displayed and make sure they are only displayed when "if isteacher"??!
This hack would take time.
Tim