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
|
class CreateFormsCommand extends Command
|
||||||
{
|
{
|
||||||
protected $wiki;
|
protected $wiki;
|
||||||
|
protected $absenceFormId;
|
||||||
|
protected $noteFormId;
|
||||||
protected $eleveFormId;
|
protected $eleveFormId;
|
||||||
protected $yunohostFormId;
|
protected $yunohostFormId;
|
||||||
|
|
||||||
|
@ -25,6 +27,8 @@ class CreateFormsCommand extends Command
|
||||||
$this->wiki = $wiki;
|
$this->wiki = $wiki;
|
||||||
$params = $this->wiki->services->get(ParameterBagInterface::class);
|
$params = $this->wiki->services->get(ParameterBagInterface::class);
|
||||||
$meeo_config = $params->get('meeo');
|
$meeo_config = $params->get('meeo');
|
||||||
|
$this->absenceFormId = $meeo_config['absencesFormId'];
|
||||||
|
$this->noteFormId = $meeo_config['notesFormId'];
|
||||||
$this->eleveFormId = $meeo_config['elevesFormId'];
|
$this->eleveFormId = $meeo_config['elevesFormId'];
|
||||||
$this->yunohostFormId = $meeo_config['yunohostFormId'];
|
$this->yunohostFormId = $meeo_config['yunohostFormId'];
|
||||||
}
|
}
|
||||||
|
@ -68,9 +72,8 @@ class CreateFormsCommand extends Command
|
||||||
|
|
||||||
private function absencesForm(FormManager $formManager, $meeo_config)
|
private function absencesForm(FormManager $formManager, $meeo_config)
|
||||||
{
|
{
|
||||||
$formId = $meeo_config['absencesFormId'];
|
|
||||||
$data = [
|
$data = [
|
||||||
"bn_id_nature" => $formId,
|
"bn_id_nature" => $this->absenceFormId,
|
||||||
"bn_label_nature" => "Absences",
|
"bn_label_nature" => "Absences",
|
||||||
"bn_description" => "Absences des élèves",
|
"bn_description" => "Absences des élèves",
|
||||||
"bn_condition" => "",
|
"bn_condition" => "",
|
||||||
|
@ -108,12 +111,10 @@ EOT,
|
||||||
|
|
||||||
private function notesForm(FormManager $formManager, $meeo_config)
|
private function notesForm(FormManager $formManager, $meeo_config)
|
||||||
{
|
{
|
||||||
$formId = $meeo_config['notesFormId'];
|
|
||||||
|
|
||||||
$this->matiereList();
|
$this->matiereList();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"bn_id_nature" => $formId,
|
"bn_id_nature" => $this->noteFormId,
|
||||||
"bn_label_nature" => "Notes",
|
"bn_label_nature" => "Notes",
|
||||||
"bn_description" => "Notes des élèves",
|
"bn_description" => "Notes des élèves",
|
||||||
"bn_condition" => "",
|
"bn_condition" => "",
|
||||||
|
@ -151,13 +152,10 @@ EOT,
|
||||||
}
|
}
|
||||||
|
|
||||||
private function elevesForms(FormManager $formManager, $meeo_config) {
|
private function elevesForms(FormManager $formManager, $meeo_config) {
|
||||||
|
|
||||||
$formId = $meeo_config['elevesFormId'];
|
|
||||||
|
|
||||||
$this->classeList();
|
$this->classeList();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
"bn_id_nature" => $formId,
|
"bn_id_nature" => $this->eleveFormId,
|
||||||
"bn_label_nature" => "Eleves",
|
"bn_label_nature" => "Eleves",
|
||||||
"bn_description" => "Liste des élèves",
|
"bn_description" => "Liste des élèves",
|
||||||
"bn_condition" => "",
|
"bn_condition" => "",
|
||||||
|
|
Loading…
Reference in a new issue