Hi
I found myself facing the same problem and your post was really helpful.
I have a problem, however: While I can find the quiz.php in the "Language Customization" section, I can't find the way to edit the locallib.php through the Moodle interface. Can this only be done with Server access?
And, for what you know, is there a way to "by-pass" the locallib.php modification, creating the reference to the grade directly in the email body?
Thanks a mil.
Salva