mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-06 12:13:01 +00:00
Les admins ne verront plus les questions par défaut
This commit is contained in:
parent
0d0d82a878
commit
a5ef81ae24
@ -9,6 +9,8 @@ require_once "header.php";
|
|||||||
<?php
|
<?php
|
||||||
if (sizeof($waiting_teams) > 0) { ?>
|
if (sizeof($waiting_teams) > 0) { ?>
|
||||||
<div class="alert alert-warning">
|
<div class="alert alert-warning">
|
||||||
|
<?= sizeof($waiting_teams) == 1 ? "L'équipe suivante n'a" : "Les équipes suivantes n'ont" ?> pas encore
|
||||||
|
participé à la phase en cours :
|
||||||
<?= sizeof($waiting_teams) == 1 ? "L'équipe suivante n'a" : "Les équipes suivantes n'ont" ?> pas encore participé à la phase en cours, ou leurs vidéos n'ont pas encore été validées :
|
<?= sizeof($waiting_teams) == 1 ? "L'équipe suivante n'a" : "Les équipes suivantes n'ont" ?> pas encore participé à la phase en cours, ou leurs vidéos n'ont pas encore été validées :
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
@ -20,10 +22,12 @@ if (sizeof($waiting_teams) > 0) { ?>
|
|||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="mailto:contact@correspondances-maths.fr?<? foreach ($waiting_emails as $email) echo "bcc=" . $email . "&" ?>subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank">Leur envoyer un mail</a>
|
<a href="mailto:contact@correspondances-maths.fr?<? foreach ($waiting_emails as $email) echo "bcc=" . $email . "&" ?>subject=Correspondances de Jeunes Mathématicien·ne·s"
|
||||||
|
target="_blank">Leur envoyer un mail</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
<a href="mailto:contact@correspondances-maths.fr?<? foreach ($all_emails as $email) echo "bcc=" . $email . "&" ?>subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank">
|
<a href="mailto:contact@correspondances-maths.fr?<? foreach ($all_emails as $email) echo "bcc=" . $email . "&" ?>subject=Correspondances de Jeunes Mathématicien·ne·s" target="_blank">
|
||||||
<button class="btn btn-block btn-primary">Envoyer un mail à tous les participants</button>
|
<button class="btn btn-block btn-primary">Envoyer un mail à tous les participants</button>
|
||||||
</a>
|
</a>
|
||||||
@ -62,7 +66,8 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
|
|||||||
<textarea class="form-control" id="message" name="message"></textarea>
|
<textarea class="form-control" id="message" name="message"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input class="btn btn-primary btn-lg" style="width: <?= $video->getValidation() == 0 ? 49 : 100 ?>%;" type="submit" name="accept"
|
<input class="btn btn-primary btn-lg"
|
||||||
|
style="width: <?= $video->getValidation() == 0 ? 49 : 100 ?>%;" type="submit" name="accept"
|
||||||
value="Accepter la vidéo"/>
|
value="Accepter la vidéo"/>
|
||||||
<?php if ($video->getValidation() == 0) { ?>
|
<?php if ($video->getValidation() == 0) { ?>
|
||||||
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
|
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
|
||||||
@ -93,8 +98,16 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
|
|||||||
if (Phase::getCurrentPhase() > Phase::PHASE1) {
|
if (Phase::getCurrentPhase() > Phase::PHASE1) {
|
||||||
/** @var Question[] $from_questions */
|
/** @var Question[] $from_questions */
|
||||||
foreach (Question::getQuestionsTo($team) as $from_questions) {
|
foreach (Question::getQuestionsTo($team) as $from_questions) {
|
||||||
|
|
||||||
$from = Team::fromId($from_questions[0]->getFrom());
|
$from = Team::fromId($from_questions[0]->getFrom());
|
||||||
echo "<h5>Questions posées par l'équipe " . $from->getName() . " (" . $from->getTrigram() . ") :</h5>\n";
|
echo "<h5>Questions posées par l'équipe " . $from->getName() . " (" . $from->getTrigram() . ") :</h5>\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])) { ?>
|
||||||
|
<div class="alert alert-warning">
|
||||||
|
Cette équipe n'a pas encore envoyé ses questions.
|
||||||
|
</div>
|
||||||
|
<?php } else {
|
||||||
for ($i = 0; $i < sizeof($from_questions); ++$i) {
|
for ($i = 0; $i < sizeof($from_questions); ++$i) {
|
||||||
$question = $from_questions[$i];
|
$question = $from_questions[$i];
|
||||||
if ($i > 0 && $question->getQuestion() == null)
|
if ($i > 0 && $question->getQuestion() == null)
|
||||||
@ -131,10 +144,12 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
|
|||||||
<textarea class="form-control" id="message" name="message"></textarea>
|
<textarea class="form-control" id="message" name="message"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input class="btn btn-primary btn-lg" style="width: <?= $answer->getValidation() == 0 ? 49 : 100 ?>%;"
|
<input class="btn btn-primary btn-lg"
|
||||||
|
style="width: <?= $answer->getValidation() == 0 ? 49 : 100 ?>%;"
|
||||||
type="submit" name="accept" value="Accepter la vidéo"/>
|
type="submit" name="accept" value="Accepter la vidéo"/>
|
||||||
<?php if ($answer->getValidation() == 0) { ?>
|
<?php if ($answer->getValidation() == 0) { ?>
|
||||||
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
|
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit"
|
||||||
|
name="reject"
|
||||||
value="Refuser la vidéo"/>
|
value="Refuser la vidéo"/>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</form>
|
</form>
|
||||||
@ -155,6 +170,7 @@ for ($problem = 1; $problem <= 4; ++$problem) { ?>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} ?>
|
} ?>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?php }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user