Tracking: Avoid titles for empty tables in PDF - refs BT#18671

pull/3888/head
Angel Fernando Quiroz Campos 5 years ago
parent 6121789553
commit 615b90bd41
  1. 14
      main/mySpace/student_follow_export.php

@ -130,7 +130,7 @@ function generateHtmlForLearningPaths(int $studentId, array $courseInfo, int $se
{
$student = api_get_user_entity($studentId);
$html = Display::page_subheader2(get_lang('ToolLearnpath'));
$html = '';
$columnHeaders = [];
$columnHeaders['lp'] = get_lang('LearningPath');
@ -190,10 +190,6 @@ function generateHtmlForLearningPaths(int $studentId, array $courseInfo, int $se
$flatList = $lpList->get_flat_list();
if (count($lpCategories) > 1) {
$html .= Display::page_subheader3($item->getName());
}
$lpTable = [];
foreach ($flatList as $learnpath) {
@ -311,11 +307,19 @@ function generateHtmlForLearningPaths(int $studentId, array $courseInfo, int $se
continue;
}
if (count($lpCategories) > 1) {
$html .= Display::page_subheader3($item->getName());
}
array_unshift($lpTable, [$columnHeaders]);
$html .= Export::convert_array_to_html($lpTable);
}
if (!empty($html)) {
$html = Display::page_subheader2(get_lang('ToolLearnpath')).PHP_EOL.$html;
}
return $html;
}

Loading…
Cancel
Save