From 8c9d5dc1ca09bad1067d6ba3678828c1e7eb192f Mon Sep 17 00:00:00 2001 From: root Date: Mon, 13 Jun 2016 10:04:31 -0300 Subject: [PATCH] =?UTF-8?q?Ajusta=20data=20de=20assinatura=20para=20um=20d?= =?UTF-8?q?ia=20depois=20do=20t=C3=A9rmino?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- type/ILB_Com_tutoria_2014/certificate.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/type/ILB_Com_tutoria_2014/certificate.php b/type/ILB_Com_tutoria_2014/certificate.php index 8025920..ab26987 100644 --- a/type/ILB_Com_tutoria_2014/certificate.php +++ b/type/ILB_Com_tutoria_2014/certificate.php @@ -37,6 +37,8 @@ require_once("$CFG->dirroot/completion/completion_completion.php"); $start_date = $course->startdate; $end_date = $start_date + 39 * 24 * 60 * 60; // 40 days * 24 hours * 60 min * 60 sec; ugly hack! +$emissao_date = $start_date + 40 * 24 * 60 * 60; // dia seguinte ao término; very ugly hack! + $fmt = '%d/%m/%Y'; // Default format if ($certificate->datefmt == 1) { @@ -53,6 +55,8 @@ if ($certificate->datefmt == 1) { } $start_date = userdate($start_date, $fmt); $end_date = userdate($end_date, $fmt); +$emissao_date = userdate($emissao_date, $fmt); + $pdf = new PDF($certificate->orientation, 'mm', 'A4', true, 'UTF-8', false); @@ -128,7 +132,8 @@ if ($certificate->printhours) { certificate_print_text($pdf, $x, $y + 65, 'C', 'freesans', '', 18, "com carga horária de {$certificate->printhours}"); } certificate_print_text($pdf, $x, $y + 75, 'C', 'freesans', '', 18, certificate_get_grade($certificate, $course)); -certificate_print_text($pdf, $x, $y + 85, 'R', 'freesans', 'B', 14, "Brasília, " . certificate_get_date($certificate, $certrecord, $course) . '.'); +certificate_print_text($pdf, $x, $y + 85, 'R', 'freesans', 'B', 14, "Brasília, {$emissao_date}."); + // Verse page ----------------------------------------------------------------------------------------------------------- $pdf->AddPage();