On my Moodle site, I have quizzes set up in each course. When a student takes a quiz, I would like that student to receive a confirmation email. In that confirmation email, I would like to be able to also have a pdf attachment (like a pdf certificate for example) that is specific to the quiz that the student just took.
So far, I have found the emailconfirmbody string in Site Administration > Language > Language customization. There, I can edit the default "Dear {$a->username}, Thank you for submitting your answers to '{$a->quizname}' in course '{$a->coursename}' at {$a->submissiontime}. This message confirms that we have safely received your answers. You can access this quiz at {$a->quizurl}." Problems are...
How do I add the pdf attachement? The pdf attachment needs to be specific to quiz taken just as the emailconfirmbody message is specific to quiz taken (by using the variable quizname).
Emails are not being sent after quiz submission unless the cron.php file is ran manually. How do I get the emails to send automatically?