mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-03 06:42:46 +02:00
Corrections mineurs
This commit is contained in:
@ -94,8 +94,8 @@ function canValidate(Team $team)
|
||||
$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` = ?;");
|
||||
$req->execute([$team->getEncadrantId(), $team->getProblem(), "PHOTO_CONSENT"]);
|
||||
$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;
|
||||
}
|
||||
@ -104,8 +104,8 @@ function canValidate(Team $team)
|
||||
if ($team->getParticipants()[$i] === NULL)
|
||||
continue;
|
||||
|
||||
$req = $DB->prepare("SELECT COUNT(*) AS `version` FROM `documents` WHERE `user` = ? AND `problem` = ? AND `type` = ?;");
|
||||
$req->execute([$team->getParticipants()[$i], $team->getProblem(), "PHOTO_CONSENT"]);
|
||||
$req = $DB->prepare("SELECT COUNT(*) AS `version` FROM `documents` WHERE `user` = ? AND `problem` = ?;");
|
||||
$req->execute([$team->getParticipants()[$i], $team->getProblem()]);
|
||||
$d = $req->fetch();
|
||||
$can_validate &= $d["version"] > 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user