diff --git a/dispatcher.php b/dispatcher.php index 274617e..95267f0 100644 --- a/dispatcher.php +++ b/dispatcher.php @@ -3,7 +3,6 @@ require_once "server_files/config.php"; require_once "server_files/classes/Document.php"; -require_once "server_files/classes/DocumentType.php"; require_once "server_files/classes/Phase.php"; require_once "server_files/classes/Question.php"; require_once "server_files/classes/Reason.php"; diff --git a/server_files/classes/Document.php b/server_files/classes/Document.php index 6b8cbaf..05e3977 100644 --- a/server_files/classes/Document.php +++ b/server_files/classes/Document.php @@ -6,7 +6,6 @@ class Document private $user_id; private $team_id; private $problem; - private $type; private $uploaded_at; private $version; @@ -38,7 +37,6 @@ class Document $this->user_id = $data["user"]; $this->team_id = $data["team"]; $this->problem = $data["problem"]; - $this->type = DocumentType::fromName($data["type"]); $this->uploaded_at = $data["uploaded_at"]; $this->version = isset($data["version"]) ? $data["version"] : 1; } @@ -63,11 +61,6 @@ class Document return $this->problem; } - public function getType() - { - return $this->type; - } - public function getUploadedAt() { return $this->uploaded_at; @@ -86,7 +79,7 @@ class Document $req = $DB->query("SELECT * FROM `documents` AS `t1` " . "INNER JOIN (SELECT `user`, `problem`, MAX(`uploaded_at`) AS `last_upload`, COUNT(`team`) AS `version` FROM `documents` GROUP BY `problem`, `user`) `t2` " . "ON `t1`.`user` = `t2`.`user` AND `t1`.`problem` = `t2`.`problem` " - . "WHERE `t1`.`uploaded_at` = `t2`.`last_upload` AND `t1`.`problem` = $problem " . ($team_id >= 0 ? "AND `team` = $team_id" : "") . " ORDER BY `t1`.`type`;"); + . "WHERE `t1`.`uploaded_at` = `t2`.`last_upload` AND `t1`.`problem` = $problem " . ($team_id >= 0 ? "AND `team` = $team_id" : "") . ";"); $docs = []; diff --git a/server_files/classes/DocumentType.php b/server_files/classes/DocumentType.php deleted file mode 100644 index 87b2c06..0000000 --- a/server_files/classes/DocumentType.php +++ /dev/null @@ -1,28 +0,0 @@ -getUserId()); $surname = $user->getSurname(); $first_name = $user->getFirstName(); - $name = DocumentType::getTranslatedName($document->getType()); + $name = "Autorisation de droit à l'image"; $version = $document->getVersion(); echo "$name de $first_name $surname (version $version) : Télécharger
\n"; } diff --git a/server_files/views/equipe.php b/server_files/views/equipe.php index 48bfe69..3a69a17 100644 --- a/server_files/views/equipe.php +++ b/server_files/views/equipe.php @@ -4,7 +4,7 @@ Nom de l'équipe : getName() ?>
Trigramme : getTrigram() ?>
- Problème : getProblem() ?>
+ Problème : getProblem() ?>
getEncadrantId() !== null) { $encadrant = User::fromId($team->getEncadrantId()); diff --git a/server_files/views/informations.php b/server_files/views/informations.php index 5a516db..3bd83a2 100644 --- a/server_files/views/informations.php +++ b/server_files/views/informations.php @@ -1,35 +1,44 @@ -
-

getFirstName() . " " . $user->getSurname() ?>

-
+
+

getFirstName() . " " . $user->getSurname() ?>

+
getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?> -
- Équipe : getTrigram() . "\">" - . $team->getName() . " (" . $team->getTrigram() . ")" ?> +
+ Équipe + : getTrigram() . "\">" + . $team->getName() . " (" . $team->getTrigram() . ")" ?>
getRole() == Role::PARTICIPANT) { ?>
- Lycée : getSchool() ?>
+ Lycée : getSchool() ?>
Classe : getClass()) ?>
getDescription() != "") { ?> -
+
Description : getDescription() ?>
- -echo "
"; +
+ Adresse e-mail : getEmail() ?> +
-if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?> +
+ Autorise Animath à envoyer des mails : doReceiveAnimathMails() ? "oui" : "non" ?> +
+ +
+ +getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>

Autorisation de droit à l'image :

-