|
@ -39,11 +39,10 @@ $cc = new completion_completion(array('userid'=>$USER->id, 'course'=>$course->id |
|
|
|
|
|
|
|
|
$enrol_manager = new course_enrolment_manager($PAGE, $course); |
|
|
$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 = $user_enrol->timestart; |
|
|
|
|
|
|
|
|
$start_date = (empty($enrolments))? $enrolments[0]->timestart : 0; |
|
|
|
|
|
$end_date = $cc->timecompleted; |
|
|
$end_date = $cc->timecompleted; |
|
|
$cert_date = $end_date; |
|
|
$cert_date = $end_date; |
|
|
|
|
|
|
|
|