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

Corrections mineures

This commit is contained in:
Yohann
2019-10-05 00:24:31 +02:00
parent 66421eefb3
commit 9de0491755
7 changed files with 20 additions and 12 deletions

View File

@ -43,18 +43,22 @@ if (isset($_POST["attribute_team"])) {
class AttributeTeam
{
private $team_id;
private $team;
private $min_null_index;
public function __construct($data)
{
$this->team = Team::fromId($data["team"]);
$this->team_id = $data["team"];
$this->team = Team::fromId($this->team_id);
}
public function makeVerifications()
{
global $user;
ensure($user->getConfirmEmailToken() == null, "Ce participant n'a pas encore validé son adresse e-mail.");
ensure($this->team_id != "no_team", "Vous n'avez pas choisi d'équipe.");
ensure($this->team != null, "Cette équipe n'existe pas.");
ensure($this->team->getValidationStatus() == ValidationStatus::NOT_READY, "Cette équipe est déjà validée ou en cours de validation.");