Skip to content

Commit 396a1e6

Browse files
committed
Course Progress: fix error when exporting progress when no thematic where set -refs BT#21016
1 parent 5af1e66 commit 396a1e6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

main/course_progress/thematic_controller.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,10 @@ public function thematic($action)
210210
$pdfOrientation = api_get_configuration_value('thematic_pdf_orientation');
211211

212212
$list = $thematic->get_thematic_list();
213+
if ($list === false) {
214+
header('Location: '.api_get_self().'?'.api_get_cidreq());
215+
exit;
216+
}
213217
$item = [];
214218
$listFinish = [];
215219
foreach ($list as $theme) {

main/inc/lib/thematic.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ public static function get_thematic_list(
310310
$data[$row['id']] = $row;
311311
}
312312
}
313+
} else {
314+
return false;
313315
}
314316

315317
return $data;

0 commit comments

Comments
 (0)