src/CoreBundle/Entity/Student.php line 22

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use AppBundle\Form\Model\RemedialModuleModel;
  4. use CoreBundle\Entity\Common\MmppUserInterface;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use TheCodingMachine\GraphQLite\Annotations\Field;
  11. use TheCodingMachine\GraphQLite\Annotations\Type;
  12. /**
  13.  * Student
  14.  *
  15.  * @ORM\Table(name="note_student")
  16.  * @ORM\Entity(repositoryClass="CoreBundle\Repository\StudentRepository")
  17.  */
  18. #[Type]
  19. class Student implements MmppUserInterface\Serializable
  20. {
  21.     /**
  22.      * @var int
  23.      *
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="IDENTITY")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @ORM\Column(type="string")
  31.      * @Assert\NotBlank()
  32.      */
  33.     private $name;
  34.     /**
  35.      * @ORM\Column(type="string", nullable=true, length=40)
  36.      */
  37.     private $password;
  38.     /**
  39.      * @ORM\Column(type="string", nullable=true, length=16)
  40.      * @var string
  41.      */
  42.     private $plainPassword;
  43.     /**
  44.      * @ORM\Column(type="string")
  45.      * @Assert\NotBlank()
  46.      * @Assert\Email()
  47.      */
  48.     private $email;
  49.     /**
  50.      * @ORM\Column(type="string", nullable=false, length=32, options={"default": "primant"})
  51.      * @var string
  52.      */
  53.     private $recidive;
  54.     /**
  55.      * @ORM\Column(type="boolean", nullable=true, options={"default": false})
  56.      * @var boolean
  57.      */
  58.     private $remote;
  59.     /**
  60.      * @ORM\Column(type="string", nullable=false, length=10, options={"default": "mr"})
  61.      * @var string
  62.      */
  63.     private $civil;
  64.     /**
  65.      * @ORM\Column(type="string", nullable=true)
  66.      * @var string
  67.      */
  68.     private $commercial;
  69.     /**
  70.      * @ORM\Column(type="string", nullable=false)
  71.      * @Assert\NotBlank()
  72.      * @var string
  73.      */
  74.     private $address;
  75.     /**
  76.      * @ORM\Column(type="string", nullable=false, length=100)
  77.      * @Assert\NotBlank()
  78.      * @var string
  79.      */
  80.     private $city;
  81.     /**
  82.      * @ORM\Column(type="string", nullable=false, length=10)
  83.      * @Assert\NotBlank()
  84.      * @var string
  85.      */
  86.     private $cp;
  87.     /**
  88.      * @ORM\Column(type="string", nullable=true)
  89.      * @var string
  90.      */
  91.     private $bac;
  92.     /**
  93.      * @ORM\Column(type="string", nullable=true)
  94.      * @var string
  95.      */
  96.     private $stage;
  97.     /**
  98.      * @ORM\Column(type="boolean", nullable=false, options={"default": false})
  99.      * @var bool
  100.      */
  101.     private $isPau;
  102.     /**
  103.      * @ORM\Column(type="string", nullable=true)
  104.      * @var string
  105.      */
  106.     private $numero;
  107.     /**
  108.      * @ORM\ManyToOne(targetEntity="EdtGroupFacTd", inversedBy="students")
  109.      * @ORM\JoinColumn(referencedColumnName="id", onDelete="SET NULL")
  110.      *
  111.      * @var EdtGroupFacTd
  112.      */
  113.     private $groupFac;
  114.     /**
  115.      * Can connect
  116.      *
  117.      * @ORM\Column(type="boolean", options={"default": true})
  118.      */
  119.     private $active;
  120.     /**
  121.      * Visible in rankings/marks
  122.      *
  123.      * @ORM\Column(type="boolean", options={"default": true})
  124.      */
  125.     private $visible;
  126.     /**
  127.      * @ORM\Column(type="boolean", options={"default": false})
  128.      */
  129.     private $passwordSend;
  130.     /**
  131.      * @ORM\Column(type="boolean", options={"default": false})
  132.      */
  133.     private $charteAccepted;
  134.     /**
  135.      * @ORM\Column(type="string", nullable=true)
  136.      */
  137.     private $avatar;
  138.     /**
  139.      * @ORM\Column(type="datetime", name="logged_on", nullable=true)
  140.      */
  141.     private $loggedOn;
  142.     /**
  143.      * @ORM\Column(type="datetime", name="last_activity", nullable=true)
  144.      */
  145.     private $lastActivity;
  146.     /**
  147.      * @ORM\Column(type="string", name="doub_moyenne", nullable=true)
  148.      * @var string
  149.      */
  150.     private $doubMoyenne;
  151.     /**
  152.      * @ORM\Column(type="boolean", name="oral_exam", nullable=true)
  153.      * @var boolean
  154.      */
  155.     private $oralExam;
  156.     /**
  157.      * @ORM\Column(type="datetime", name="date_oral_exam", nullable=true)
  158.      */
  159.     private $dateOralExam;
  160.     /**
  161.      * @ORM\Column(type="string", name="phone_number", nullable=true)
  162.      * @var string
  163.      */
  164.     private $phoneNumber;
  165.     /**
  166.      * @ORM\Column(type="string", name="parent_phone_number", nullable=true)
  167.      * @var string
  168.      */
  169.     private $parentPhoneNumber;
  170.     /**
  171.      * @ORM\ManyToOne(targetEntity="Periode", inversedBy="students")
  172.      * @ORM\JoinColumn(name="periode_id", referencedColumnName="id", nullable=false)
  173.      */
  174.     private $periode;
  175.     /**
  176.      * @ORM\ManyToOne(targetEntity="Branche", inversedBy="students")
  177.      * @ORM\JoinColumn(name="branche_id", referencedColumnName="id", nullable=false)
  178.      */
  179.     private $branche;
  180.     /**
  181.      * @ORM\ManyToOne(targetEntity="GroupStudent", inversedBy="students")
  182.      * @ORM\JoinColumn(name="group_id", referencedColumnName="id")
  183.      */
  184.     private $group;
  185.     /**
  186.      * @ORM\OneToMany(targetEntity="Post", mappedBy="student")
  187.      * @ORM\OrderBy({"createdOn" = "DESC"})
  188.      */
  189.     private $posts;
  190.     /**
  191.      * @ORM\Column(type="text", nullable=true)
  192.      */
  193.     private ?string $remedialComment;
  194.     /**
  195.      * @ORM\Column(type="boolean", nullable=true)
  196.      */
  197.     private ?bool $remedialDone;
  198.     /**
  199.      * @ORM\OneToMany(targetEntity="StudentSecteur", mappedBy="student", cascade={"persist", "remove", "merge"}, orphanRemoval=true)
  200.      * @var ArrayCollection
  201.      */
  202.     private $studentSecteurs;
  203.     /**
  204.      * @var ArrayCollection
  205.      */
  206.     private $secteurQuad1;
  207.     /**
  208.      * @var ArrayCollection
  209.      */
  210.     private $secteurQuad2;
  211.     /**
  212.      * @ORM\ManyToOne(targetEntity="Category", inversedBy="studentsConnected")
  213.      * @ORM\JoinColumn(name="last_category_id", referencedColumnName="id", onDelete="SET NULL")
  214.      */
  215.     private $lastCategory;
  216.     /**
  217.      * @ORM\OneToMany(targetEntity="FileStudent", mappedBy="student")
  218.      */
  219.     private $fileStudents;
  220.     /**
  221.      * @ORM\OneToMany(targetEntity="NoteTestStudent", mappedBy="student")
  222.      */
  223.     private $noteTestStudents;
  224.     /**
  225.      * @ORM\OneToMany(targetEntity="Remedial", mappedBy="student", cascade={"persist", "remove"})
  226.      */
  227.     private Collection $remedials;
  228.     /**
  229.      * @ORM\OneToMany(targetEntity="NoteAbsence", mappedBy="student")
  230.      */
  231.     private $absences;
  232.     /**
  233.      * Pour faire la distinction entre tutor et student
  234.      * @var string
  235.      */
  236.     public $class 'student';
  237.     /**
  238.      * @Gedmo\Timestampable(on="update")
  239.      * @ORM\Column(type="datetime", nullable=true)
  240.      */
  241.     private $updatedOn;
  242.     /**
  243.      * @Gedmo\Timestampable(on="create")
  244.      * @ORM\Column(type="datetime", nullable=true)
  245.      */
  246.     private $createdOn;
  247.     /**
  248.      * @ORM\Column(type="string", nullable=true)
  249.      * @var string
  250.      */
  251.     private $photo;
  252.     /**
  253.      * @ORM\Column(type="string", nullable=true)
  254.      * @var string
  255.      */
  256.     #[Field]
  257.     private $firebaseToken;
  258.     /**
  259.      * @ORM\Column(type="datetime_immutable", nullable=true)
  260.      * @var \DateTimeImmutable
  261.      */
  262.     #[Field]
  263.     private $firebaseTokenDate;
  264.     /**
  265.      * @ORM\Column(type="string", nullable=true)
  266.      */
  267.     private ?string $qrCode;
  268.     /**
  269.      * @ORM\Column(type="datetime_immutable", nullable=true)
  270.      */
  271.     private ?\DateTimeImmutable $qrCodeDate;
  272.     /**
  273.      * @ORM\OneToMany(targetEntity="QuestionnaireQcmStudent", mappedBy="student")
  274.      * @var ArrayCollection
  275.      */
  276.     private $qcmStudents;
  277.     /**
  278.      * Nouvelle version
  279.      *
  280.      * @var ArrayCollection
  281.      * @ORM\ManyToMany(targetEntity="Module", inversedBy="students")
  282.      * @ORM\JoinTable(name="students_modules")
  283.      * @ORM\OrderBy({"name" = "ASC"})
  284.      */
  285.     private $modules;
  286.     /**
  287.      * Nouvelle version
  288.      *
  289.      * @var ArrayCollection
  290.      * @ORM\ManyToMany(targetEntity="MinorOption", inversedBy="students")
  291.      * @ORM\JoinTable(name="students_minor_options")
  292.      */
  293.     private $minorOptions;
  294.     /**
  295.      * @ORM\OneToMany(targetEntity="StudentDocFile", mappedBy="student", cascade={"persist", "remove"}, orphanRemoval=true)
  296.      * @var ArrayCollection
  297.      */
  298.     private $studentDocFiles;
  299.     /**
  300.      * @ORM\OneToMany(targetEntity="RankingMark", mappedBy="student")
  301.      */
  302.     private Collection $marks;
  303.     /**
  304.      * @var array
  305.      */
  306.     private $docFilesQ1;
  307.     /**
  308.      * @var array
  309.      */
  310.     private $docFilesQ2;
  311.     /** @var array RemedialModuleModel[] */
  312.     private array $remedialModuleModels;
  313.     public function __construct()
  314.     {
  315.         $this->posts = new ArrayCollection();
  316.         $this->secteurQuad1 = new ArrayCollection();
  317.         $this->secteurQuad2 = new ArrayCollection();
  318.         $this->studentSecteurs = new ArrayCollection();
  319.         $this->fileStudents = new ArrayCollection();
  320.         $this->noteTestStudents = new ArrayCollection();
  321.         $this->absences = new ArrayCollection();
  322.         $this->qcmStudents = new ArrayCollection();
  323.         $this->modules = new ArrayCollection();
  324.         $this->minorOptions = new ArrayCollection();
  325.         $this->studentDocFiles = new ArrayCollection();
  326.         $this->docFilesQ1 = [];
  327.         $this->docFilesQ2 = [];
  328.         $this->marks = new ArrayCollection();
  329.         $this->remedials = new ArrayCollection();
  330.     }
  331.     #[Field(outputType"ID")]
  332.     public function getId(): ?int
  333.     {
  334.         return $this->id;
  335.     }
  336.     #[Field]
  337.     public function getName(): string
  338.     {
  339.         return $this->name;
  340.     }
  341.     public function setName(?string $name): self
  342.     {
  343.         $this->name $name;
  344.         return $this;
  345.     }
  346.     public function getForumActive()
  347.     {
  348.         return $this->isEnabled();
  349.     }
  350.     public function getUsername()
  351.     {
  352.         return $this->email;
  353.     }
  354.     public function getUserIdentifier(): string
  355.     {
  356.         return $this->email;
  357.     }
  358.     public function getRoles()
  359.     {
  360.         return array('ROLE_USER');
  361.     }
  362.     public function eraseCredentials()
  363.     {
  364.     }
  365.     public function isEnabled()
  366.     {
  367.         return $this->active;
  368.     }
  369.     /**
  370.      * @return Secteur[]
  371.      * @todo interface dans MMPPUserInterface
  372.      */
  373.     #[Field]
  374.     public function getSecteurs(?string $quad null)
  375.     {
  376.         $secteurs= [];
  377.         foreach ($this->studentSecteurs as $studentSecteur) {
  378.             if ((null === $quad) || ($quad == $studentSecteur->getQuad())) {
  379.                 /** @var Secteur $secteur */
  380.                 $secteur $studentSecteur->getSecteur();
  381.                 $secteurs[$secteur->getId()] = $secteur;
  382.             }
  383.         }
  384.         return array_values($secteurs);
  385.     }
  386.     /**
  387.      * @param Secteur $secteur
  388.      * @return bool
  389.      */
  390.     public function hasSecteur(Secteur $secteur$quad)
  391.     {
  392.         return in_array($secteur$this->getSecteurs($quad));
  393.     }
  394.     /**
  395.      * @return ArrayCollection
  396.      */
  397.     public function getSecteurQuad1()
  398.     {
  399.         return $this->secteurQuad1;
  400.     }
  401.     /**
  402.      * @param Secteur $secteur
  403.      * @return Student
  404.      */
  405.     public function addSecteurQuad1(Secteur $secteur)
  406.     {
  407.         $this->secteurQuad1[] = $secteur;
  408.         return $this;
  409.     }
  410.     /**
  411.      * @param ArrayCollection $secteurQuad1
  412.      * @return Student
  413.      */
  414.     public function setSecteurQuad1(ArrayCollection $secteurQuad1): Student
  415.     {
  416.         $this->secteurQuad1 $secteurQuad1;
  417.         return $this;
  418.     }
  419.     /**
  420.      * @return ArrayCollection
  421.      */
  422.     public function getSecteurQuad2()
  423.     {
  424.         return $this->secteurQuad2;
  425.     }
  426.     /**
  427.      * @param Secteur $secteur
  428.      * @return Student
  429.      */
  430.     public function addSecteurQuad2(Secteur $secteur)
  431.     {
  432.         $this->secteurQuad2[] = $secteur;
  433.         return $this;
  434.     }
  435.     /**
  436.      * @param ArrayCollection $secteurQuad2
  437.      * @return Student
  438.      */
  439.     public function setSecteurQuad2(ArrayCollection $secteurQuad2): Student
  440.     {
  441.         $this->secteurQuad2 $secteurQuad2;
  442.         return $this;
  443.     }
  444.     /**
  445.      * Get admin
  446.      *
  447.      * @return boolean
  448.      */
  449.     #[Field]
  450.     public function getAdmin(): bool
  451.     {
  452.         return false;
  453.     }
  454.     public function getPassword(): ?string
  455.     {
  456.         return $this->password;
  457.     }
  458.     public function getSalt()
  459.     {
  460.         return null;
  461.     }
  462.     public function setPassword(string $password): self
  463.     {
  464.         $this->password $password;
  465.         return $this;
  466.     }
  467.     public function getPlainPassword(): ?string
  468.     {
  469.         return $this->plainPassword;
  470.     }
  471.     public function setPlainPassword(string $plainPassword): self
  472.     {
  473.         $this->plainPassword $plainPassword;
  474.         return $this;
  475.     }
  476.     #[Field]
  477.     public function getEmail(): ?string
  478.     {
  479.         return $this->email;
  480.     }
  481.     public function setEmail(string $email): self
  482.     {
  483.         $this->email $email;
  484.         return $this;
  485.     }
  486.     public function getRecidive(): ?string
  487.     {
  488.         return $this->recidive;
  489.     }
  490.     public function setRecidive(?string $recidive): self
  491.     {
  492.         $this->recidive $recidive;
  493.         return $this;
  494.     }
  495.     #[Field]
  496.     public function getRemote(): ?bool
  497.     {
  498.         return $this->remote;
  499.     }
  500.     public function setRemote(?bool $remote): self
  501.     {
  502.         $this->remote $remote;
  503.         return $this;
  504.     }
  505.     public function getAddress(): ?string
  506.     {
  507.         return $this->address;
  508.     }
  509.     public function setAddress(?string $address): self
  510.     {
  511.         $this->address $address;
  512.         return $this;
  513.     }
  514.     public function getCity(): ?string
  515.     {
  516.         return $this->city;
  517.     }
  518.     public function setCity(?string $city): self
  519.     {
  520.         $this->city $city;
  521.         return $this;
  522.     }
  523.     public function getCp(): ?string
  524.     {
  525.         return $this->cp;
  526.     }
  527.     public function setCp(?string $cp): self
  528.     {
  529.         $this->cp $cp;
  530.         return $this;
  531.     }
  532.     public function getBac(): ?string
  533.     {
  534.         return $this->bac;
  535.     }
  536.     public function setBac(?string $bac): self
  537.     {
  538.         $this->bac $bac;
  539.         return $this;
  540.     }
  541.     public function getStage(): ?string
  542.     {
  543.         return $this->stage;
  544.     }
  545.     public function setStage(?string $stage): self
  546.     {
  547.         $this->stage $stage;
  548.         return $this;
  549.     }
  550.     public function getIsPau(): ?bool
  551.     {
  552.         return $this->isPau;
  553.     }
  554.     public function setIsPau(?bool $isPau): self
  555.     {
  556.         $this->isPau $isPau;
  557.         return $this;
  558.     }
  559.     public function getNumero(): ?string
  560.     {
  561.         return $this->numero;
  562.     }
  563.     public function setNumero(?string $numero): self
  564.     {
  565.         $this->numero $numero;
  566.         return $this;
  567.     }
  568.     public function getActive(): ?bool
  569.     {
  570.         return $this->active;
  571.     }
  572.     public function setActive(bool $active): self
  573.     {
  574.         $this->active $active;
  575.         return $this;
  576.     }
  577.     public function getPasswordSend(): ?bool
  578.     {
  579.         return $this->passwordSend;
  580.     }
  581.     public function setPasswordSend(bool $passwordSend): self
  582.     {
  583.         $this->passwordSend $passwordSend;
  584.         return $this;
  585.     }
  586.     public function getCharteAccepted(): ?bool
  587.     {
  588.         return $this->charteAccepted;
  589.     }
  590.     public function setCharteAccepted(bool $charteAccepted): self
  591.     {
  592.         $this->charteAccepted $charteAccepted;
  593.         return $this;
  594.     }
  595.     public function getAvatar(): ?string
  596.     {
  597.         return $this->avatar;
  598.     }
  599.     public function setAvatar(string $avatar): self
  600.     {
  601.         $this->avatar $avatar;
  602.         return $this;
  603.     }
  604.     public function getLoggedOn(): ?\DateTimeInterface
  605.     {
  606.         return $this->loggedOn;
  607.     }
  608.     public function setLoggedOn(\DateTimeInterface $loggedOn): self
  609.     {
  610.         $this->loggedOn $loggedOn;
  611.         return $this;
  612.     }
  613.     public function getLastActivity(): ?\DateTimeInterface
  614.     {
  615.         return $this->lastActivity;
  616.     }
  617.     public function setLastActivity(\DateTimeInterface $lastActivity): self
  618.     {
  619.         $this->lastActivity $lastActivity;
  620.         return $this;
  621.     }
  622.     public function getDoubMoyenne(): ?string
  623.     {
  624.         return $this->doubMoyenne;
  625.     }
  626.     public function setDoubMoyenne(?string $doubMoyenne): self
  627.     {
  628.         $this->doubMoyenne $doubMoyenne;
  629.         return $this;
  630.     }
  631.     public function getUpdatedOn(): ?\DateTimeInterface
  632.     {
  633.         return $this->updatedOn;
  634.     }
  635.     public function setUpdatedOn(\DateTimeInterface $updatedOn): self
  636.     {
  637.         $this->updatedOn $updatedOn;
  638.         return $this;
  639.     }
  640.     public function getCreatedOn(): ?\DateTimeInterface
  641.     {
  642.         return $this->createdOn;
  643.     }
  644.     public function setCreatedOn(\DateTimeInterface $createdOn): self
  645.     {
  646.         $this->createdOn $createdOn;
  647.         return $this;
  648.     }
  649.     public function getPhoto(): ?string
  650.     {
  651.         return $this->photo;
  652.     }
  653.     public function setPhoto(?string $photo): self
  654.     {
  655.         $this->photo $photo;
  656.         return $this;
  657.     }
  658.     public function getGroupFac(): ?EdtGroupFacTd
  659.     {
  660.         return $this->groupFac;
  661.     }
  662.     public function setGroupFac(?EdtGroupFacTd $groupFac): self
  663.     {
  664.         $this->groupFac $groupFac;
  665.         return $this;
  666.     }
  667.     public function getPeriode(): ?Periode
  668.     {
  669.         return $this->periode;
  670.     }
  671.     public function setPeriode(?Periode $periode): self
  672.     {
  673.         $this->periode $periode;
  674.         return $this;
  675.     }
  676.     #[Field]
  677.     public function getBranche(): ?Branche
  678.     {
  679.         return $this->branche;
  680.     }
  681.     public function setBranche(?Branche $branche): self
  682.     {
  683.         $this->branche $branche;
  684.         return $this;
  685.     }
  686.     public function getGroup(): ?GroupStudent
  687.     {
  688.         return $this->group;
  689.     }
  690.     public function setGroup(?GroupStudent $group): self
  691.     {
  692.         $this->group $group;
  693.         return $this;
  694.     }
  695.     /**
  696.      * @return Collection|Post[]
  697.      */
  698.     public function getPosts(): Collection
  699.     {
  700.         return $this->posts;
  701.     }
  702.     public function addPost(Post $post): self
  703.     {
  704.         if (!$this->posts->contains($post)) {
  705.             $this->posts[] = $post;
  706.             $post->setStudent($this);
  707.         }
  708.         return $this;
  709.     }
  710.     public function removePost(Post $post): self
  711.     {
  712.         if ($this->posts->contains($post)) {
  713.             $this->posts->removeElement($post);
  714.             // set the owning side to null (unless already changed)
  715.             if ($post->getStudent() === $this) {
  716.                 $post->setStudent(null);
  717.             }
  718.         }
  719.         return $this;
  720.     }
  721.     /**
  722.      * @return Collection|StudentSecteur[]
  723.      */
  724.     public function getStudentSecteurs(): Collection
  725.     {
  726.         return $this->studentSecteurs;
  727.     }
  728.     public function addStudentSecteur(StudentSecteur $studentSecteur): self
  729.     {
  730.         if (!$this->studentSecteurs->contains($studentSecteur)) {
  731.             $this->studentSecteurs[] = $studentSecteur;
  732.             $studentSecteur->setStudent($this);
  733.         }
  734.         return $this;
  735.     }
  736.     public function removeStudentSecteur(StudentSecteur $studentSecteur): self
  737.     {
  738.         if ($this->studentSecteurs->contains($studentSecteur)) {
  739.             $this->studentSecteurs->removeElement($studentSecteur);
  740.             // set the owning side to null (unless already changed)
  741.             if ($studentSecteur->getStudent() === $this) {
  742.                 $studentSecteur->setStudent(null);
  743.             }
  744.         }
  745.         return $this;
  746.     }
  747.     public function getLastCategory(): ?Category
  748.     {
  749.         return $this->lastCategory;
  750.     }
  751.     public function setLastCategory(?Category $lastCategory): self
  752.     {
  753.         $this->lastCategory $lastCategory;
  754.         return $this;
  755.     }
  756.     /**
  757.      * @return Collection|FileStudent[]
  758.      */
  759.     public function getFileStudents(): Collection
  760.     {
  761.         return $this->fileStudents;
  762.     }
  763.     public function addFileStudent(FileStudent $fileStudent): self
  764.     {
  765.         if (!$this->fileStudents->contains($fileStudent)) {
  766.             $this->fileStudents[] = $fileStudent;
  767.             $fileStudent->setStudent($this);
  768.         }
  769.         return $this;
  770.     }
  771.     public function removeFileStudent(FileStudent $fileStudent): self
  772.     {
  773.         if ($this->fileStudents->contains($fileStudent)) {
  774.             $this->fileStudents->removeElement($fileStudent);
  775.             // set the owning side to null (unless already changed)
  776.             if ($fileStudent->getStudent() === $this) {
  777.                 $fileStudent->setStudent(null);
  778.             }
  779.         }
  780.         return $this;
  781.     }
  782.     /**
  783.      * @return Collection|NoteTestStudent[]
  784.      */
  785.     public function getNoteTestStudents(): Collection
  786.     {
  787.         return $this->noteTestStudents;
  788.     }
  789.     public function addNoteTestStudent(NoteTestStudent $noteTestStudent): self
  790.     {
  791.         if (!$this->noteTestStudents->contains($noteTestStudent)) {
  792.             $this->noteTestStudents[] = $noteTestStudent;
  793.             $noteTestStudent->setStudent($this);
  794.         }
  795.         return $this;
  796.     }
  797.     public function removeNoteTestStudent(NoteTestStudent $noteTestStudent): self
  798.     {
  799.         if ($this->noteTestStudents->contains($noteTestStudent)) {
  800.             $this->noteTestStudents->removeElement($noteTestStudent);
  801.             // set the owning side to null (unless already changed)
  802.             if ($noteTestStudent->getStudent() === $this) {
  803.                 $noteTestStudent->setStudent(null);
  804.             }
  805.         }
  806.         return $this;
  807.     }
  808.     /**
  809.      * @return Collection|NoteAbsence[]
  810.      */
  811.     public function getAbsences(): Collection
  812.     {
  813.         return $this->absences;
  814.     }
  815.     public function addAbsence(NoteAbsence $absence): self
  816.     {
  817.         if (!$this->absences->contains($absence)) {
  818.             $this->absences[] = $absence;
  819.             $absence->setStudent($this);
  820.         }
  821.         return $this;
  822.     }
  823.     public function removeAbsence(NoteAbsence $absence): self
  824.     {
  825.         if ($this->absences->contains($absence)) {
  826.             $this->absences->removeElement($absence);
  827.             // set the owning side to null (unless already changed)
  828.             if ($absence->getStudent() === $this) {
  829.                 $absence->setStudent(null);
  830.             }
  831.         }
  832.         return $this;
  833.     }
  834.     /** @see \Serializable::serialize() */
  835.     public function serialize()
  836.     {
  837.         return serialize(array(
  838.             $this->id,
  839.             $this->email,
  840.             $this->password,
  841.             // see section on salt below
  842.             // $this->salt,
  843.         ));
  844.     }
  845.     /** @see \Serializable::unserialize() */
  846.     public function unserialize($serialized)
  847.     {
  848.         list (
  849.             $this->id,
  850.             $this->email,
  851.             $this->password,
  852.             // see section on salt below
  853.             // $this->salt
  854.             ) = unserialize($serialized);
  855.     }
  856.     /**
  857.      * @return Collection|QuestionnaireQcmStudent[]
  858.      */
  859.     public function getQcmStudents(): Collection
  860.     {
  861.         return $this->qcmStudents;
  862.     }
  863.     public function addQcmStudent(QuestionnaireQcmStudent $qcmStudent): self
  864.     {
  865.         if (!$this->qcmStudents->contains($qcmStudent)) {
  866.             $this->qcmStudents[] = $qcmStudent;
  867.             $qcmStudent->setStudent($this);
  868.         }
  869.         return $this;
  870.     }
  871.     public function removeQcmStudent(QuestionnaireQcmStudent $qcmStudent): self
  872.     {
  873.         if ($this->qcmStudents->contains($qcmStudent)) {
  874.             $this->qcmStudents->removeElement($qcmStudent);
  875.             // set the owning side to null (unless already changed)
  876.             if ($qcmStudent->getStudent() === $this) {
  877.                 $qcmStudent->setStudent(null);
  878.             }
  879.         }
  880.         return $this;
  881.     }
  882.     /**
  883.      * @return Module[]
  884.      */
  885.     public function getModules(): Collection
  886.     {
  887.         return $this->modules;
  888.     }
  889.     /**
  890.      * @return Module[]
  891.      */
  892.     #[Field(name"modules")]
  893.     public function getActiveModules(): array
  894.     {
  895.         $modules = [];
  896.         /** @var Module $module */
  897.         foreach ($this->modules as $module) {
  898.             if ($module->getActive()) {
  899.                 $modules[] = $module;
  900.             }
  901.         }
  902.         return $modules;
  903.     }
  904.     public function addModule(Module $module): self
  905.     {
  906.         if (!$this->modules->contains($module)) {
  907.             $this->modules[] = $module;
  908.         }
  909.         return $this;
  910.     }
  911.     public function removeModule(Module $module): self
  912.     {
  913.         if ($this->modules->contains($module)) {
  914.             $this->modules->removeElement($module);
  915.         }
  916.         return $this;
  917.     }
  918.     public function hasModule(Module $module): bool
  919.     {
  920.         return $this->modules->contains($module);
  921.     }
  922.     /**
  923.      * @return Collection|MinorOption[]
  924.      */
  925.     #[Field]
  926.     public function getMinorOptions(): Collection
  927.     {
  928.         return $this->minorOptions;
  929.     }
  930.     public function addMinorOption(MinorOption $minorOption): self
  931.     {
  932.         if (!$this->minorOptions->contains($minorOption)) {
  933.             $this->minorOptions[] = $minorOption;
  934.         }
  935.         return $this;
  936.     }
  937.     public function removeMinorOption(MinorOption $minorOption): self
  938.     {
  939.         if ($this->minorOptions->contains($minorOption)) {
  940.             $this->minorOptions->removeElement($minorOption);
  941.         }
  942.         return $this;
  943.     }
  944.     public function getVisible(): ?bool
  945.     {
  946.         return $this->visible;
  947.     }
  948.     public function setVisible(bool $visible): self
  949.     {
  950.         $this->visible $visible;
  951.         return $this;
  952.     }
  953.     public function getCivil(): ?string
  954.     {
  955.         return $this->civil;
  956.     }
  957.     public function setCivil(string $civil): self
  958.     {
  959.         $this->civil $civil;
  960.         return $this;
  961.     }
  962.     public function getCommercial(): ?string
  963.     {
  964.         return $this->commercial;
  965.     }
  966.     public function setCommercial(string $commercial): self
  967.     {
  968.         $this->commercial $commercial;
  969.         return $this;
  970.     }
  971.     public function getOralExam(): ?bool
  972.     {
  973.         return $this->oralExam;
  974.     }
  975.     public function setOralExam(?bool $oralExam): self
  976.     {
  977.         $this->oralExam $oralExam;
  978.         return $this;
  979.     }
  980.     public function getDateOralExam(): ?\DateTime
  981.     {
  982.         return $this->dateOralExam;
  983.     }
  984.     public function setDateOralExam(?\DateTime $dateOralExam): self
  985.     {
  986.         $this->dateOralExam $dateOralExam;
  987.         return $this;
  988.     }
  989.     public function getPhoneNumber(): ?string
  990.     {
  991.         return $this->phoneNumber;
  992.     }
  993.     public function setPhoneNumber(?string $phoneNumber): self
  994.     {
  995.         $this->phoneNumber $phoneNumber;
  996.         return $this;
  997.     }
  998.     public function getParentPhoneNumber(): ?string
  999.     {
  1000.         return $this->parentPhoneNumber;
  1001.     }
  1002.     public function setParentPhoneNumber(?string $parentPhoneNumber): self
  1003.     {
  1004.         $this->parentPhoneNumber $parentPhoneNumber;
  1005.         return $this;
  1006.     }
  1007.     /**
  1008.      * @return Collection|StudentDocFile[]
  1009.      */
  1010.     public function getStudentDocFiles(): Collection
  1011.     {
  1012.         return $this->studentDocFiles;
  1013.     }
  1014.     public function addStudentDocFile(StudentDocFile $studentDocFile): self
  1015.     {
  1016.         if (!$this->studentDocFiles->contains($studentDocFile)) {
  1017.             $this->studentDocFiles[] = $studentDocFile;
  1018.             $studentDocFile->setStudent($this);
  1019.         }
  1020.         return $this;
  1021.     }
  1022.     public function removeStudentDocFile(StudentDocFile $studentDocFile): self
  1023.     {
  1024.         if ($this->studentDocFiles->removeElement($studentDocFile)) {
  1025.             // set the owning side to null (unless already changed)
  1026.             if ($studentDocFile->getStudent() === $this) {
  1027.                 $studentDocFile->setStudent(null);
  1028.             }
  1029.         }
  1030.         return $this;
  1031.     }
  1032.     public function getDocFilesQ1(): ?array
  1033.     {
  1034.         return $this->docFilesQ1;
  1035.     }
  1036.     public function setDocFilesQ1(array $docFiles): self
  1037.     {
  1038.         $this->docFilesQ1 $docFiles;
  1039.         return $this;
  1040.     }
  1041.     public function addDocFileQ1(DocFile $docFile): self
  1042.     {
  1043.         $this->docFilesQ1[] = $docFile;
  1044.         return $this;
  1045.     }
  1046.     public function getDocFilesQ2(): ?array
  1047.     {
  1048.         return $this->docFilesQ2;
  1049.     }
  1050.     public function setDocFilesQ2(array $docFiles): self
  1051.     {
  1052.         $this->docFilesQ2 $docFiles;
  1053.         return $this;
  1054.     }
  1055.     public function addDocFileQ2(DocFile $docFile): self
  1056.     {
  1057.         $this->docFilesQ2[] = $docFile;
  1058.         return $this;
  1059.     }
  1060.     public function getDocFiles(): array
  1061.     {
  1062.         return array_merge($this->docFilesQ1$this->docFilesQ2);
  1063.     }
  1064.     public function getFirebaseToken(): ?string
  1065.     {
  1066.         return $this->firebaseToken;
  1067.     }
  1068.     public function setFirebaseToken(?string $firebaseToken): self
  1069.     {
  1070.         $this->firebaseToken $firebaseToken;
  1071.         return $this;
  1072.     }
  1073.     public function getFirebaseTokenDate(): ?\DateTimeImmutable
  1074.     {
  1075.         return $this->firebaseTokenDate;
  1076.     }
  1077.     public function setFirebaseTokenDate(?\DateTimeImmutable $firebaseTokenDate): self
  1078.     {
  1079.         $this->firebaseTokenDate $firebaseTokenDate;
  1080.         return $this;
  1081.     }
  1082.     /**
  1083.      * @return Collection<int, RankingMark>
  1084.      */
  1085.     public function getMarks(): Collection
  1086.     {
  1087.         return $this->marks;
  1088.     }
  1089.     public function addMark(RankingMark $mark): self
  1090.     {
  1091.         if (!$this->marks->contains($mark)) {
  1092.             $this->marks[] = $mark;
  1093.             $mark->setStudent($this);
  1094.         }
  1095.         return $this;
  1096.     }
  1097.     public function removeMark(RankingMark $mark): self
  1098.     {
  1099.         if ($this->marks->removeElement($mark)) {
  1100.             // set the owning side to null (unless already changed)
  1101.             if ($mark->getStudent() === $this) {
  1102.                 $mark->setStudent(null);
  1103.             }
  1104.         }
  1105.         return $this;
  1106.     }
  1107.     /**
  1108.      * @return Collection<int, Remedial>
  1109.      */
  1110.     public function getRemedials(): Collection
  1111.     {
  1112.         return $this->remedials;
  1113.     }
  1114.     public function addRemedial(Remedial $remedial): self
  1115.     {
  1116.         if (!$this->remedials->contains($remedial)) {
  1117.             $this->remedials[] = $remedial;
  1118.             $remedial->setStudent($this);
  1119.         }
  1120.         return $this;
  1121.     }
  1122.     public function removeRemedial(Remedial $remedial): self
  1123.     {
  1124.         $this->remedials->removeElement($remedial);
  1125.         return $this;
  1126.     }
  1127.     public function getRemedialComment(): ?string
  1128.     {
  1129.         return $this->remedialComment;
  1130.     }
  1131.     public function setRemedialComment(string $remedialComment): self
  1132.     {
  1133.         $this->remedialComment $remedialComment;
  1134.         return $this;
  1135.     }
  1136.     public function getRemedialDone(): ?bool
  1137.     {
  1138.         return $this->remedialDone;
  1139.     }
  1140.     public function setRemedialDone(bool $remedialDone): self
  1141.     {
  1142.         $this->remedialDone $remedialDone;
  1143.         return $this;
  1144.     }
  1145.     public function getQrCode(): ?string
  1146.     {
  1147.         return $this->qrCode;
  1148.     }
  1149.     public function setQrCode(?string $qrCode): self
  1150.     {
  1151.         $this->qrCode $qrCode;
  1152.         return $this;
  1153.     }
  1154.     public function getQrCodeDate(): ?\DateTimeImmutable
  1155.     {
  1156.         return $this->qrCodeDate;
  1157.     }
  1158.     public function setQrCodeDate(?\DateTimeImmutable $qrCodeDate): self
  1159.     {
  1160.         $this->qrCodeDate $qrCodeDate;
  1161.         return $this;
  1162.     }
  1163.     public function isRemote(): ?bool
  1164.     {
  1165.         return $this->remote;
  1166.     }
  1167.     public function isIsPau(): ?bool
  1168.     {
  1169.         return $this->isPau;
  1170.     }
  1171.     public function isActive(): ?bool
  1172.     {
  1173.         return $this->active;
  1174.     }
  1175.     public function isVisible(): ?bool
  1176.     {
  1177.         return $this->visible;
  1178.     }
  1179.     public function isPasswordSend(): ?bool
  1180.     {
  1181.         return $this->passwordSend;
  1182.     }
  1183.     public function isCharteAccepted(): ?bool
  1184.     {
  1185.         return $this->charteAccepted;
  1186.     }
  1187.     public function isOralExam(): ?bool
  1188.     {
  1189.         return $this->oralExam;
  1190.     }
  1191.     public function isRemedialDone(): ?bool
  1192.     {
  1193.         return $this->remedialDone;
  1194.     }
  1195.     public function getRemedialModuleModels(): array
  1196.     {
  1197.         return $this->remedialModuleModels;
  1198.     }
  1199.     public function setRemedialModuleModels(array $remedialModuleModels): Student
  1200.     {
  1201.         $this->remedialModuleModels $remedialModuleModels;
  1202.         return $this;
  1203.     }
  1204.     public function addRemedialModuleModel(RemedialModuleModel $remedialModuleModel): self
  1205.     {
  1206.         $this->remedialModuleModels[] = $remedialModuleModel;
  1207.         return $this;
  1208.     }
  1209. }