Browse Source

Adaptação para MOODLE 3.7

master
Matheus Garcia 6 years ago
parent
commit
d7c813a770
  1. 7
      type/ILB_Sem_tutoria_2014/certificate.php

7
type/ILB_Sem_tutoria_2014/certificate.php

@ -38,9 +38,12 @@ require_once("$CFG->dirroot/enrol/locallib.php");
$cc = new completion_completion(array('userid'=>$USER->id, 'course'=>$course->id));
$enrol_manager = new course_enrolment_manager($PAGE, $course);
$user_enrol = end($enrol_manager->get_user_enrolments($USER->id));
$start_date = $user_enrol->timestart;
$enrolments = $enrol_manager->get_user_enrolments($USER->id);
//$user_enrol = isempty($enrolments)? end();
$start_date = (empty($enrolments))? $enrolments[0]->timestart : 0;
$end_date = $cc->timecompleted;
$cert_date = $end_date;

Loading…
Cancel
Save