Add certificate generation date

pull/2901/head
Nosolored 7 years ago
parent 961c380ac7
commit db498a914d
  1. 1
      plugin/customcertificate/lang/english.php
  2. 1
      plugin/customcertificate/lang/spanish.php
  3. 29
      plugin/customcertificate/src/index.php
  4. 4
      plugin/customcertificate/src/print_certificate.php

@ -31,6 +31,7 @@ $strings['ExpectionPlace'] = "Expection place";
$strings['DateExpediction'] = "Expediction date"; $strings['DateExpediction'] = "Expediction date";
$strings['UseDateEndAccessSession'] = "Use end date of session access"; $strings['UseDateEndAccessSession'] = "Use end date of session access";
$strings['UseDateDownloadCertificate'] = "Use certificate download date"; $strings['UseDateDownloadCertificate'] = "Use certificate download date";
$strings['UseDateGenerationCertificate'] = "Use certificate generation date";
$strings['UseCustomDate'] = "Use custom date"; $strings['UseCustomDate'] = "Use custom date";
$strings['LogosSeal'] = "Logos / Seals"; $strings['LogosSeal'] = "Logos / Seals";
$strings['LogoLeft'] = "Logo left"; $strings['LogoLeft'] = "Logo left";

@ -31,6 +31,7 @@ $strings['ExpectionPlace'] = "Lugar expedición";
$strings['DateExpediction'] = "Fecha expedición"; $strings['DateExpediction'] = "Fecha expedición";
$strings['UseDateEndAccessSession'] = "Usar fecha fin de acceso de la sesión"; $strings['UseDateEndAccessSession'] = "Usar fecha fin de acceso de la sesión";
$strings['UseDateDownloadCertificate'] = "Usar fecha de descarga del certificado"; $strings['UseDateDownloadCertificate'] = "Usar fecha de descarga del certificado";
$strings['UseDateGenerationCertificate'] = "Usar fecha de generación del certificado";
$strings['UseCustomDate'] = "Usar fechas personalizadas"; $strings['UseCustomDate'] = "Usar fechas personalizadas";
$strings['LogosSeal'] = "Logos / Sellos"; $strings['LogosSeal'] = "Logos / Sellos";
$strings['LogoLeft'] = "Logo izquierda"; $strings['LogoLeft'] = "Logo izquierda";

@ -454,7 +454,7 @@ $form->addText(
); );
$group = []; $group = [];
$option1 = &$form->createElement( $option = &$form->createElement(
'radio', 'radio',
'type_date_expediction', 'type_date_expediction',
'', '',
@ -466,9 +466,9 @@ $option1 = &$form->createElement(
(($sessionId == 0) ? 'disabled' : ''), (($sessionId == 0) ? 'disabled' : ''),
] ]
); );
$group[] = $option1; $group[] = $option;
$option2 = &$form->createElement( $option = &$form->createElement(
'radio', 'radio',
'type_date_expediction', 'type_date_expediction',
'', '',
@ -479,9 +479,22 @@ $option2 = &$form->createElement(
'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();', 'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();',
] ]
); );
$group[] = $option2; $group[] = $option;
$option = &$form->createElement(
'radio',
'type_date_expediction',
'',
get_lang('UseDateGenerationCertificate'),
4,
[
'id' => 'type_date_expediction_4',
'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();',
]
);
$group[] = $option;
$option4 = &$form->createElement( $option = &$form->createElement(
'radio', 'radio',
'type_date_expediction', 'type_date_expediction',
'', '',
@ -492,9 +505,9 @@ $option4 = &$form->createElement(
'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();', 'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();',
] ]
); );
$group[] = $option4; $group[] = $option;
$option3 = &$form->createElement( $option = &$form->createElement(
'radio', 'radio',
'type_date_expediction', 'type_date_expediction',
'', '',
@ -505,7 +518,7 @@ $option3 = &$form->createElement(
'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();', 'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();',
] ]
); );
$group[] = $option3; $group[] = $option;
$form->addGroup( $form->addGroup(
$group, $group,

@ -186,7 +186,7 @@ foreach ($userList as $userInfo) {
$all_user_info = DocumentManager::get_all_info_to_certificate( $all_user_info = DocumentManager::get_all_info_to_certificate(
$studentId, $studentId,
$courseCode, $courseCode,
true false
); );
$myContentHtml = $infoCertificate['content_course']; $myContentHtml = $infoCertificate['content_course'];
@ -253,6 +253,8 @@ foreach ($userList as $userInfo) {
'............' '............'
); );
} }
} elseif ($infoCertificate['type_date_expediction'] == 4) {
$dateExpediction .= $plugin->get_lang('to').$info_to_replace_in_content_html[9]; //date_certificate_no_time
} else { } else {
if (!empty($sessionInfo)) { if (!empty($sessionInfo)) {
$dateInfo = api_get_local_time($sessionInfo['access_end_date']); $dateInfo = api_get_local_time($sessionInfo['access_end_date']);

Loading…
Cancel
Save