Changing certificate

Changing certificate

by Michael "doc" Crawford -
Number of replies: 3
How can I get the Certificate Module to use the "Topic" name for the Certificate, instead of the Course name?
Average of ratings: -
In reply to Michael "doc" Crawford

Re: Changing certificate

by Michael "doc" Crawford -

Could also use the "Certificate Name" under edit settings, if possible. Just don't know what/where to change for that.

In reply to Michael "doc" Crawford

Re: Changing certificate

by Jean-Michel Védrine -

Hello Michael,

Please search this forum, I am quite sure I have already given the code to use topic name.

In reply to Jean-Michel Védrine

Re: Changing certificate

by Michael "doc" Crawford -

Hello Jean-Michel, I did read that thread. Your code:

$usesections = course_format_uses_sections($course->format);
    if ($usesections) {
        $currentsection = $DB->get_record('course_sections', array('id'=>$cm->section));

        if ($currentsection) {
            $printsection = get_section_name($course, $currentsection);
            certificate_print_text($pdf, $x, $y+72, 'C', 'Helvetica', '', 20, $printsection);

        }
    }

...was posted in 2012. I was concerned that it may not work in this latest Moodle/Certificate version.

Where should I put this code on the certificate.php page of My Certificate?