reorganisation du code pour les bulletins

This commit is contained in:
mckmonster 2024-07-20 09:15:55 +02:00
parent ebf108e354
commit 082e3232de
6 changed files with 13 additions and 8 deletions

View file

@ -15,6 +15,7 @@ class NotesAction extends YesWikiAction
public function run() public function run()
{ {
$noteManager = $this->getService(NoteManager::class); $noteManager = $this->getService(NoteManager::class);
$noteManager->viewBulletins(); // $noteManager->viewBulletins();
$noteManager->viewCreateNotes();
} }
} }

View file

@ -1,8 +1,8 @@
<?php <?php
namespace YesWiki\Meeo; namespace YesWiki\Meeo\Bulletin;
include 'tools/meeo/libs/Matiere.lib.php'; include 'tools/meeo/libs/bulletin/Matiere.lib.php';
use YesWiki\Bazar\Service\ListManager; use YesWiki\Bazar\Service\ListManager;

View file

@ -1,8 +1,8 @@
<?php <?php
namespace YesWiki\Meeo; namespace YesWiki\Meeo\Bulletin;
include 'tools/meeo/libs/Note.lib.php'; include 'tools/meeo/libs/bulletin/Note.lib.php';
use YesWiki\Bazar\Service\EntryManager; use YesWiki\Bazar\Service\EntryManager;

View file

@ -1,6 +1,6 @@
<?php <?php
namespace YesWiki\Meeo; namespace YesWiki\Meeo\Bulletin;
class Note { class Note {
private $intitule; private $intitule;

View file

@ -7,7 +7,7 @@ use YesWiki\Bazar\Service\EntryManager;
use YesWiki\Bazar\Service\ListManager; use YesWiki\Bazar\Service\ListManager;
use YesWiki\Core\Service\UserManager; use YesWiki\Core\Service\UserManager;
use YesWiki\Wiki; use YesWiki\Wiki;
use YesWiki\Meeo\Bulletin; use YesWiki\Meeo\Bulletin\Bulletin;
class NoteManager { class NoteManager {
protected $wiki; protected $wiki;
@ -35,7 +35,7 @@ class NoteManager {
$eleves = $this->entryManager->search(['formsIds' => $meeo_config['elevesFormId']]); $eleves = $this->entryManager->search(['formsIds' => $meeo_config['elevesFormId']]);
$entries = $this->entryManager->search(['formsIds' => $formId]); $entries = $this->entryManager->search(['formsIds' => $formId]);
include 'tools/meeo/libs/Bulletin.lib.php'; include 'tools/meeo/libs/bulletin/Bulletin.lib.php';
$bulletins = []; $bulletins = [];
foreach ( $eleves as $eleve) { foreach ( $eleves as $eleve) {
@ -55,4 +55,8 @@ class NoteManager {
]); ]);
} }
} }
public function viewCreateNotes() {
return $this->wiki->render('@meeo/edu_create_notes.twig', []);
}
} }

View file