1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-06-24 18:20:30 +02:00

4 à 6 participants par équipe => 3 à 5

This commit is contained in:
galaxyoyo
2019-09-12 14:11:59 +02:00
parent 7ef88be38c
commit 762797142b
5 changed files with 8 additions and 8 deletions

View File

@ -49,7 +49,7 @@ function quitTeam()
return;
if ($role == Role::PARTICIPANT)
for ($i = 1; $i <= 6; ++$i)
for ($i = 1; $i <= 5; ++$i)
/** @noinspection SqlResolve */
$DB->exec("UPDATE `teams` SET `participant_$i` = NULL WHERE `participant_$i` = $user_id;");
else
@ -102,7 +102,7 @@ function canValidate(Team $team)
$can_validate = $team->getValidationStatus() == ValidationStatus::NOT_READY;
$can_validate &= $team->getEncadrantId() != null;
$can_validate &= $team->getParticipants()[3] != null;
$can_validate &= $team->getParticipants()[2] != null;
if ($team->getEncadrantId() != null) {
$req = $DB->prepare("SELECT COUNT(*) AS `version` FROM `documents` WHERE `user` = ? AND `problem` = ? AND `type` = ?;");
@ -111,7 +111,7 @@ function canValidate(Team $team)
$can_validate &= $d["version"] > 0;
}
for ($i = 1; $i <= 6; ++$i) {
for ($i = 1; $i <= 5; ++$i) {
if ($team->getParticipants()[$i] === NULL)
continue;