diff --git a/public/img/document/certificates/default.html b/public/img/document/certificates/default.html
index a24382670a..988c82c745 100644
--- a/public/img/document/certificates/default.html
+++ b/public/img/document/certificates/default.html
@@ -1 +1,66 @@
-
((date_certificate)) This document certifies that ((user_firstname)) ((user_lastname)) has successfully passed the certification exam for the course ((course_title)) (((course_code))) - - - - - - - - - - - - - - - - - - -
((teacher_firstname)) ((teacher_lastname))
((gradebook_sitename)) - ((gradebook_institution))
\ No newline at end of file
+
+
+
+ Default certificate
+
+
+
+
+
+
+
+
+
+
+
+
+ ((date_certificate))
+
+
+
+ This document certifies that ((user_firstname))
+ ((user_lastname)) has successfully passed the certification exam for the course ((course_title))
+ (((course_code)))
+
+
+
+
+
+ - - - - - - - - - - - - - - - - - - -
+ ((teacher_firstname)) ((teacher_lastname))
+ ((gradebook_sitename)) - ((gradebook_institution))
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/public/main/inc/lib/pdf.lib.php b/public/main/inc/lib/pdf.lib.php
index f18e58d995..475a6897bc 100644
--- a/public/main/inc/lib/pdf.lib.php
+++ b/public/main/inc/lib/pdf.lib.php
@@ -399,7 +399,7 @@ class PDF
// Formatting the pdf
$courseInfo = api_get_course_info($courseCode);
- self::format_pdf($courseInfo, $completeHeader, $disablePagination);
+ $this->format_pdf($courseInfo, $completeHeader, $disablePagination);
$document_html = preg_replace($clean_search, '', $document_html);
$document_html = str_replace('../../', '', $document_html);
@@ -697,17 +697,15 @@ class PDF
}
}
- $organization = ChamiloApi::getPlatformLogo('', [], true);
+ $logoSrc = Container::getThemeHelper()->getAssetBase64Encoded('images/header-logo.png');
// Use custom logo image.
- $pdfLogo = api_get_setting('pdf_logo_header');
+ $pdfLogo = api_get_setting('platform.pdf_logo_header');
if ('true' === $pdfLogo) {
- $visualTheme = api_get_visual_theme();
- $img = api_get_path(SYS_CSS_PATH).'themes/'.$visualTheme.'/images/pdf_logo_header.png';
- if (file_exists($img)) {
- $organization = " ";
- }
+ $logoSrc = Container::getThemeHelper()->getAssetBase64Encoded('images/pdf_logo_header.png') ?: $logoSrc;
}
+ $organization = " ";
+
$view = new Template('', false, false, false, true, false, false);
$view->assign('teacher_name', $teachers);
$view->assign('organization', $organization);
@@ -789,7 +787,7 @@ class PDF
$this->pdf->SetHTMLFooter('');
} else {
if (empty($this->custom_header)) {
- self::set_header($courseInfo);
+ $this->set_header($courseInfo);
} else {
$this->pdf->SetHTMLHeader($this->custom_header, 'E');
$this->pdf->SetHTMLHeader($this->custom_header, 'O');
diff --git a/public/main/inc/lib/template.lib.php b/public/main/inc/lib/template.lib.php
index 4354063cd5..ddf4ecdfed 100644
--- a/public/main/inc/lib/template.lib.php
+++ b/public/main/inc/lib/template.lib.php
@@ -1269,7 +1269,12 @@ class Template
$portalImageMeta .= ' '."\n";
}
} else {
- $logo = ChamiloApi::getPlatformLogoPath($this->theme);
+ $logo = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.svg');
+
+ if (empty($logo)) {
+ $logo = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.png');
+ }
+
if (!empty($logo)) {
$portalImageMeta = ' '."\n";
$portalImageMeta .= ' '."\n";
diff --git a/public/main/my_space/lp_tracking.php b/public/main/my_space/lp_tracking.php
index 128ce0dfd1..2e2963869b 100644
--- a/public/main/my_space/lp_tracking.php
+++ b/public/main/my_space/lp_tracking.php
@@ -240,24 +240,15 @@ switch ($action) {
$pdf = new PDF('A4', 'P', ['margin_footer' => 4, 'top' => 40, 'bottom' => 25]);
$table = new HTML_Table(['class' => 'table', 'style' => 'display: block; margin-bottom: 50px;']);
- $logo = ChamiloApi::getPlatformLogo(
- api_get_visual_theme(),
- [
- 'title' => '',
- 'style' => 'max-width:180px, margin-bottom: 100px;',
- 'id' => 'header-logo',
- ]
- );
- $table->setCellContents(0, 0, $logo);
$addLogo = (isset($_GET['add_logo']) && 1 === (int) $_GET['add_logo']);
if ($addLogo) {
$secondLogo = api_get_path(SYS_PATH).'custompages/url-images/'.api_get_current_access_url_id().'_url_image_2.png';
$logo2 = Display::img($secondLogo, null, ['style' => 'height:70px;']);
- $table->setCellContents(0, 1, $logo2);
+ $table->setCellContents(0, 0, $logo2);
}
- $table->setCellAttributes(0, 1, ['style' => 'display:block;float:right;text-align:right']);
+ $table->setCellAttributes(0, 0, ['style' => 'display:block;float:right;text-align:right']);
$pdf->set_custom_header($table->toHtml());
$background = api_get_path(SYS_PATH).'custompages/url-images/'.api_get_current_access_url_id().'_pdf_background.png';
diff --git a/public/main/template/default/my_space/pdf_export_student.html.twig b/public/main/template/default/my_space/pdf_export_student.html.twig
index acafd30b41..598a2d1241 100644
--- a/public/main/template/default/my_space/pdf_export_student.html.twig
+++ b/public/main/template/default/my_space/pdf_export_student.html.twig
@@ -1,7 +1,3 @@
-
-
-
-
{{ title }}
diff --git a/public/plugin/buycourses/src/invoice.php b/public/plugin/buycourses/src/invoice.php
index f45c7d6f49..52b2c33710 100644
--- a/public/plugin/buycourses/src/invoice.php
+++ b/public/plugin/buycourses/src/invoice.php
@@ -39,18 +39,6 @@ $htmlText .= ' ';
$htmlText .= ' ';
$htmlText .= '';
-$organization = ChamiloApi::getPlatformLogo('', [], true);
-// Use custom logo image.
-$pdfLogo = api_get_setting('pdf_logo_header');
-if ('true' === $pdfLogo) {
- $visualTheme = api_get_visual_theme();
- $img = api_get_path(SYS_CSS_PATH).'themes/'.$visualTheme.'/images/pdf_logo_header.png';
- if (file_exists($img)) {
- $organization = " ";
- }
-}
-$htmlText .= $organization;
-
// Seller and customer info
$htmlText .= '';
$htmlText .= '';
diff --git a/src/CoreBundle/Component/Utils/ChamiloApi.php b/src/CoreBundle/Component/Utils/ChamiloApi.php
index 7a109f9de8..17ce0f43d1 100644
--- a/src/CoreBundle/Component/Utils/ChamiloApi.php
+++ b/src/CoreBundle/Component/Utils/ChamiloApi.php
@@ -69,6 +69,8 @@ class ChamiloApi
/**
* Get the platform logo path.
*
+ * @deprecated
+ *
* @throws Exception
*/
public static function getPlatformLogoPath(
@@ -152,7 +154,12 @@ class ChamiloApi
bool $getSysPath = false,
bool $forcedGetter = false
): string {
- $logoPath = self::getPlatformLogoPath($theme, $getSysPath, $forcedGetter);
+ $logoPath = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.svg');
+
+ if (empty($logo)) {
+ $logoPath = Container::getThemeHelper()->getThemeAssetUrl('images/header-logo.png');
+ }
+
$institution = api_get_setting('Institution');
$institutionUrl = api_get_setting('InstitutionUrl');
$siteName = api_get_setting('siteName');