diff --git a/plugin/customcertificate/lang/english.php b/plugin/customcertificate/lang/english.php index 4f01d40fa0..b0acb74d17 100644 --- a/plugin/customcertificate/lang/english.php +++ b/plugin/customcertificate/lang/english.php @@ -31,6 +31,7 @@ $strings['ExpectionPlace'] = "Expection place"; $strings['DateExpediction'] = "Expediction date"; $strings['UseDateEndAccessSession'] = "Use end date of session access"; $strings['UseDateDownloadCertificate'] = "Use certificate download date"; +$strings['UseDateGenerationCertificate'] = "Use certificate generation date"; $strings['UseCustomDate'] = "Use custom date"; $strings['LogosSeal'] = "Logos / Seals"; $strings['LogoLeft'] = "Logo left"; diff --git a/plugin/customcertificate/lang/spanish.php b/plugin/customcertificate/lang/spanish.php index 84b6d05ed9..775071e9da 100644 --- a/plugin/customcertificate/lang/spanish.php +++ b/plugin/customcertificate/lang/spanish.php @@ -31,6 +31,7 @@ $strings['ExpectionPlace'] = "Lugar expedición"; $strings['DateExpediction'] = "Fecha expedición"; $strings['UseDateEndAccessSession'] = "Usar fecha fin de acceso de la sesión"; $strings['UseDateDownloadCertificate'] = "Usar fecha de descarga del certificado"; +$strings['UseDateGenerationCertificate'] = "Usar fecha de generación del certificado"; $strings['UseCustomDate'] = "Usar fechas personalizadas"; $strings['LogosSeal'] = "Logos / Sellos"; $strings['LogoLeft'] = "Logo izquierda"; diff --git a/plugin/customcertificate/src/index.php b/plugin/customcertificate/src/index.php index 3c2f337d11..d74ad5d646 100644 --- a/plugin/customcertificate/src/index.php +++ b/plugin/customcertificate/src/index.php @@ -454,7 +454,7 @@ $form->addText( ); $group = []; -$option1 = &$form->createElement( +$option = &$form->createElement( 'radio', 'type_date_expediction', '', @@ -466,9 +466,9 @@ $option1 = &$form->createElement( (($sessionId == 0) ? 'disabled' : ''), ] ); -$group[] = $option1; +$group[] = $option; -$option2 = &$form->createElement( +$option = &$form->createElement( 'radio', 'type_date_expediction', '', @@ -479,9 +479,22 @@ $option2 = &$form->createElement( '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', 'type_date_expediction', '', @@ -492,9 +505,9 @@ $option4 = &$form->createElement( 'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();', ] ); -$group[] = $option4; +$group[] = $option; -$option3 = &$form->createElement( +$option = &$form->createElement( 'radio', 'type_date_expediction', '', @@ -505,7 +518,7 @@ $option3 = &$form->createElement( 'onclick' => 'javascript: typeDateExpedictionSwitchRadioButton();', ] ); -$group[] = $option3; +$group[] = $option; $form->addGroup( $group, diff --git a/plugin/customcertificate/src/print_certificate.php b/plugin/customcertificate/src/print_certificate.php index 2fae2706b3..3e2ec89a1d 100644 --- a/plugin/customcertificate/src/print_certificate.php +++ b/plugin/customcertificate/src/print_certificate.php @@ -186,7 +186,7 @@ foreach ($userList as $userInfo) { $all_user_info = DocumentManager::get_all_info_to_certificate( $studentId, $courseCode, - true + false ); $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 { if (!empty($sessionInfo)) { $dateInfo = api_get_local_time($sessionInfo['access_end_date']);