diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index 7ae5c5f73..fef95d2b4 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -221,9 +221,11 @@ class AccompanyingCourseController extends Controller $activities = $this->getDoctrine()->getManager()->getRepository(Activity::class)->findBy( ['accompanyingPeriod' => $accompanyingCourse], - ['date' => 'DESC'], + ['date' => 'DESC', 'id' => 'DESC'], ); + $activities = array_slice($activities, 0, 3); + $works = $this->workRepository->findByAccompanyingPeriod( $accompanyingCourse, ['startDate' => 'DESC', 'endDate' => 'DESC'],