From eabc7168a954952935e7c1835e1c988f4d74f06d Mon Sep 17 00:00:00 2001 From: mckmonster Date: Fri, 2 Aug 2024 18:24:43 +0200 Subject: [PATCH] add log --- commands/CreateFormsCommand.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/CreateFormsCommand.php b/commands/CreateFormsCommand.php index 9b71463..6797db6 100644 --- a/commands/CreateFormsCommand.php +++ b/commands/CreateFormsCommand.php @@ -17,7 +17,7 @@ class CreateFormsCommand extends Command { protected $wiki; protected $absenceFormId; - protected $noteFormId; + protected $notesFormId; protected $eleveFormId; protected $yunohostFormId; @@ -28,7 +28,7 @@ class CreateFormsCommand extends Command $params = $this->wiki->services->get(ParameterBagInterface::class); $meeo_config = $params->get('meeo'); $this->absenceFormId = $meeo_config['absencesFormId']; - $this->noteFormId = $meeo_config['notesFormId']; + $this->notesFormId = $meeo_config['notesFormId']; $this->eleveFormId = $meeo_config['elevesFormId']; $this->yunohostFormId = $meeo_config['yunohostFormId']; } @@ -63,6 +63,7 @@ class CreateFormsCommand extends Command } private function createOrUpdate($formManager, $formId, $data) { + echo $formId.": ".$data['bn_label_nature']; $existingForm = $formManager->getOne($formId); if ($existingForm) return $formManager->update($data); @@ -114,7 +115,7 @@ EOT, $this->matiereList(); $data = [ - "bn_id_nature" => $this->noteFormId, + "bn_id_nature" => $this->notesFormId, "bn_label_nature" => "Notes", "bn_description" => "Notes des élèves", "bn_condition" => "", @@ -134,7 +135,7 @@ EOT, "bn_only_one_entry_message" => null ]; - $this->createOrUpdate($formManager, $this->noteFormId, $data); + $this->createOrUpdate($formManager, $this->notesFormId, $data); } private function classeList()