Gradebook: Fix theme image paths in certificates - refs BT#22231

pull/5961/head
Angel Fernando Quiroz Campos 9 months ago
parent f915007524
commit 406e0dd5f4
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 10
      main/inc/lib/pdf.lib.php

@ -1010,6 +1010,7 @@ class PDF
$sysCodePath = api_get_path(SYS_CODE_PATH);
$sysCoursePath = api_get_path(SYS_COURSE_PATH);
$sysUploadPath = api_get_path(SYS_UPLOAD_PATH);
$sysPath = api_get_path(SYS_PATH);
$documentPath = $courseInfo ? $sysCoursePath.$courseInfo['path'].'/document/' : '';
@ -1065,6 +1066,15 @@ class PDF
continue;
}
if (strpos($src, '/web/css/themes/') === 0) {
$element->setAttribute(
'src',
str_replace('/web/css/themes/', $sysPath.'web/css/themes/', $src)
);
continue;
}
if (empty($courseInfo)) {
continue;
}

Loading…
Cancel
Save