Tracking: Don't export empty LP tables - refs BT#18671

pull/3888/head
Angel Fernando Quiroz Campos 5 years ago
parent 474ffc42c1
commit a562622d50
  1. 8
      main/mySpace/student_follow_export.php

@ -194,7 +194,7 @@ function generateHtmlForLearningPaths(int $studentId, array $courseInfo, int $se
$html .= Display::page_subheader3($item->getName());
}
$lpTable = [$columnHeaders];
$lpTable = [];
foreach ($flatList as $learnpath) {
$lpId = $learnpath['lp_old_id'];
@ -307,6 +307,12 @@ function generateHtmlForLearningPaths(int $studentId, array $courseInfo, int $se
$lpTable[] = $contentToExport;
}
if (empty($lpTable)) {
continue;
}
array_unshift($lpTable, [$columnHeaders]);
$html .= Export::convert_array_to_html($lpTable);
}

Loading…
Cancel
Save