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

Beaucoup de petites modifications

This commit is contained in:
galaxyoyo
2019-10-06 13:29:20 +02:00
parent 8ab6a7a3aa
commit 866d4a2744
15 changed files with 107 additions and 19 deletions

View File

@ -95,13 +95,6 @@ function canValidate(Team $team)
$can_validate &= $team->getParticipants()[2] != null;
$can_validate &= preg_match("#[1-4]#", $team->getProblem());
if ($team->getEncadrantId() != null) {
$req = $DB->prepare("SELECT COUNT(*) AS `version` FROM `documents` WHERE `user` = ? AND `problem` = ?;");
$req->execute([$team->getEncadrantId(), $team->getProblem()]);
$d = $req->fetch();
$can_validate &= $d["version"] > 0;
}
for ($i = 1; $i <= 5; ++$i) {
if ($team->getParticipants()[$i] === NULL)
continue;