Adding Username to Notification Email

Adding Username to Notification Email

by Terry Barnett -
Number of replies: 3
How do I insert the username into the notification email?

Currently I have found the text in certificate.php and been able to edit the text so that it meets my needs in verbiage, but have been unable to figure out the proper code to insert the username of the student.

The example text below is how it inserts the student's name, course and the certificate name into the email notification.

//Email text
$string['emailstudenttext'] = 'Attached is your certificate for $a->course.';
$string['awarded'] = 'Awarded';
$string['emailteachermail'] = '
$a->student has received their certificate: \'$a->certificate\'
for $a->course.

You can review it here:

$a->url';
$string['emailteachermailhtml'] = '
$a->student has received their certificate: \'<i>$a->certificate</i>\'
for $a->course.

You can review it here:

<a href=\"$a->url\">Certificate Report</a>.';


I need the username in the email as well. This is important because our staff uses primarily the username as the lookup, not the students name.

Please help!

Thank you,
Terry Barnett

Average of ratings: -
In reply to Terry Barnett

Re: Adding Username to Notification Email

by Terry Barnett -
Can someone help me out with this please?  Thank you!
In reply to Terry Barnett

Re: Adding Username to Notification Email

by Terry Barnett -

I simply need to add the username to the email that goes to the teacher. 

i.e. John Does, 216122002 has recieved... 

We are currently having students create their account with this id as the username.  So it would pull from that field.

This is crucial because my staff uses the id rather than a name for the initial look up and to cross reference similar names with their accounts.

Thank you!