diff --git a/public/main/inc/lib/api.lib.php b/public/main/inc/lib/api.lib.php
index 8799f92c71..c5439e9288 100644
--- a/public/main/inc/lib/api.lib.php
+++ b/public/main/inc/lib/api.lib.php
@@ -6263,11 +6263,16 @@ function api_get_css($file, $media = 'screen')
return ''."\n";
}
-function api_get_bootstrap_and_font_awesome($returnOnlyPath = false)
+function api_get_bootstrap_and_font_awesome($returnOnlyPath = false, $returnFileLocation = false)
{
$url = api_get_path(WEB_PUBLIC_PATH).'build/css/bootstrap.css';
+
if ($returnOnlyPath) {
- return api_get_path(SYS_PUBLIC_PATH).'build/css/bootstrap.css';
+ if ($returnFileLocation) {
+ return api_get_path(SYS_PUBLIC_PATH).'build/css/bootstrap.css';
+ }
+
+ return $url;
}
return ''."\n";
diff --git a/public/main/inc/lib/pdf.lib.php b/public/main/inc/lib/pdf.lib.php
index 795b4a559f..5e8b1ebdd5 100644
--- a/public/main/inc/lib/pdf.lib.php
+++ b/public/main/inc/lib/pdf.lib.php
@@ -475,7 +475,7 @@ class PDF
if ($addDefaultCss) {
$basicStyles = [
- api_get_bootstrap_and_font_awesome(true),
+ api_get_bootstrap_and_font_awesome(true, true),
api_get_path(SYS_PUBLIC_PATH).'build/css/app.css',
api_get_path(SYS_PUBLIC_PATH).'build/css/themes/'.api_get_visual_theme().'/default.css',
];
diff --git a/src/CoreBundle/Controller/EditorController.php b/src/CoreBundle/Controller/EditorController.php
index ae1e3033f2..c413f007c6 100644
--- a/src/CoreBundle/Controller/EditorController.php
+++ b/src/CoreBundle/Controller/EditorController.php
@@ -224,7 +224,7 @@ class EditorController extends BaseController
$params = [
// @todo replace api_get_bootstrap_and_font_awesome
- 'bootstrap_css' => api_get_bootstrap_and_font_awesome(true),
+ 'bootstrap_css' => api_get_bootstrap_and_font_awesome(true, false),
'css_editor' => ChamiloApi::getEditorBlockStylePath(),
'more_buttons_in_max_mode' => $moreButtonsInMaximizedMode,
'type' => $type,