In my moodle 2.6 i would like to edit sending certificate action to send certificate with attachments (my attachment would be 2 file from course) It's always different files but in courses have the same name. 1 is *pdf and second is mp3 file. I know that i have to get that file to certificate send mail acrion and add it to email , i don't know how to do it and I need a little help. Can sb help me ?
Thanks for answers Best Regards
Just noticed there is a function in /mod/certificate/lib.php that emails the certificate to a student:
certificate_email_student($course, $certificate, $certrecord, $context);
If you make a copy of that function and modify it for your cron - you will need to change $USER to $user - $USER is the current user but you will need to send it to a specified user.
The function also shows how to get a copy of a file using the file storage api
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.