From 082e3232de2173afd3282b4ea6b959a5ea9a573f Mon Sep 17 00:00:00 2001 From: mckmonster Date: Sat, 20 Jul 2024 09:15:55 +0200 Subject: [PATCH] reorganisation du code pour les bulletins --- actions/NotesAction.php | 3 ++- libs/{ => bulletin}/Bulletin.lib.php | 4 ++-- libs/{ => bulletin}/Matiere.lib.php | 4 ++-- libs/{ => bulletin}/Note.lib.php | 2 +- services/NoteManager.php | 8 ++++++-- templates/edu_create_notes.twig | 0 6 files changed, 13 insertions(+), 8 deletions(-) rename libs/{ => bulletin}/Bulletin.lib.php (93%) rename libs/{ => bulletin}/Matiere.lib.php (93%) rename libs/{ => bulletin}/Note.lib.php (92%) create mode 100644 templates/edu_create_notes.twig diff --git a/actions/NotesAction.php b/actions/NotesAction.php index 46b409e..e306fce 100644 --- a/actions/NotesAction.php +++ b/actions/NotesAction.php @@ -15,6 +15,7 @@ class NotesAction extends YesWikiAction public function run() { $noteManager = $this->getService(NoteManager::class); - $noteManager->viewBulletins(); + // $noteManager->viewBulletins(); + $noteManager->viewCreateNotes(); } } diff --git a/libs/Bulletin.lib.php b/libs/bulletin/Bulletin.lib.php similarity index 93% rename from libs/Bulletin.lib.php rename to libs/bulletin/Bulletin.lib.php index 11a25f8..e806f1d 100644 --- a/libs/Bulletin.lib.php +++ b/libs/bulletin/Bulletin.lib.php @@ -1,8 +1,8 @@ entryManager->search(['formsIds' => $meeo_config['elevesFormId']]); $entries = $this->entryManager->search(['formsIds' => $formId]); - include 'tools/meeo/libs/Bulletin.lib.php'; + include 'tools/meeo/libs/bulletin/Bulletin.lib.php'; $bulletins = []; foreach ( $eleves as $eleve) { @@ -55,4 +55,8 @@ class NoteManager { ]); } } + + public function viewCreateNotes() { + return $this->wiki->render('@meeo/edu_create_notes.twig', []); + } } \ No newline at end of file diff --git a/templates/edu_create_notes.twig b/templates/edu_create_notes.twig new file mode 100644 index 0000000..e69de29