|
|
|
|
@ -624,7 +624,11 @@ class Certificate extends Model |
|
|
|
|
|
|
|
|
|
$extraFieldValue = new ExtraFieldValue('user'); |
|
|
|
|
$value = $extraFieldValue->get_values_by_handler_and_field_variable($this->user_id, 'legal_accept'); |
|
|
|
|
list($id, $id2, $termsValidationDate) = explode(':', $value['value']); |
|
|
|
|
|
|
|
|
|
$termsValidationDate = ''; |
|
|
|
|
if (isset($value) && !empty($value['value'])) { |
|
|
|
|
list($id, $id2, $termsValidationDate) = explode(':', $value['value']); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$sessions = SessionManager::get_sessions_by_user($this->user_id); |
|
|
|
|
$sessionsApproved = []; |
|
|
|
|
@ -672,7 +676,8 @@ class Certificate extends Model |
|
|
|
|
|
|
|
|
|
$skill = new Skill(); |
|
|
|
|
$skills = $skill->getStudentSkills($this->user_id); |
|
|
|
|
$time = api_time_to_hms(Tracking::get_time_spent_on_the_platform($this->user_id)); |
|
|
|
|
$timeInSeconds = Tracking::get_time_spent_on_the_platform($this->user_id); |
|
|
|
|
$time = api_time_to_hms($timeInSeconds); |
|
|
|
|
|
|
|
|
|
$tplContent = new Template(null, false, false, false, false, false); |
|
|
|
|
|
|
|
|
|
@ -680,10 +685,13 @@ class Certificate extends Model |
|
|
|
|
$tplContent->assign('complete_name', $userInfo['complete_name']); |
|
|
|
|
$tplContent->assign('time_in_platform', $time); |
|
|
|
|
$tplContent->assign('certificate_generated_date', api_get_local_time($myCertificate['created_at'])); |
|
|
|
|
$tplContent->assign('terms_validation_date', api_get_local_time($termsValidationDate)); |
|
|
|
|
if (!empty($termsValidationDate)) { |
|
|
|
|
$termsValidationDate = api_get_local_time($termsValidationDate); |
|
|
|
|
} |
|
|
|
|
$tplContent->assign('terms_validation_date', $termsValidationDate); |
|
|
|
|
|
|
|
|
|
// Ofaj |
|
|
|
|
$tplContent->assign('time_in_platform_in_hours', round($time/3600, 1)); |
|
|
|
|
$tplContent->assign('time_in_platform_in_hours', round($timeInSeconds/3600, 1)); |
|
|
|
|
$tplContent->assign( |
|
|
|
|
'certificate_generated_date_no_time', |
|
|
|
|
api_get_local_time( |
|
|
|
|
|