Moodle - Teachers Name

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

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.