1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 23:07:31 +02:00

3 encadrants max par équipe

This commit is contained in:
Yohann D'ANELLO
2020-02-18 15:33:55 +01:00
parent 2c3e3ffcba
commit 0dab65d82b
6 changed files with 227 additions and 135 deletions

View File

@ -103,7 +103,7 @@ class AttributeTeam
ensure($this->team->getValidationStatus() == ValidationStatus::NOT_READY, "Cette équipe est déjà validée ou en cours de validation.");
$role = $user->getRole();
for ($i = 1; $i <= $role == Role::ENCADRANT ? 2 : 6; ++$i) {
for ($i = 1; $i <= $role == Role::ENCADRANT ? 3 : 6; ++$i) {
if (($role == Role::PARTICIPANT ? $this->team->getParticipants()[$i - 1] : $this->team->getEncadrants()[$i]) == NULL)
break;
}