From 139a409a17e7b76447fb7991985e90c381708d80 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 7 Mar 2022 16:51:48 -0500 Subject: [PATCH] Minor: Format code and fix save cache item --- public/main/gradebook/lib/be/exerciselink.class.php | 4 +++- src/CoreBundle/Controller/CourseController.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/public/main/gradebook/lib/be/exerciselink.class.php b/public/main/gradebook/lib/be/exerciselink.class.php index dc6b12059f..9d59194efe 100644 --- a/public/main/gradebook/lib/be/exerciselink.class.php +++ b/public/main/gradebook/lib/be/exerciselink.class.php @@ -295,7 +295,9 @@ class ExerciseLink extends AbstractLink return $result; } else { if ($cacheAvailable) { - $cacheDriver->save($key, null); + $cacheItem = $cache->getItem($key); + $cacheItem->set(null); + $cache->save($cacheItem); } return null; diff --git a/src/CoreBundle/Controller/CourseController.php b/src/CoreBundle/Controller/CourseController.php index 8ed7206769..0e9243bd4e 100644 --- a/src/CoreBundle/Controller/CourseController.php +++ b/src/CoreBundle/Controller/CourseController.php @@ -49,8 +49,9 @@ use UserManager; #[Route('/course')] class CourseController extends ToolBaseController { - public function __construct(private SerializerInterface $serializer) - { + public function __construct( + private SerializerInterface $serializer + ) { } #[Route('/{cid}/checkLegal.json', name: 'chamilo_core_course_check_legal_json')]