Certificates

Certificates

by Ronnie Izzo -
Number of replies: 1

Was wondering if there was an easy way to change the certificate to use the Topic or Quiz Title instead of the Course Title?  I would like to offer a certificate after the completion of each quiz within a course that has 10 quizzes or topics.

Thanks.

Average of ratings: -
In reply to Ronnie Izzo

Re: Certificates

by Chardelle Busch -
Picture of Core developers
(Note: This discussion should be in the Activity Modules forum)

Hi Ron,

If you choose to print an activity grade on a certificate, such as a quiz, it will also print the name of that activity. However, you can also customize your own certificate type.

The certificate type folder was created just for this type of customization. The easiest way for you to do this is to creat a new type for each topic by simply copying one of the default type folders and renaming it, e.g. topic1, topic2, topic3... Be sure to add your new names to the certificate/lang/certificate.php file like this:

$string['typequiz1'] = 'Topic One Certificate';


Then in the certificate.php file for each type, at the bottom you will see where the text strings are added to the certificate under //Add text

The string that prints the course name is this:
cert_printtext(170, 330, 'C', 'Vera', '', 20, $course->fullname);

Simply replace that line with whatever you would like it to say by adding a language string to the certificate lang/certificate.php file.

For example:
cert_printtext(170, 330, 'C', 'Vera', '', 20, get_string('topic1name', 'certificate'));

Then add that language string to the lang file like this:
$string['quiz1name'] = 'Tile of Topic One';