moodle-mod_customcert icon indicating copy to clipboard operation
moodle-mod_customcert copied to clipboard

Allow users to specify the name of the certificate PDF

Open mdjnelson opened this issue 8 years ago • 4 comments

This has been requested a few times when the file contains special characters due to people using different languages.

mdjnelson avatar Aug 22 '17 04:08 mdjnelson

+1 to this enhancement. We're using Cyrillic script in some of our courses which really messes up the certificate file name.

tbahula avatar Feb 28 '18 16:02 tbahula

+1 we have courses that use the same certificate template so you cannot tell 1 certificate issued to another 1 issued under the "My Certificates" area, Student Name/Course Name combo would be great.

ghost avatar Mar 02 '21 01:03 ghost

Hello @mdjnelson ,

I have patched the file /customcert/classes/template.php to add the name of the user, really simple. Maybe we can also add the name of the course?

302c302

<             $filename = clean_filename($filename . '.pdf');
---
>             $filename = clean_filename($filename . '_' . fullname($USER) . '.pdf');

Regards, Ricardo

ricardoh34 avatar Aug 24 '21 05:08 ricardoh34

The above fix can get added as part of https://github.com/mdjnelson/moodle-mod_customcert/issues/455 which I reopened.

mdjnelson avatar Aug 25 '21 03:08 mdjnelson