Course Progress: fix error when exporting progress when no thematic where set -refs BT#21016

pull/4884/head
NicoDucou 2 years ago
parent 5af1e66428
commit 396a1e6535
  1. 4
      main/course_progress/thematic_controller.php
  2. 2
      main/inc/lib/thematic.lib.php

@ -210,6 +210,10 @@ class ThematicController
$pdfOrientation = api_get_configuration_value('thematic_pdf_orientation');
$list = $thematic->get_thematic_list();
if ($list === false) {
header('Location: '.api_get_self().'?'.api_get_cidreq());
exit;
}
$item = [];
$listFinish = [];
foreach ($list as $theme) {

@ -310,6 +310,8 @@ class Thematic
$data[$row['id']] = $row;
}
}
} else {
return false;
}
return $data;

Loading…
Cancel
Save