Fix course/session "export links" to pdf document name see BT#15679

pull/2990/head
Julio 6 years ago
parent 8c27f9dcc9
commit a7ad5865d4
  1. 7
      main/link/link.php

@ -213,11 +213,16 @@ switch ($action) {
break; break;
case 'export': case 'export':
$content = Link::listLinksAndCategories($course_id, $session_id, $categoryId, $show, null, false); $content = Link::listLinksAndCategories($course_id, $session_id, $categoryId, $show, null, false);
$courseInfo = api_get_course_info_by_id($course_id);
if (!empty($session_id)) {
$sessionInfo = api_get_session_info($session_id);
$courseInfo['title'] = $courseInfo['title'].' '.$sessionInfo['name'];
}
$pdf = new PDF(); $pdf = new PDF();
$pdf->content_to_pdf( $pdf->content_to_pdf(
$content, $content,
null, null,
$courseInfo['code'].get_lang('Link'), $courseInfo['title'].'_'.get_lang('Link'),
$courseInfo['code'], $courseInfo['code'],
'D', 'D',
false, false,

Loading…
Cancel
Save