fix Create forms
This commit is contained in:
parent
852a962f6f
commit
1ffa436337
1 changed files with 7 additions and 9 deletions
|
@ -16,6 +16,8 @@ use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
|||
class CreateFormsCommand extends Command
|
||||
{
|
||||
protected $wiki;
|
||||
protected $absenceFormId;
|
||||
protected $noteFormId;
|
||||
protected $eleveFormId;
|
||||
protected $yunohostFormId;
|
||||
|
||||
|
@ -25,6 +27,8 @@ class CreateFormsCommand extends Command
|
|||
$this->wiki = $wiki;
|
||||
$params = $this->wiki->services->get(ParameterBagInterface::class);
|
||||
$meeo_config = $params->get('meeo');
|
||||
$this->absenceFormId = $meeo_config['absencesFormId'];
|
||||
$this->noteFormId = $meeo_config['notesFormId'];
|
||||
$this->eleveFormId = $meeo_config['elevesFormId'];
|
||||
$this->yunohostFormId = $meeo_config['yunohostFormId'];
|
||||
}
|
||||
|
@ -68,9 +72,8 @@ class CreateFormsCommand extends Command
|
|||
|
||||
private function absencesForm(FormManager $formManager, $meeo_config)
|
||||
{
|
||||
$formId = $meeo_config['absencesFormId'];
|
||||
$data = [
|
||||
"bn_id_nature" => $formId,
|
||||
"bn_id_nature" => $this->absenceFormId,
|
||||
"bn_label_nature" => "Absences",
|
||||
"bn_description" => "Absences des élèves",
|
||||
"bn_condition" => "",
|
||||
|
@ -108,12 +111,10 @@ EOT,
|
|||
|
||||
private function notesForm(FormManager $formManager, $meeo_config)
|
||||
{
|
||||
$formId = $meeo_config['notesFormId'];
|
||||
|
||||
$this->matiereList();
|
||||
|
||||
$data = [
|
||||
"bn_id_nature" => $formId,
|
||||
"bn_id_nature" => $this->noteFormId,
|
||||
"bn_label_nature" => "Notes",
|
||||
"bn_description" => "Notes des élèves",
|
||||
"bn_condition" => "",
|
||||
|
@ -151,13 +152,10 @@ EOT,
|
|||
}
|
||||
|
||||
private function elevesForms(FormManager $formManager, $meeo_config) {
|
||||
|
||||
$formId = $meeo_config['elevesFormId'];
|
||||
|
||||
$this->classeList();
|
||||
|
||||
$data = [
|
||||
"bn_id_nature" => $formId,
|
||||
"bn_id_nature" => $this->eleveFormId,
|
||||
"bn_label_nature" => "Eleves",
|
||||
"bn_description" => "Liste des élèves",
|
||||
"bn_condition" => "",
|
||||
|
|
Loading…
Reference in a new issue