Adding the idnumber on the printed certificate

Adding the idnumber on the printed certificate

by Darren Hedden -
Number of replies: 1

Hi there All,

I have created a course, and added a certificate instance (I am on moodle 2.3)

I would like to add a bit of magic somewhere so that idnumber I have included when uploading my users is automatically printed on the certificate.

I have been reading posts,  playing around with the certificate.php in my customised certificate type folder, but don't seem to be hitting the nail on the head

Any help would be very much appreciated

Wishing you all the best whereever in the world this post finds you

Best regards

Darren

Average of ratings: -
In reply to Darren Hedden

Re: Adding the idnumber on the printed certificate

by Jean-Michel Védrine -

Hello Darren,

The method to add an user field is always the same, you only need to change the name of the user's field. something like:

certificate_print_text($pdf, $x + 23, $y + 72, 'C', 'freesans', '', 20, $USER->idnumber);

Changing the 23 and 72 will change the text's position, changing 'freesans' will change the font used,  and changing the 20 will change the font size.

Average of ratings: Useful (1)