Fixing Fatal Error when no course is defined -refs BT#16569

pull/3025/head
Nicolas Ducoulombier 6 years ago
parent eebf15d76c
commit bac5dfffc4
  1. 16
      main/lp/learnpath.class.php

@ -4634,13 +4634,15 @@ class learnpath
$course = $courseRepo->find($courseId);
// Subscribed groups to a LP
$subscribedGroupsInLp = $itemRepo->getGroupsSubscribedToItem(
TOOL_LEARNPATH_CATEGORY,
$category->getId(),
$course,
$session
);
if ($courseId!=0) {
// Subscribed groups to a LP
$subscribedGroupsInLp = $itemRepo->getGroupsSubscribedToItem(
TOOL_LEARNPATH_CATEGORY,
$category->getId(),
$course,
$session
);
}
if (!empty($subscribedGroupsInLp)) {
$noGroupSubscribed = false;

Loading…
Cancel
Save