From fb81ba6b6438c1ad787fa60e9a006bce8d04be9c Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 24 Jan 2020 12:48:07 +0100 Subject: [PATCH] Update from 1.11.x --- public/main/inc/lib/notification.lib.php | 2 ++ public/main/lp/learnpath.class.php | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/main/inc/lib/notification.lib.php b/public/main/inc/lib/notification.lib.php index 9c4434ec05..009a6805cd 100644 --- a/public/main/inc/lib/notification.lib.php +++ b/public/main/inc/lib/notification.lib.php @@ -528,6 +528,8 @@ class Notification extends Model 'data' => [ 'title' => $title, 'message' => $content, + 'body' => $content, + 'sound' => 'default', ], 'notification' => [ 'title' => $title, diff --git a/public/main/lp/learnpath.class.php b/public/main/lp/learnpath.class.php index a032768a37..28dd40c6bd 100644 --- a/public/main/lp/learnpath.class.php +++ b/public/main/lp/learnpath.class.php @@ -4556,15 +4556,17 @@ class learnpath $session = $em->getRepository('ChamiloCoreBundle:Session')->find($sessionId); } - $course = $courseRepo->find($courseId); - - // Subscribed groups to a LP - $subscribedGroupsInLp = $itemRepo->getGroupsSubscribedToItem( - TOOL_LEARNPATH_CATEGORY, - $category->getId(), - $course, - $session - ); + if ($courseId != 0) { + $course = $courseRepo->find($courseId); + + // Subscribed groups to a LP + $subscribedGroupsInLp = $itemRepo->getGroupsSubscribedToItem( + TOOL_LEARNPATH_CATEGORY, + $category->getId(), + $course, + $session + ); + } if (!empty($subscribedGroupsInLp)) { $groups = array_column($groups, 'iid');