Documents added to accompanying course menu

This commit is contained in:
2021-09-09 16:42:53 +02:00
parent b11592fb6d
commit 5211fb2fe9
6 changed files with 18 additions and 8 deletions

View File

@@ -84,6 +84,9 @@ class DocumentAccompanyingCourseController extends AbstractController
['date' => 'DESC']
);
// dump($course);
// dump($documents);
// $event = new PrivacyEvent($course, [
// 'element_class' => AccompanyingCourseDocument::class,
// 'action' => 'index'
@@ -118,9 +121,9 @@ class DocumentAccompanyingCourseController extends AbstractController
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->denyAccessUnlessGranted(
'CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', $document,
'creation of this activity not allowed');
// $this->denyAccessUnlessGranted(
// 'CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', $document,
// 'creation of this activity not allowed');
$em = $this->getDoctrine()->getManager();
$em->persist($document);