mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-07 14:22:22 +00:00
Possibilité d'encadrer plusieurs équipes
This commit is contained in:
parent
8fa1183f9f
commit
95d7f30536
9
.idea/codeStyles/Project.xml
Normal file
9
.idea/codeStyles/Project.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<codeStyleSettings language="PHP">
|
||||
<indentOptions>
|
||||
<option name="USE_TAB_CHARACTER" value="true" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
@ -35,6 +35,7 @@ $ROUTES["^ajouter-admin$"] = ["server_files/controllers/ajouter_admin.php"];
|
||||
$ROUTES["^calendrier/(modifier)$"] = ["server_files/controllers/calendrier.php", "edit"];
|
||||
$ROUTES["^calendrier/?$"] = ["server_files/controllers/calendrier.php"];
|
||||
$ROUTES["^commenter-echange-4$"] = ["server_files/controllers/commenter_echange.php"];
|
||||
$ROUTES["^commenter-echange-4/([A-Z]{3})$"] = ["server_files/controllers/commenter_echange.php", "trigram"];
|
||||
$ROUTES["^confirmer-mail/([a-z0-9]*)/?$"] = ["server_files/controllers/confirmer_mail.php", "token"];
|
||||
$ROUTES["^connexion/(confirmation-mail)/?$"] = ["server_files/controllers/connexion.php", "confirmation-mail"];
|
||||
$ROUTES["^connexion/(mdp-oublie)/?$"] = ["server_files/controllers/connexion.php", "mdp_oublie"];
|
||||
@ -42,6 +43,7 @@ $ROUTES["^connexion/(reinitialiser_mdp)/(.*)/?$"] = ["server_files/controllers/c
|
||||
$ROUTES["^connexion/?$"] = ["server_files/controllers/connexion.php"];
|
||||
$ROUTES["^deconnexion/?$"] = ["server_files/controllers/deconnexion.php"];
|
||||
$ROUTES["^envoyer-video-1$"] = ["server_files/controllers/envoyer_video.php"];
|
||||
$ROUTES["^envoyer-video-1/([A-Z]{3})$"] = ["server_files/controllers/envoyer_video.php", "trigram"];
|
||||
$ROUTES["^equipe/([A-Z]{3})/?$"] = ["server_files/controllers/equipe.php", "trigram"];
|
||||
$ROUTES["^exporter-donnees/?$"] = ["server_files/controllers/exporter_donnees.php"];
|
||||
$ROUTES["^file/([a-z0-9]{64})/?$"] = ["server_files/controllers/view_file.php", "file_id"];
|
||||
@ -51,12 +53,16 @@ $ROUTES["^mon-compte/?$"] = ["server_files/controllers/mon_compte.php"];
|
||||
$ROUTES["^mon-equipe/(diffusion-videos)/?$"] = ["server_files/controllers/mon_equipe.php", "publish_videos"];
|
||||
$ROUTES["^mon-equipe/(modifier)/?$"] = ["server_files/controllers/mon_equipe.php", "modifier"];
|
||||
$ROUTES["^mon-equipe/?$"] = ["server_files/controllers/mon_equipe.php"];
|
||||
$ROUTES["^mon-equipe/([A-Z]{3})/?$"] = ["server_files/controllers/mon_equipe.php", "trigram"];
|
||||
$ROUTES["^ma-participation/?$"] = ["server_files/controllers/ma_participation.php"];
|
||||
$ROUTES["^ma-participation/([A-Z]{3})/?$"] = ["server_files/controllers/ma_participation.php", "trigram"];
|
||||
$ROUTES["^poser-questions-2$"] = ["server_files/controllers/poser_questions.php"];
|
||||
$ROUTES["^poser-questions-2/([A-Z]{3})$"] = ["server_files/controllers/poser_questions.php", "trigram"];
|
||||
$ROUTES["^probleme/([0-4])/?$"] = ["server_files/controllers/probleme.php", "probleme"];
|
||||
$ROUTES["^profils-orphelins/?$"] = ["server_files/controllers/profils_orphelins.php"];
|
||||
$ROUTES["^rejoindre-equipe/?$"] = ["server_files/controllers/rejoindre_equipe.php"];
|
||||
$ROUTES["^repondre-questions-3$"] = ["server_files/controllers/repondre_questions.php"];
|
||||
$ROUTES["^repondre-questions-3/([A-Z]{3})$"] = ["server_files/controllers/repondre_questions.php"];
|
||||
$ROUTES["^suivi-correspondances/?$"] = ["server_files/controllers/suivi_correspondances.php"];
|
||||
|
||||
# Assets files
|
||||
|
@ -221,4 +221,20 @@ class Team
|
||||
{
|
||||
return $this->year;
|
||||
}
|
||||
|
||||
public function getAllDocuments()
|
||||
{
|
||||
global $DB;
|
||||
$req = $DB->query("SELECT * FROM `documents` AS `t1` "
|
||||
. "INNER JOIN (SELECT `team`, MAX(`uploaded_at`) AS `last_upload`, COUNT(`user`) AS `version` FROM `documents` GROUP BY `problem`, `user`, `team`) `t2` "
|
||||
. "ON `t1`.`team` = `t2`.`team` "
|
||||
. "WHERE `t1`.`uploaded_at` = `t2`.`last_upload` AND `t1`.`team` = $this->id;");
|
||||
|
||||
$docs = [];
|
||||
|
||||
while (($data = $req->fetch()) !== false)
|
||||
$docs[] = Document::fromData($data);
|
||||
|
||||
return $docs;
|
||||
}
|
||||
}
|
||||
|
@ -301,4 +301,18 @@ class User
|
||||
|
||||
return $docs;
|
||||
}
|
||||
|
||||
// Seulement pour les encadrants
|
||||
public function getTeams()
|
||||
{
|
||||
global $DB;
|
||||
$req = $DB->query("SELECT `id` FROM `teams` WHERE `encadrant` = $this->id;");
|
||||
|
||||
$teams = [];
|
||||
|
||||
while (($data =$req->fetch()) !== false)
|
||||
$teams[] = Team::fromId($data["id"]);
|
||||
|
||||
return $teams;
|
||||
}
|
||||
}
|
@ -214,7 +214,7 @@ class Config
|
||||
{
|
||||
global $DB, $YEAR;
|
||||
|
||||
if (isset($_SESSION["user_id"]) && $_SESSION["role"] == Role::ADMIN)
|
||||
if (isset($_SESSION["user_id"]) && $_SESSION["role"] == Role::ADMIN || isset($_SESSION["admin"]))
|
||||
return;
|
||||
|
||||
$DB->exec("UPDATE `config` SET `value` = " . ($this->views + 1) . " WHERE `key` = 'views_$YEAR';");
|
||||
|
@ -41,7 +41,7 @@ class NewTeam {
|
||||
global $CONFIG;
|
||||
|
||||
ensure(date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate(), "La date limite d'inscription est dépassée.");
|
||||
ensure($_SESSION["team"] == null, "Vous êtes déjà dans une équipe.");
|
||||
ensure($_SESSION["team"] == null || $_SESSION["role"] == Role::ENCADRANT, "Vous êtes déjà dans une équipe.");
|
||||
ensure($this->name != null && $this->name != "", "Vous devez spécifier un nom d'équipe.");
|
||||
ensure(preg_match("#^[\p{L} ]+$#ui", $this->name), "Le nom de l'équipe ne doit pas comporter de caractères spéciaux.");
|
||||
ensure(preg_match("#^[A-Z]{3}$#", $this->trigram), "Le trigramme entré n'est pas valide.");
|
||||
@ -61,10 +61,14 @@ class NewTeam {
|
||||
$req->execute([$this->name, $this->trigram, $this->problem, $_SESSION["role"] == Role::ENCADRANT ? $_SESSION["user_id"] : NULL,
|
||||
$_SESSION["role"] == Role::PARTICIPANT ? $_SESSION["user_id"] : NULL, $this->allow_publish, ValidationStatus::getName(ValidationStatus::NOT_READY), $this->access_code, $YEAR]);
|
||||
|
||||
$_SESSION["team"] = Team::fromTrigram($this->trigram);
|
||||
$_SESSION["user"]->setTeamId($_SESSION["team"]->getId());
|
||||
$_SESSION["teams"] = $_SESSION["user"]->getTeams();
|
||||
$team = Team::fromTrigram($this->trigram);
|
||||
if ($_SESSION["role"] == Role::PARTICIPANT) {
|
||||
$_SESSION["team"] = $team;
|
||||
$_SESSION["user"]->setTeamId($_SESSION["team"]->getId());
|
||||
}
|
||||
|
||||
Mailer::sendAddTeamMail($_SESSION["user"], $_SESSION["team"]);
|
||||
Mailer::sendAddTeamMail($_SESSION["user"], $team);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,19 @@
|
||||
<?php
|
||||
|
||||
/** @var Team $team */
|
||||
$team = $_SESSION["team"];
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT || Phase::getCurrentPhase() != Phase::PHASE4)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT || $team == null || Phase::getCurrentPhase() != Phase::PHASE4)
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId() || $team->getValidationStatus() != ValidationStatus::VALIDATED)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
if (isset($_POST["upload_answer"])) {
|
||||
|
@ -1,9 +1,19 @@
|
||||
<?php
|
||||
|
||||
/** @var Team $team */
|
||||
$team = $_SESSION["team"];
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT || $team == null || $team->getValidationStatus() != ValidationStatus::VALIDATED)
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
;$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId() || $team->getValidationStatus() != ValidationStatus::VALIDATED)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$has_error = false;
|
||||
|
@ -14,13 +14,13 @@ if ($_SESSION["role"] != Role::ADMIN) {
|
||||
if ($user === null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
$team = Team::fromId($user->getTeamId());
|
||||
$teams = $user->getTeams();
|
||||
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
||||
if (isset($_POST["kick"])) {
|
||||
if ($team == null) {
|
||||
if (sizeof($teams) == null) {
|
||||
$has_error = true;
|
||||
$error_message = "La personne à expulser n'est dans aucune équipe.";
|
||||
}
|
||||
@ -109,7 +109,7 @@ class AttributeTeam
|
||||
}
|
||||
}
|
||||
|
||||
if ($team != null)
|
||||
if ($teams != null)
|
||||
$documents = $user->getAllDocuments();
|
||||
|
||||
require_once "server_files/views/informations.php";
|
||||
|
@ -1,12 +1,18 @@
|
||||
<?php
|
||||
|
||||
if (isset($_SESSION["user_id"]) && isset($_SESSION["team"]) && $_SESSION["team"] !== null) {
|
||||
if (isset($_SESSION["user_id"]) && isset($_SESSION["teams"]) && sizeof($_SESSION["teams"]) > 0) {
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
* @var Team team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
$team = $_SESSION["team"];
|
||||
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId())
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$video = Video::getVideo(Reason::SOLUTION, $team);
|
||||
$questions_received = Question::getQuestionsTo($team);
|
||||
|
@ -38,15 +38,21 @@ if (isset($_POST["request_validation"])) {
|
||||
/** @var Question[][] $questions_received */
|
||||
$questions_received = [];
|
||||
|
||||
if (isset($_SESSION["user_id"]) && isset($_SESSION["team"]) && $_SESSION["team"] !== null) {
|
||||
if (isset($_SESSION["user_id"]) && isset($_SESSION["teams"]) && sizeof($_SESSION["teams"]) > 0) {
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
$team = $_SESSION["team"];
|
||||
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
$documents = $user->getAllDocuments();
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId())
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$documents = $team->getAllDocuments();
|
||||
}
|
||||
else
|
||||
require_once "server_files/403.php";
|
||||
|
@ -3,10 +3,17 @@
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT || Phase::getCurrentPhase() != Phase::PHASE2)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
/** @var Team $team */
|
||||
$team = $_SESSION["team"];
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId())
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$has_error = false;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
if (isset($_SESSION["team"]) || !isset($_SESSION["user"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT))
|
||||
if ((isset($_SESSION["team"]) && $_SESSION["role"] == Role::PARTICIPANT) || !isset($_SESSION["user"]) || ($_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT))
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$has_error = false;
|
||||
@ -34,6 +34,7 @@ class JoinTeam
|
||||
global $CONFIG;
|
||||
|
||||
ensure(date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate(), "La date limite d'inscription est dépassée.");
|
||||
ensure($_SESSION["team"] == null || $_SESSION["role"] == Role::ENCADRANT, "Vous êtes déjà dans une équipe.");
|
||||
ensure(preg_match("#[a-z0-9]{6}#", $this->access_code), "Le code d'accès doit comporter 6 caractères alphanumériques.");
|
||||
ensure($this->team != null, "Ce code d'accès est invalide.");
|
||||
ensure($this->team->getValidationStatus() == ValidationStatus::NOT_READY, "Cette équipe est déjà validée ou en cours de validation, vous ne pouvez pas la rejoindre.");
|
||||
|
@ -2,8 +2,18 @@
|
||||
if (!isset($_SESSION["user_id"]) || $_SESSION["role"] != Role::PARTICIPANT && $_SESSION["role"] != Role::ENCADRANT || Phase::getCurrentPhase() != Phase::PHASE3)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
/** @var Team $team */
|
||||
$team = $_SESSION["team"];
|
||||
/**
|
||||
* @var User $user
|
||||
* @var Team $team
|
||||
*/
|
||||
$user = $_SESSION["user"];
|
||||
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
||||
|
||||
if ($team == null)
|
||||
require_once "server_files/404.php";
|
||||
|
||||
if ($team->getEncadrantId() != $user->getId() || $team->getValidationStatus() != ValidationStatus::VALIDATED)
|
||||
require_once "server_files/403.php";
|
||||
|
||||
$has_error = false;
|
||||
$error_message = null;
|
||||
|
@ -6,6 +6,7 @@ function loadUserValues()
|
||||
unset($_SESSION["user"]);
|
||||
unset($_SESSION["role"]);
|
||||
unset($_SESSION["team"]);
|
||||
unset($_SESSION["teams"]);
|
||||
|
||||
if (isset($_SESSION["user_id"])) {
|
||||
$user = $_SESSION["user"] = User::fromId($_SESSION["user_id"]);
|
||||
@ -16,8 +17,10 @@ function loadUserValues()
|
||||
|
||||
$_SESSION["role"] = $user->getRole();
|
||||
|
||||
if ($user->getTeamId() !== null)
|
||||
$_SESSION["team"] = Team::fromId($user->getTeamId());
|
||||
$_SESSION["teams"] = $user->getTeams();
|
||||
|
||||
if ($user->getRole() == Role::PARTICIPANT)
|
||||
$_SESSION["team"] = sizeof($_SESSION["teams"]) > 0 ? $_SESSION["teams"][0] : null;
|
||||
}
|
||||
|
||||
if (isset($_GET["view-as-admin"])) {
|
||||
@ -65,6 +68,8 @@ function quitTeam($user_id = -1)
|
||||
|
||||
$_SESSION["team"] = null;
|
||||
unset($_SESSION["team"]);
|
||||
|
||||
$_SESSION["teams"] = $user->getTeams();
|
||||
}
|
||||
|
||||
function userExists($email)
|
||||
|
@ -11,7 +11,7 @@ require_once "header.php";
|
||||
Votre équipe a bien été créée ! Voici le code d'accès à transmettre aux autres membres de votre équipe :
|
||||
<strong><?= $new_team->access_code ?></strong>
|
||||
</div>
|
||||
<?php } elseif ($_SESSION["team"] != NULL) { ?>
|
||||
<?php } elseif ($_SESSION["team"] != NULL && $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
||||
<div class="alert alert-danger">
|
||||
Vous êtes déjà dans une équipe.
|
||||
</div>
|
||||
@ -21,6 +21,12 @@ require_once "header.php";
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if ($_SESSION["role"] == Role::ENCADRANT && sizeof($_SESSION["teams"]) > 0) { ?>
|
||||
<div class="alert alert-warning">
|
||||
Vous êtes déjà inscrit dans une équipe. Vous pouvez toutefois encadrer plusieurs équipes.
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="alert alert-info">
|
||||
Chacune des informations pourra être modifiée avant que l'équipe tant que l'équipe n'est pas validée.
|
||||
</div>
|
||||
|
@ -37,7 +37,7 @@
|
||||
<a class="nav-link" href="/mon-compte">Mon compte</a>
|
||||
</li>
|
||||
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
||||
<?php if ($_SESSION["team"] == NULL) {
|
||||
<?php if ($_SESSION["team"] == NULL || $_SESSION["role"] == Role::ENCADRANT) {
|
||||
if (date("Y-m-d H:i:s") < $CONFIG->getInscriptionDate()) { ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/ajouter-equipe">
|
||||
Ajouter une équipe</a>
|
||||
@ -46,34 +46,43 @@
|
||||
Rejoindre une équipe</a>
|
||||
</li>
|
||||
<?php }
|
||||
} else { ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/mon-equipe">Mon équipe</a></li>
|
||||
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/ma-participation">Ma participation</a></li>
|
||||
}
|
||||
{
|
||||
/**
|
||||
* @var Team $_team
|
||||
*/
|
||||
foreach ($_SESSION["teams"] as $_team) {
|
||||
$appendice = $_SESSION["role"] == Role::ENCADRANT ? "/" . $_team->getTrigram() : "";
|
||||
$info = sizeof($_SESSION["teams"]) > 1 ? " (" . $_team->getTrigram() . ")" : "";
|
||||
?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/mon-equipe<?= $appendice ?>">Mon équipe<?=$info?></a></li>
|
||||
<?php if ($_team->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/ma-participation<?= $appendice ?>">Ma participation<?=$info?></a></li>
|
||||
<?php
|
||||
switch (Phase::getCurrentPhase()) {
|
||||
case Phase::PHASE1: ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/envoyer-video-1">
|
||||
Envoyer ma vidéo (phase 1)</a>
|
||||
<li class="nav-item active"><a class="nav-link" href="/envoyer-video-1<?= $appendice ?>">
|
||||
Envoyer ma vidéo (phase 1)<?=$info?></a>
|
||||
</li>
|
||||
<?php break;
|
||||
case Phase::PHASE2: ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/poser-questions-2">
|
||||
Poser des questions (phase 2)</a>
|
||||
<li class="nav-item active"><a class="nav-link" href="/poser-questions-2<?= $appendice ?>">
|
||||
Poser des questions (phase 2)<?=$info?></a>
|
||||
</li>
|
||||
<?php break;
|
||||
case Phase::PHASE3: ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/repondre-questions-3">
|
||||
Répondre aux questions (phase 3)</a>
|
||||
<li class="nav-item active"><a class="nav-link" href="/repondre-questions-3<?= $appendice ?>">
|
||||
Répondre aux questions (phase 3)<?=$info?></a>
|
||||
</li>
|
||||
<?php break;
|
||||
case Phase::PHASE4: ?>
|
||||
<li class="nav-item active"><a class="nav-link" href="/commenter-echange-4">
|
||||
Commenter l'échange (phase 4)</a></li>
|
||||
<li class="nav-item active"><a class="nav-link" href="/commenter-echange-4<?= $appendice ?>">
|
||||
Commenter l'échange (phase 4)<?=$info?></a></li>
|
||||
<?php break;
|
||||
}
|
||||
} ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<li class="nav-item active">
|
||||
@ -135,4 +144,12 @@ if (isset($has_error) && $has_error) { ?>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Erreur :</strong> <?= $error_message ?>
|
||||
</div>
|
||||
<?php }
|
||||
<?php }
|
||||
|
||||
if (!isset($_SESSION["role"]) || $_SESSION["role"] != Role::ADMIN && !isset($_SESSION["admin"])) { ?>
|
||||
<div class="alert alert-warning">
|
||||
Le site est actuellement en maintenance. Veuillez réessayer ultérieurement.
|
||||
</div>
|
||||
<?php
|
||||
exit(-1);
|
||||
}
|
@ -124,6 +124,11 @@ require_once "header.php";
|
||||
Votre équipe est en attente de validation.
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<hr />
|
||||
|
||||
<h2>Autorisations de l'équipe</h2>
|
||||
<?php printDocuments($documents); ?>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
|
@ -15,6 +15,12 @@ require_once "header.php" ; ?>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if ($_SESSION["role"] == Role::ENCADRANT && sizeof($_SESSION["teams"]) > 0) { ?>
|
||||
<div class="alert alert-warning">
|
||||
Vous êtes déjà inscrit dans une équipe. Vous pouvez toutefois encadrer plusieurs équipes.
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<form method="POST">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
|
Loading…
Reference in New Issue
Block a user