Minor: Format code and fix save cache item

pull/4197/head
Angel Fernando Quiroz Campos 3 years ago
parent 095661df32
commit 139a409a17
  1. 4
      public/main/gradebook/lib/be/exerciselink.class.php
  2. 5
      src/CoreBundle/Controller/CourseController.php

@ -295,7 +295,9 @@ class ExerciseLink extends AbstractLink
return $result; return $result;
} else { } else {
if ($cacheAvailable) { if ($cacheAvailable) {
$cacheDriver->save($key, null); $cacheItem = $cache->getItem($key);
$cacheItem->set(null);
$cache->save($cacheItem);
} }
return null; return null;

@ -49,8 +49,9 @@ use UserManager;
#[Route('/course')] #[Route('/course')]
class CourseController extends ToolBaseController 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')] #[Route('/{cid}/checkLegal.json', name: 'chamilo_core_course_check_legal_json')]

Loading…
Cancel
Save