mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-06-25 19:37:23 +02:00
Sélection des équipes pour la phase 2
This commit is contained in:
@ -70,7 +70,7 @@ class Team
|
||||
return $team;
|
||||
}
|
||||
|
||||
public static function getAllTeams($problem = -1, $only_validated = false)
|
||||
public static function getAllTeams($problem = -1, $only_validated = false, $only_with_solutions = true)
|
||||
{
|
||||
global $DB, $YEAR;
|
||||
$req = $DB->prepare("SELECT * FROM `teams` WHERE " . ($problem < 0 ? "" : "`problem` = ? AND ") . ($only_validated ? "`validation_status` = 'VALIDATED' AND " : "") . "`year` = $YEAR;");
|
||||
@ -81,7 +81,9 @@ class Team
|
||||
while (($data = $req->fetch()) != false) {
|
||||
$team = new Team();
|
||||
$team->fill($data);
|
||||
$teams[] = $team;
|
||||
$sol = $team->getSolution();
|
||||
if ($sol != null && $sol->getValidation() == ValidationStatus::VALIDATED - 1)
|
||||
$teams[] = $team;
|
||||
}
|
||||
|
||||
return $teams;
|
||||
|
Reference in New Issue
Block a user