mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-24 04:28:46 +02:00
4 à 6 participants par équipe => 3 à 5
This commit is contained in:
@ -35,14 +35,14 @@ class JoinTeam
|
||||
ensure($this->team != null, "Ce code d'accès est invalide.");
|
||||
ensure($this->team->getValidationStatus() == ValidationStatus::NOT_READY, "Cette équipe est déjà validée ou en cours de validation, vous ne pouvez pas la rejoindre.");
|
||||
|
||||
for ($i = 1; $i <= $_SESSION["role"] == Role::PARTICIPANT ? 6 : 1; ++$i) {
|
||||
for ($i = 1; $i <= $_SESSION["role"] == Role::PARTICIPANT ? 5 : 1; ++$i) {
|
||||
if (($_SESSION["role"] == Role::PARTICIPANT ? $this->team->getParticipants()[$i - 1] : $this->team->getEncadrantId()) == NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
$this->min_null_index = $i;
|
||||
|
||||
ensure($_SESSION["role"] == Role::PARTICIPANT && $this->min_null_index <= 6 || $_SESSION["role"] == Role::ENCADRANT && $this->min_null_index <= 2, "Il n'y a plus de place pour vous dans l'équipe.");
|
||||
ensure($_SESSION["role"] == Role::PARTICIPANT && $this->min_null_index <= 5 || $_SESSION["role"] == Role::ENCADRANT && $this->min_null_index <= 2, "Il n'y a plus de place pour vous dans l'équipe.");
|
||||
}
|
||||
|
||||
public function joinTeam()
|
||||
|
Reference in New Issue
Block a user