Moodle - Teachers Name
Submitted by BinksUK on
Moodle seems to have an annoyingly laid back attitude to names, teachers and students alike are addressed by first and lastname to all. I know you can change this to just firstname but still no good to us. If I have any hope of selling this to our staff I needed to find away to mask Staff names so they just show, at most, their first initial and surname. Much googling, the search engine is becoming less of a friend these days, and I eventually come across http://moodle.org/mod/forum/discuss.php?d=52182.
I've modified this slightly and come up with:
.......if ($CFG->fullnamedisplay == 'firstname lastname') {
if(isteacherinanycourse($user->id))
{
return substr($user->firstname, 0, 1) . ". " . $user->lastname;
}
else
{
return $user->firstname .' '. $user->lastname;
}
} else if ($CFG->fullnam......
Next task will be to see if I can modify this so it only happens on student views... and then I need to see about Mr/Mrs/Miss/Ms...
Add new comment