Print group name on Certificate, Moodle 2.2

Re: Print group name on Certificate, Moodle 2.2

by Grant Carruthers -
Number of replies: 0

Hi Mark,

my apologies for the late reply this time. Thank you for that, it's now working perfectly.

In the certificate.php file in the mod/certificate/type/your-type-name folder' I added:

$currentgroup=get_current_group($course->id);
$group = $DB->get_record('groups', array('id' => $currentgroup));
$groupname=$group->name;

around line 80 and then added:

certificate_print_text($pdf, $x + 80, $y + 90, 'L', 'Helvetica', '', 12, utf8_decode($groupname));


 on line 104.

best wishes

Grant