diff --git a/server_files/views/suivi_correspondances.php b/server_files/views/suivi_correspondances.php index dc7ca5f..94005e3 100644 --- a/server_files/views/suivi_correspondances.php +++ b/server_files/views/suivi_correspondances.php @@ -9,21 +9,25 @@ require_once "header.php"; 0) { ?>
+ pas encore + participé à la phase en cours : pas encore participé à la phase en cours, ou leurs vidéos n'ont pas encore été validées : - subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank">Leur envoyer un mail + subject=Correspondances de Jeunes Mathématicien·ne·s" + target="_blank">Leur envoyer un mail
+
subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank"> @@ -35,13 +39,13 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>

Vidéos pour le problème

- getLink(); - $team = Team::fromId($video->getTeam()); - $version = $video->getVersion(); - ?> + getLink(); + $team = Team::fromId($video->getTeam()); + $version = $video->getVersion(); + ?>

Équipe « getName() ?> » (getTrigram() ?>) @@ -49,10 +53,10 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
Lien de la vidéo (version ) :
- getValidation() <= 0) { ?> + if ($video->getValidation() <= 0) { ?>
@@ -62,103 +66,115 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>

- - getValidation() == 0) { ?> + getValidation() == 0) { ?> - +
- getValidation() != 0) { ?> + getValidation() != 0) { ?>
"> La vidéo a été getValidation() == 1 ? "acceptée" : "refusée" ?>.
- getValidation() != Video::ACCEPTED) { - $last_validated_video = Video::getVideo(Reason::SOLUTION, $team, Video::ACCEPTED); - if ($last_validated_video !== null) { - $link = $last_validated_video->getLink(); ?> + if ($video->getValidation() != Video::ACCEPTED) { + $last_validated_video = Video::getVideo(Reason::SOLUTION, $team, Video::ACCEPTED); + if ($last_validated_video !== null) { + $link = $last_validated_video->getLink(); ?>
Lien de la vidéo validée de cette équipe (version ) :
- Phase::PHASE1) { - /** @var Question[] $from_questions */ - foreach (Question::getQuestionsTo($team) as $from_questions) { - $from = Team::fromId($from_questions[0]->getFrom()); - echo "
Questions posées par l'équipe " . $from->getName() . " (" . $from->getTrigram() . ") :
\n"; - for ($i = 0; $i < sizeof($from_questions); ++$i) { - $question = $from_questions[$i]; - if ($i > 0 && $question->getQuestion() == null) - continue; + if (Phase::getCurrentPhase() > Phase::PHASE1) { + /** @var Question[] $from_questions */ + foreach (Question::getQuestionsTo($team) as $from_questions) { - echo "
\n"; - echo "" . ($i == 0 ? "Remarques générales :" : "Question " . $i . " :") . " " . $question->getQuestion() . "
\n"; - if ($question->getAttachedFile() != null) - echo "Pièce jointe attachée : getAttachedFile() . "\">Télécharger
\n"; - if ($question->getAnswer() != null) - echo "Réponse apportée : " . $question->getAnswer() . "
\n"; - if ($question->getAttachedFileAnswer() != null) - echo "Pièce jointe attachée pour la réponse : getAttachedFileAnswer() . "\">Télécharger
\n"; - echo "
\n"; - } - echo "
\n"; - if (Phase::getCurrentPhase() >= Phase::PHASE4) { - $answer = Video::getVideo($from->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $from); - if ($answer == null) - continue; - $link = $answer->getLink(); - $version = $answer->getVersion(); - echo "
Vidéo de réponse :
\n"; - echo "Lien de la vidéo (version $version) : $link"; - displayVideo($link); + $from = Team::fromId($from_questions[0]->getFrom()); + echo "
Questions posées par l'équipe " . $from->getName() . " (" . $from->getTrigram() . ") :
\n"; + if (!strcmp($from_questions[1]->getQuestion(), Question::DEFAULT_QUESTIONS[0]) + && !strcmp($from_questions[2]->getQuestion(), Question::DEFAULT_QUESTIONS[1]) + && !strcmp($from_questions[3]->getQuestion(), Question::DEFAULT_QUESTIONS[2])) { ?> +
+ Cette équipe n'a pas encore envoyé ses questions. +
+ 0 && $question->getQuestion() == null) + continue; - if ($answer->getValidation() == 0) { ?> -
- - + echo "
\n"; + echo "" . ($i == 0 ? "Remarques générales :" : "Question " . $i . " :") . " " . $question->getQuestion() . "
\n"; + if ($question->getAttachedFile() != null) + echo "Pièce jointe attachée : getAttachedFile() . "\">Télécharger
\n"; + if ($question->getAnswer() != null) + echo "Réponse apportée : " . $question->getAnswer() . "
\n"; + if ($question->getAttachedFileAnswer() != null) + echo "Pièce jointe attachée pour la réponse : getAttachedFileAnswer() . "\">Télécharger
\n"; + echo "
\n"; + } + echo "
\n"; + if (Phase::getCurrentPhase() >= Phase::PHASE4) { + $answer = Video::getVideo($from->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $from); + if ($answer == null) + continue; + $link = $answer->getLink(); + $version = $answer->getVersion(); + echo "
Vidéo de réponse :
\n"; + echo "Lien de la vidéo (version $version) : $link"; + displayVideo($link); -
- - + if ($answer->getValidation() == 0) { ?> + + + + +
+ + +
+ + + getValidation() == 0) { ?> + + + +
+ getValidation() != 0) { ?> +
"> + La vidéo a été getValidation() == 1 ? "acceptée" : "refusée" ?>.
- - - getValidation() == 0) { ?> - - - -
- getValidation() != 0) { ?> -
"> - La vidéo a été getValidation() == 1 ? "acceptée" : "refusée" ?>. -
- getValidation() != Video::ACCEPTED) { - $last_validated_answer = Video::getVideo($from->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $team, Video::ACCEPTED); - if ($last_validated_answer !== null) { - $link = $last_validated_answer->getLink(); - echo "\n
\nLien de la dernière vidéo validée de cette équipe : $link
\n"; - displayVideo($link); - } - } - } - } - } ?> + getValidation() != Video::ACCEPTED) { + $last_validated_answer = Video::getVideo($from->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $team, Video::ACCEPTED); + if ($last_validated_answer !== null) { + $link = $last_validated_answer->getLink(); + echo "\n
\nLien de la dernière vidéo validée de cette équipe : $link
\n"; + displayVideo($link); + } + } + } + } + } + } ?>
- \n"; + \n"; } require_once "footer.php"; \ No newline at end of file