From 6544c44a71f365f4bb6ff196327e3cb286276a2f Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Wed, 19 Jun 2019 13:08:58 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20na=20data=20inicial=20do?= =?UTF-8?q?=20certificado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- type/ILB_Sem_tutoria_2014/certificate.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/type/ILB_Sem_tutoria_2014/certificate.php b/type/ILB_Sem_tutoria_2014/certificate.php index 04ee4bc..17f12b4 100644 --- a/type/ILB_Sem_tutoria_2014/certificate.php +++ b/type/ILB_Sem_tutoria_2014/certificate.php @@ -39,11 +39,10 @@ $cc = new completion_completion(array('userid'=>$USER->id, 'course'=>$course->id $enrol_manager = new course_enrolment_manager($PAGE, $course); -$enrolments = $enrol_manager->get_user_enrolments($USER->id); +//$enrolments = $enrol_manager->get_user_enrolments($USER->id); +$user_enrol = reset($enrol_manager->get_user_enrolments($USER->id)); -//$user_enrol = isempty($enrolments)? end(); - -$start_date = (empty($enrolments))? $enrolments[0]->timestart : 0; +$start_date = $user_enrol->timestart; $end_date = $cc->timecompleted; $cert_date = $end_date;