|
@ -31,6 +31,16 @@ if (!defined('MOODLE_INTERNAL')) { |
|
|
$group = end(groups_get_all_groups($course->id, $USER->id)); |
|
|
$group = end(groups_get_all_groups($course->id, $USER->id)); |
|
|
$group_name = format_string($group->name); |
|
|
$group_name = format_string($group->name); |
|
|
$group_description = format_text($group->description, $group->descriptiontext); |
|
|
$group_description = format_text($group->description, $group->descriptiontext); |
|
|
|
|
|
|
|
|
|
|
|
#Obtem a nota do aluno, se o curso estiver configurado para gerar |
|
|
|
|
|
#certificado com nota. Do contrário, o campo virá sempre em branco. |
|
|
|
|
|
$grade=certificate_get_grade($certificate, $course); |
|
|
|
|
|
if( $grade != '' ) { |
|
|
|
|
|
#Se houver nota, acrescenta vírgulas antes e depois |
|
|
|
|
|
$grade = $grade . ', '; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
$style = <<<EOT |
|
|
$style = <<<EOT |
|
|
<style> |
|
|
<style> |
|
@ -108,7 +118,7 @@ $pdf->SetTextColor(0, 0, 0); |
|
|
certificate_print_text($pdf, $x, $y, 'C', 'freesans', '', 20, get_string('title', 'certificate')); |
|
|
certificate_print_text($pdf, $x, $y, 'C', 'freesans', '', 20, get_string('title', 'certificate')); |
|
|
certificate_print_text($pdf, $x, $y + 15, 'C', 'freesans', '', 18, get_string('certify', 'certificate')); |
|
|
certificate_print_text($pdf, $x, $y + 15, 'C', 'freesans', '', 18, get_string('certify', 'certificate')); |
|
|
certificate_print_text($pdf, $x, $y + 25, 'C', 'freesans', 'B', 18, mb_strtoupper(fullname($USER), 'UTF-8').", CPF nº {$USER->profile['cpf']}"); |
|
|
certificate_print_text($pdf, $x, $y + 25, 'C', 'freesans', 'B', 18, mb_strtoupper(fullname($USER), 'UTF-8').", CPF nº {$USER->profile['cpf']}"); |
|
|
certificate_print_text($pdf, $x, $y + 35, 'C', 'freesans', '', 18, "realizou, na modalidade presencial, ".certificate_get_grade($certificate, $course).", o curso"); |
|
|
certificate_print_text($pdf, $x, $y + 35, 'C', 'freesans', '', 18, "realizou, na modalidade presencial, " . $grade . "o curso"); |
|
|
certificate_print_text($pdf, $x, $y + 45, 'C', 'freesans', 'B', 18, mb_strtoupper($course->fullname, 'UTF-8')); |
|
|
certificate_print_text($pdf, $x, $y + 45, 'C', 'freesans', 'B', 18, mb_strtoupper($course->fullname, 'UTF-8')); |
|
|
$tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n'=> 0))); |
|
|
$tagvs = array('p' => array(0 => array('h' => 0, 'n' => 0), 1 => array('h' => 0, 'n'=> 0))); |
|
|
$pdf->setHtmlVSpace($tagvs); |
|
|
$pdf->setHtmlVSpace($tagvs); |
|
|