diff --git a/app/Resources/public/css/themes/chamilo/images/letterhead.png b/app/Resources/public/css/themes/chamilo/images/letterhead.png new file mode 100644 index 0000000000..0c2fd96026 Binary files /dev/null and b/app/Resources/public/css/themes/chamilo/images/letterhead.png differ diff --git a/main/inc/lib/banner.lib.php b/main/inc/lib/banner.lib.php index 3c9b95e344..4ed70f6bcd 100755 --- a/main/inc/lib/banner.lib.php +++ b/main/inc/lib/banner.lib.php @@ -184,18 +184,23 @@ function getCustomTabs() * * @param string $theme The name of the theme folder from web/css/themes/ * + * @param bool $responsive add class img-responsive * @return string HTML string with logo as an HTML element */ -function return_logo($theme = '') +function return_logo($theme = '', $responsive = true) { $siteName = api_get_setting('siteName'); + $class = 'img-responsive'; + if(!$responsive){ + $class=''; + } return ChamiloApi::getPlatformLogo( $theme, [ 'title' => $siteName, - 'class' => 'img-responsive', - 'id' => 'header-logo', + 'class' => $class, + 'id' => 'header-logo' ] ); } diff --git a/main/inc/lib/pdf.lib.php b/main/inc/lib/pdf.lib.php index d2c36c2fa5..d0b4793c9e 100755 --- a/main/inc/lib/pdf.lib.php +++ b/main/inc/lib/pdf.lib.php @@ -343,17 +343,17 @@ class PDF /** * Converts an html string to PDF. * - * @param string $document_html valid html - * @param string $css CSS content of a CSS file - * @param string $pdf_name pdf name - * @param string $course_code course code + * @param string $document_html valid html + * @param string $css CSS content of a CSS file + * @param string $pdf_name pdf name + * @param string $course_code course code * (if you are using html that are located in the document tool you must provide this) - * @param string $outputMode the MPDF output mode can be: - * @param bool $saveInFile + * @param string $outputMode the MPDF output mode can be: + * @param bool $saveInFile * @param string $fileToSave - * @param bool $returnHtml - * @param bool $addDefaultCss - * @param bool $completeHeader + * @param bool $returnHtml + * @param bool $addDefaultCss + * @param bool $completeHeader * * 'I' (print on standard output), * 'D' (download file) (this is the default value), @@ -361,6 +361,7 @@ class PDF * 'S' (return as a string) * * @return string Web path + * @throws MpdfException */ public function content_to_pdf( $document_html, @@ -461,7 +462,11 @@ class PDF } if (!empty($css)) { - $this->pdf->WriteHTML($css, 1); + try { + $this->pdf->WriteHTML($css, 1); + } catch (MpdfException $e) { + error_log($e); + } } if ($addDefaultCss) { @@ -472,11 +477,19 @@ class PDF ]; foreach ($basicStyles as $style) { $cssContent = file_get_contents($style); - $this->pdf->WriteHTML($cssContent, 1); + try { + $this->pdf->WriteHTML($cssContent, 1); + } catch (MpdfException $e) { + error_log($e); + } } } - $this->pdf->WriteHTML($document_html); + try { + $this->pdf->WriteHTML($document_html); + } catch (MpdfException $e) { + error_log($e); + } if (empty($pdf_name)) { $output_file = 'pdf_'.date('Y-m-d-his').'.pdf'; diff --git a/main/inc/lib/template.lib.php b/main/inc/lib/template.lib.php index 2511b713b3..d5142194b4 100755 --- a/main/inc/lib/template.lib.php +++ b/main/inc/lib/template.lib.php @@ -716,7 +716,9 @@ class Template // Logo $logo = return_logo($this->theme); + $logoPdf = return_logo($this->theme,false); $this->assign('logo', $logo); + $this->assign('logo_pdf', $logoPdf); $this->assign('show_media_element', 1); } diff --git a/main/mySpace/myStudents.php b/main/mySpace/myStudents.php index cd68101127..d7e76014cb 100755 --- a/main/mySpace/myStudents.php +++ b/main/mySpace/myStudents.php @@ -263,8 +263,10 @@ switch ($action) { $table->setCellContents(1, 2, $average); $courseTable = ''; + + if (!empty($courses)) { - $courseTable = '
| '.get_lang('Course').' | @@ -359,15 +361,19 @@ switch ($action) { $studentInfo = api_get_user_info($student_id); - $content = - '
|---|