Fix to get config in Absence page

This commit is contained in:
mckmonster 2024-07-09 17:08:42 +02:00
parent b1260c72e2
commit 6aea33d65a

View file

@ -13,9 +13,10 @@ class AbsencesAction extends YesWikiAction
public function run()
{
$formId = $this->params->get('meeo_formId');
$eleveIdentifier = $this->params->get('meeo_eleveIdentifier');
$groupeEE = $this->params->get('meeo_groupeEE');
$meeo_config = $this->params->get('meeo');
$formId = $meeo_config['absences']['formId'];
$eleveIdentifier = 'listefiche'.$meeo_config['elevesFormId'];
$groupeEE = $meeo_config['groupeEE'];
$entryManager = $this->getService(EntryManager::class);
$userManager = $this->getService(UserManager::class);
@ -23,6 +24,7 @@ class AbsencesAction extends YesWikiAction
if ( $userManager->isInGroup($groupeEE, admincheck: false) ) {
$entries = $entryManager->search(['formsIds' => $formId]);
$grouped_entries = [];
foreach ($entries as $entry) {
$identifier = $entry[$eleveIdentifier];
$nom = $entryManager->getOne($identifier)['bf_nom'];