1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-26 22:26:28 +00:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Emmy D'Anello
7dc812984b
Add position field for passages
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2023-04-07 00:06:21 +02:00
Emmy D'Anello
1ed4e9c17a
Add multiple sheets for 5-teams pools
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2023-04-06 23:58:59 +02:00
Emmy D'Anello
5f09c35dee
Add notation sheets templates that are autocompleted with the data
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2023-04-06 23:38:59 +02:00
12 changed files with 574 additions and 188 deletions

View File

@ -375,10 +375,11 @@ class Pool(models.Model):
[4, 1, 2],
]
for line in table:
for i, line in enumerate(table):
# Create the passage
await Passage.objects.acreate(
pool=self.associated_pool,
position=i + 1,
solution_number=tds[line[0]].accepted,
defender=tds[line[0]].participation,
opponent=tds[line[1]].participation,

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-05 18:54+0200\n"
"POT-Creation-Date: 2023-04-07 00:04+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -33,7 +33,7 @@ msgstr "équipes"
msgid "tournament"
msgstr "tournoi"
#: draw/admin.py:60 draw/models.py:228 draw/models.py:414
#: draw/admin.py:60 draw/models.py:228 draw/models.py:415
#: participation/models.py:355
msgid "round"
msgstr "tour"
@ -42,68 +42,68 @@ msgstr "tour"
msgid "Draw"
msgstr "Tirage au sort"
#: draw/consumers.py:25
#: draw/consumers.py:28
msgid "You are not an organizer."
msgstr "Vous n'êtes pas un⋅e organisateur⋅rice."
#: draw/consumers.py:148
#: draw/consumers.py:151
msgid "The draw is already started."
msgstr "Le tirage a déjà commencé."
#: draw/consumers.py:154
#: draw/consumers.py:157
msgid "Invalid format"
msgstr "Format invalide"
#: draw/consumers.py:159
#: draw/consumers.py:162
#, python-brace-format
msgid "The sum must be equal to the number of teams: expected {len}, got {sum}"
msgstr ""
"La somme doit être égale au nombre d'équipes : attendu {len}, obtenu {sum}"
#: draw/consumers.py:164
#: draw/consumers.py:167
msgid "There can be at most one pool with 5 teams."
msgstr "Il ne peut y avoir au plus qu'une seule poule de 5 équipes."
#: draw/consumers.py:192
#: draw/consumers.py:195
msgid "Draw started!"
msgstr "Le tirage a commencé !"
#: draw/consumers.py:212
#: draw/consumers.py:215
#, python-brace-format
msgid "The draw for the tournament {tournament} will start."
msgstr "Le tirage au sort du tournoi {tournament} va commencer."
#: draw/consumers.py:223 draw/consumers.py:248 draw/consumers.py:579
#: draw/consumers.py:768 draw/consumers.py:850 draw/consumers.py:867
#: draw/consumers.py:937 draw/templates/draw/tournament_content.html:5
#: draw/consumers.py:226 draw/consumers.py:251 draw/consumers.py:585
#: draw/consumers.py:774 draw/consumers.py:856 draw/consumers.py:873
#: draw/consumers.py:943 draw/templates/draw/tournament_content.html:5
msgid "The draw has not started yet."
msgstr "Le tirage au sort n'a pas encore commencé."
#: draw/consumers.py:235
#: draw/consumers.py:238
#, python-brace-format
msgid "The draw for the tournament {tournament} is aborted."
msgstr "Le tirage au sort du tournoi {tournament} est annulé."
#: draw/consumers.py:275 draw/consumers.py:296 draw/consumers.py:525
#: draw/consumers.py:584 draw/consumers.py:773
#: draw/consumers.py:278 draw/consumers.py:299 draw/consumers.py:531
#: draw/consumers.py:590 draw/consumers.py:779
msgid "This is not the time for this."
msgstr "Ce n'est pas le moment pour cela."
#: draw/consumers.py:288 draw/consumers.py:291
#: draw/consumers.py:291 draw/consumers.py:294
msgid "You've already launched the dice."
msgstr "Vous avez déjà lancé le dé."
#: draw/consumers.py:294
#: draw/consumers.py:297
msgid "It is not your turn."
msgstr "Ce n'est pas votre tour."
#: draw/consumers.py:372
#: draw/consumers.py:378
#, python-brace-format
msgid "Dices from teams {teams} are identical. Please relaunch your dices."
msgstr ""
"Les dés des équipes {teams} sont identiques. Merci de relancer vos dés."
#: draw/consumers.py:870
#: draw/consumers.py:876
msgid "This is only available for the final tournament."
msgstr "Cela n'est possible que pour la finale."
@ -201,78 +201,78 @@ msgstr "poule associée"
msgid "The full pool instance."
msgstr "L'instance complète de la poule."
#: draw/models.py:392
#: draw/models.py:393
#, python-brace-format
msgid "Pool {letter}{number}"
msgstr "Poule {letter}{number}"
#: draw/models.py:395 draw/models.py:422 participation/admin.py:69
#: draw/models.py:396 draw/models.py:423 participation/admin.py:69
#: participation/admin.py:88 participation/models.py:421
#: participation/models.py:430 participation/tables.py:82
msgid "pool"
msgstr "poule"
#: draw/models.py:396 participation/models.py:422
#: draw/models.py:397 participation/models.py:422
msgid "pools"
msgstr "poules"
#: draw/models.py:408 participation/models.py:342 participation/models.py:554
#: participation/models.py:584 participation/models.py:622
#: draw/models.py:409 participation/models.py:342 participation/models.py:562
#: participation/models.py:592 participation/models.py:630
msgid "participation"
msgstr "participation"
#: draw/models.py:429
#: draw/models.py:430
msgid "passage index"
msgstr "numéro de passage"
#: draw/models.py:430
#: draw/models.py:431
msgid ""
"The passage order in the pool, between 0 and the size of the pool minus 1."
msgstr ""
"L'ordre de passage dans la poule, de 0 à la taille de la poule moins 1."
#: draw/models.py:438
#: draw/models.py:439
msgid "choose index"
msgstr "numéro de choix"
#: draw/models.py:439
#: draw/models.py:440
msgid ""
"The choice order in the pool, between 0 and the size of the pool minus 1."
msgstr ""
"L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1."
#: draw/models.py:445 draw/models.py:468 participation/models.py:437
#: participation/models.py:591
#: draw/models.py:446 draw/models.py:469 participation/models.py:444
#: participation/models.py:599
#, python-brace-format
msgid "Problem #{problem}"
msgstr "Problème n°{problem}"
#: draw/models.py:449 draw/models.py:472
#: draw/models.py:450 draw/models.py:473
msgid "accepted problem"
msgstr "problème accepté"
#: draw/models.py:456
#: draw/models.py:457
msgid "passage dice"
msgstr "dé d'ordre de passage"
#: draw/models.py:463
#: draw/models.py:464
msgid "choice dice"
msgstr "dé d'ordre de choix"
#: draw/models.py:477
#: draw/models.py:478
msgid "rejected problems"
msgstr "problèmes rejetés"
#: draw/models.py:503
#: draw/models.py:504
#, python-brace-format
msgid "Draw of the team {trigram} for the pool {letter}{number}"
msgstr "Tirage de l'équipe {trigram} pour la poule {letter}{number}"
#: draw/models.py:509
#: draw/models.py:510
msgid "team draw"
msgstr "tirage d'équipe"
#: draw/models.py:510
#: draw/models.py:511
msgid "team draws"
msgstr "tirages d'équipe"
@ -288,70 +288,74 @@ msgstr "Démarrer !"
msgid "Last dices"
msgstr "Derniers jets de dés"
#: draw/templates/draw/tournament_content.html:129
msgid "Launch dice"
msgstr "Lancer le dé"
#: draw/templates/draw/tournament_content.html:143
msgid "Draw a problem"
msgstr "Tirer un problème"
#: draw/templates/draw/tournament_content.html:154
msgid "Accept"
msgstr "Accepter"
#: draw/templates/draw/tournament_content.html:157
msgid "Decline"
msgstr "Refuser"
#: draw/templates/draw/tournament_content.html:168
msgid "Export"
msgstr "Exporter"
#: draw/templates/draw/tournament_content.html:176
msgid "Continue draw"
msgstr "Continuer le tirage"
#: draw/templates/draw/tournament_content.html:183
#: draw/templates/draw/tournament_content.html:61
msgid "Cancel last step"
msgstr "Annuler la dernière étape"
#: draw/templates/draw/tournament_content.html:215 participation/admin.py:100
#: draw/templates/draw/tournament_content.html:136
msgid "Launch dice"
msgstr "Lancer le dé"
#: draw/templates/draw/tournament_content.html:150
msgid "Draw a problem"
msgstr "Tirer un problème"
#: draw/templates/draw/tournament_content.html:161
msgid "Accept"
msgstr "Accepter"
#: draw/templates/draw/tournament_content.html:164
msgid "Decline"
msgstr "Refuser"
#: draw/templates/draw/tournament_content.html:175
msgid "Export"
msgstr "Exporter"
#: draw/templates/draw/tournament_content.html:183
msgid "Continue draw"
msgstr "Continuer le tirage"
#: draw/templates/draw/tournament_content.html:216 participation/admin.py:100
#: participation/models.py:125 participation/models.py:310
#: registration/models.py:127
msgid "team"
msgstr "équipe"
#: draw/templates/draw/tournament_content.html:225
#: draw/templates/draw/tournament_content.html:226
#: draw/templates/draw/tournament_content.html:227
#: draw/templates/draw/tournament_content.html:228
#: draw/templates/draw/tournament_content.html:229
#: draw/templates/draw/tournament_content.html:230
#: participation/templates/participation/pool_detail.html:62
#: participation/templates/participation/pool_detail.html:66
#: participation/templates/participation/pool_detail.html:72
#: participation/templates/participation/pool_detail.html:76
msgid "Room"
msgstr "Salle"
#: draw/templates/draw/tournament_content.html:335
#: draw/templates/draw/tournament_content.html:353
#: draw/templates/draw/tournament_content.html:354
msgid "Abort"
msgstr "Annuler"
#: draw/templates/draw/tournament_content.html:344
#: draw/templates/draw/tournament_content.html:345
msgid "Are you sure?"
msgstr "Êtes-vous sûr⋅e ?"
#: draw/templates/draw/tournament_content.html:348
#: draw/templates/draw/tournament_content.html:349
msgid "This will reset the draw from the beginning."
msgstr "Cela va réinitialiser le tirage au sort depuis le début."
#: draw/templates/draw/tournament_content.html:349
#: draw/templates/draw/tournament_content.html:350
msgid "This operation is irreversible."
msgstr "Cette opération est irréversible."
#: draw/templates/draw/tournament_content.html:350
#: draw/templates/draw/tournament_content.html:351
msgid "Are you sure you want to abort this draw?"
msgstr "Êtes-vous sûr·e de vouloir annuler le tirage au sort ?"
#: draw/templates/draw/tournament_content.html:354
#: draw/templates/draw/tournament_content.html:355
#: tfjm/templates/base_modal.html:17
msgid "Close"
msgstr "Fermer"
@ -430,21 +434,21 @@ msgid "selected for final"
msgstr "sélectionnée pour la finale"
#: participation/admin.py:57 participation/admin.py:116
#: participation/models.py:444 participation/tables.py:109
#: participation/models.py:451 participation/tables.py:109
msgid "defender"
msgstr "défenseur⋅se"
#: participation/admin.py:61 participation/models.py:451
#: participation/models.py:634
#: participation/admin.py:61 participation/models.py:458
#: participation/models.py:642
msgid "opponent"
msgstr "opposant⋅e"
#: participation/admin.py:65 participation/models.py:458
#: participation/models.py:635
#: participation/admin.py:65 participation/models.py:465
#: participation/models.py:643
msgid "reporter"
msgstr "rapporteur⋅e"
#: participation/admin.py:120 participation/models.py:589
#: participation/admin.py:120 participation/models.py:597
msgid "problem"
msgstr "numéro de problème"
@ -502,7 +506,7 @@ msgid "Add new jury"
msgstr "Ajouter un⋅e nouvelleau juré⋅e"
#: participation/forms.py:225
#: participation/templates/participation/pool_detail.html:77
#: participation/templates/participation/pool_detail.html:101
#: participation/templates/participation/tournament_detail.html:111
msgid "Add"
msgstr "Ajouter"
@ -695,14 +699,18 @@ msgid "Pool of day {round} for tournament {tournament} with teams {teams}"
msgstr "Poule du jour {round} du tournoi {tournament} avec les équipes {teams}"
#: participation/models.py:435
msgid "position"
msgstr "position"
#: participation/models.py:442
msgid "defended solution"
msgstr "solution défendue"
#: participation/models.py:463
#: participation/models.py:470
msgid "penalties"
msgstr "pénalités"
#: participation/models.py:465
#: participation/models.py:472
msgid ""
"Number of penalties for the defender. The defender will loose a 0.5 "
"coefficient per penalty."
@ -710,120 +718,120 @@ msgstr ""
"Nombre de pénalités pour læ défenseur⋅se. Læ défenseur⋅se perd un "
"coefficient 0.5 sur sa présentation orale par pénalité."
#: participation/models.py:525 participation/models.py:528
#: participation/models.py:531
#: participation/models.py:532 participation/models.py:535
#: participation/models.py:538
#, python-brace-format
msgid "Team {trigram} is not registered in the pool."
msgstr "L'équipe {trigram} n'est pas inscrite dans la poule."
#: participation/models.py:536
#: participation/models.py:543
#, python-brace-format
msgid "Passage of {defender} for problem {problem}"
msgstr "Passage de {defender} pour le problème {problem}"
#: participation/models.py:540 participation/models.py:548
#: participation/models.py:629 participation/models.py:671
#: participation/models.py:547 participation/models.py:556
#: participation/models.py:637 participation/models.py:679
msgid "passage"
msgstr "passage"
#: participation/models.py:541
#: participation/models.py:548
msgid "passages"
msgstr "passages"
#: participation/models.py:559
#: participation/models.py:567
msgid "difference"
msgstr "différence"
#: participation/models.py:560
#: participation/models.py:568
msgid "Score to add/remove on the final score"
msgstr "Score à ajouter/retrancher au score final"
#: participation/models.py:567
#: participation/models.py:575
msgid "tweak"
msgstr "harmonisation"
#: participation/models.py:568
#: participation/models.py:576
msgid "tweaks"
msgstr "harmonisations"
#: participation/models.py:596
#: participation/models.py:604
msgid "solution for the final tournament"
msgstr "solution pour la finale"
#: participation/models.py:601 participation/models.py:640
#: participation/models.py:609 participation/models.py:648
msgid "file"
msgstr "fichier"
#: participation/models.py:607
#: participation/models.py:615
#, python-brace-format
msgid "Solution of team {team} for problem {problem}"
msgstr "Solution de l'équipe {team} pour le problème {problem}"
#: participation/models.py:609
#: participation/models.py:617
msgid "for final"
msgstr "pour la finale"
#: participation/models.py:612
#: participation/models.py:620
msgid "solution"
msgstr "solution"
#: participation/models.py:613
#: participation/models.py:621
msgid "solutions"
msgstr "solutions"
#: participation/models.py:646
#: participation/models.py:654
#, python-brace-format
msgid "Synthesis of {team} as {type} for problem {problem} of {defender}"
msgstr ""
"Note de synthèse de l'équipe {team} en tant que {type} pour le problème "
"{problem} de {defender}"
#: participation/models.py:654
#: participation/models.py:662
msgid "synthesis"
msgstr "note de synthèse"
#: participation/models.py:655
#: participation/models.py:663
msgid "syntheses"
msgstr "notes de synthèse"
#: participation/models.py:664
#: participation/models.py:672
msgid "jury"
msgstr "jury"
#: participation/models.py:676
#: participation/models.py:684
msgid "defender writing note"
msgstr "note d'écrit de læ défenseur⋅se"
#: participation/models.py:682
#: participation/models.py:690
msgid "defender oral note"
msgstr "note d'oral de læ défenseur⋅se"
#: participation/models.py:688
#: participation/models.py:696
msgid "opponent writing note"
msgstr "note d'écrit de l'opposant⋅e"
#: participation/models.py:694
#: participation/models.py:702
msgid "opponent oral note"
msgstr "note d'oral de l'opposant⋅e"
#: participation/models.py:700
#: participation/models.py:708
msgid "reporter writing note"
msgstr "note d'écrit de læ rapporteur⋅e"
#: participation/models.py:706
#: participation/models.py:714
msgid "reporter oral note"
msgstr "note d'oral de læ rapporteur⋅e"
#: participation/models.py:724
#: participation/models.py:732
#, python-brace-format
msgid "Notes of {jury} for {passage}"
msgstr "Notes de {jury} pour le {passage}"
#: participation/models.py:731
#: participation/models.py:739
msgid "note"
msgstr "note"
#: participation/models.py:732
#: participation/models.py:740
msgid "notes"
msgstr "notes"
@ -903,13 +911,13 @@ msgid "Join"
msgstr "Rejoindre"
#: participation/templates/participation/note_form.html:11
#: participation/templates/participation/passage_detail.html:46
#: participation/templates/participation/passage_detail.html:102
#: participation/templates/participation/passage_detail.html:108
#: participation/templates/participation/passage_detail.html:49
#: participation/templates/participation/passage_detail.html:105
#: participation/templates/participation/passage_detail.html:111
#: participation/templates/participation/pool_add_jurys.html:35
#: participation/templates/participation/pool_detail.html:63
#: participation/templates/participation/pool_detail.html:82
#: participation/templates/participation/pool_detail.html:87
#: participation/templates/participation/pool_detail.html:88
#: participation/templates/participation/pool_detail.html:106
#: participation/templates/participation/pool_detail.html:111
#: participation/templates/participation/team_detail.html:126
#: participation/templates/participation/team_detail.html:190
#: participation/templates/participation/tournament_form.html:12
@ -972,8 +980,8 @@ msgid "Upload solution"
msgstr "Envoyer une solution"
#: participation/templates/participation/participation_detail.html:59
#: participation/templates/participation/passage_detail.html:114
#: participation/templates/participation/pool_detail.html:92
#: participation/templates/participation/passage_detail.html:117
#: participation/templates/participation/pool_detail.html:116
#: participation/templates/participation/team_detail.html:185
#: participation/templates/participation/upload_motivation_letter.html:13
#: participation/templates/participation/upload_notes.html:24
@ -996,84 +1004,88 @@ msgid "Pool:"
msgstr "Poule :"
#: participation/templates/participation/passage_detail.html:16
msgid "Position:"
msgstr "Position :"
#: participation/templates/participation/passage_detail.html:19
msgid "Defender:"
msgstr "Défenseur⋅se :"
#: participation/templates/participation/passage_detail.html:19
#: participation/templates/participation/passage_detail.html:22
msgid "Opponent:"
msgstr "Opposant⋅e :"
#: participation/templates/participation/passage_detail.html:22
#: participation/templates/participation/passage_detail.html:25
msgid "Reporter:"
msgstr "Rapporteur⋅e :"
#: participation/templates/participation/passage_detail.html:25
#: participation/templates/participation/passage_detail.html:28
msgid "Defended solution:"
msgstr "Solution défendue"
#: participation/templates/participation/passage_detail.html:28
#: participation/templates/participation/passage_detail.html:31
msgid "Defender penalties count:"
msgstr "Nombre de pénalités :"
#: participation/templates/participation/passage_detail.html:31
#: participation/templates/participation/passage_detail.html:34
msgid "Syntheses:"
msgstr "Notes de synthèse :"
#: participation/templates/participation/passage_detail.html:36
#: participation/templates/participation/passage_detail.html:39
msgid "No synthesis was uploaded yet."
msgstr "Aucune note de synthèse n'a encore été envoyée."
#: participation/templates/participation/passage_detail.html:44
#: participation/templates/participation/passage_detail.html:107
#: participation/templates/participation/passage_detail.html:47
#: participation/templates/participation/passage_detail.html:110
msgid "Update notes"
msgstr "Modifier les notes"
#: participation/templates/participation/passage_detail.html:50
#: participation/templates/participation/passage_detail.html:113
#: participation/templates/participation/passage_detail.html:53
#: participation/templates/participation/passage_detail.html:116
msgid "Upload synthesis"
msgstr "Envoyer une note de synthèse"
#: participation/templates/participation/passage_detail.html:58
#: participation/templates/participation/passage_detail.html:61
msgid "Notes detail"
msgstr "Détails des notes"
#: participation/templates/participation/passage_detail.html:65
#: participation/templates/participation/passage_detail.html:68
msgid "Average points for the defender writing:"
msgstr "Moyenne de l'écrit de læ défenseur⋅se :"
#: participation/templates/participation/passage_detail.html:68
#: participation/templates/participation/passage_detail.html:71
msgid "Average points for the defender oral:"
msgstr "Moyenne de l'oral de læ défenseur⋅se :"
#: participation/templates/participation/passage_detail.html:71
#: participation/templates/participation/passage_detail.html:74
msgid "Average points for the opponent writing:"
msgstr "Moyenne de l'écrit de l'opposant⋅e :"
#: participation/templates/participation/passage_detail.html:74
#: participation/templates/participation/passage_detail.html:77
msgid "Average points for the opponent oral:"
msgstr "Moyenne de l'oral de l'opposant⋅e :"
#: participation/templates/participation/passage_detail.html:77
#: participation/templates/participation/passage_detail.html:80
msgid "Average points for the reporter writing:"
msgstr "Moyenne de l'écrit de læ rapporteur⋅e :"
#: participation/templates/participation/passage_detail.html:80
#: participation/templates/participation/passage_detail.html:83
msgid "Average points for the reporter oral:"
msgstr "Moyenne de l'oral de læ rapporteur⋅e :"
#: participation/templates/participation/passage_detail.html:87
#: participation/templates/participation/passage_detail.html:90
msgid "Defender points:"
msgstr "Points de læ défenseur⋅se :"
#: participation/templates/participation/passage_detail.html:90
#: participation/templates/participation/passage_detail.html:93
msgid "Opponent points:"
msgstr "Points de l'opposant⋅e :"
#: participation/templates/participation/passage_detail.html:93
#: participation/templates/participation/passage_detail.html:96
msgid "Reporter points:"
msgstr "Points de læ rapporteur⋅e :"
#: participation/templates/participation/passage_detail.html:101
#: participation/templates/participation/passage_detail.html:104
#: participation/templates/participation/passage_form.html:11
msgid "Update passage"
msgstr "Modifier le passage"
@ -1092,7 +1104,7 @@ msgstr ""
#: participation/templates/participation/pool_add_jurys.html:11
#: participation/templates/participation/pool_add_jurys.html:34
#: participation/templates/participation/pool_detail.html:81
#: participation/templates/participation/pool_detail.html:105
#: participation/templates/participation/pool_form.html:11
msgid "Update pool"
msgstr "Modifier la poule"
@ -1143,24 +1155,32 @@ msgid "Ranking"
msgstr "Classement"
#: participation/templates/participation/pool_detail.html:62
#: participation/templates/participation/pool_detail.html:76
msgid "Add passage"
msgstr "Ajouter un passage"
msgid "Download the scale sheet"
msgstr "Télécharger la feuille de barème"
#: participation/templates/participation/pool_detail.html:64
#: participation/templates/participation/pool_detail.html:86
msgid "Update teams"
msgstr "Modifier les équipes"
#: participation/templates/participation/pool_detail.html:72
msgid "Download the final notation sheet"
msgstr "Télécharger la fiche de notation finale"
#: participation/templates/participation/pool_detail.html:65
#: participation/templates/participation/pool_detail.html:80
msgid "Upload notes from a CSV file"
msgstr "Soumettre les notes à partir d'un fichier CSV"
#: participation/templates/participation/pool_detail.html:72
#: participation/templates/participation/pool_detail.html:87
#: participation/templates/participation/pool_detail.html:100
msgid "Add passage"
msgstr "Ajouter un passage"
#: participation/templates/participation/pool_detail.html:89
#: participation/templates/participation/pool_detail.html:110
msgid "Update teams"
msgstr "Modifier les équipes"
#: participation/templates/participation/pool_detail.html:96
msgid "Passages"
msgstr "Passages"
#: participation/templates/participation/pool_detail.html:91
#: participation/templates/participation/pool_detail.html:115
msgid "Upload notes"
msgstr "Envoyer les notes"
@ -1294,7 +1314,7 @@ msgid "Invalidate"
msgstr "Invalider"
#: participation/templates/participation/team_detail.html:184
#: participation/views.py:335
#: participation/views.py:337
msgid "Upload motivation letter"
msgstr "Envoyer la lettre de motivation"
@ -1303,7 +1323,7 @@ msgid "Update team"
msgstr "Modifier l'équipe"
#: participation/templates/participation/team_detail.html:194
#: participation/views.py:444
#: participation/views.py:446
msgid "Leave team"
msgstr "Quitter l'équipe"
@ -1415,49 +1435,49 @@ msgstr "Télécharger la fiche de notation vierge"
msgid "Templates:"
msgstr "Modèles :"
#: participation/views.py:46 tfjm/templates/base.html:73
#: participation/views.py:48 tfjm/templates/base.html:73
#: tfjm/templates/base.html:254
msgid "Create team"
msgstr "Créer une équipe"
#: participation/views.py:55 participation/views.py:100
#: participation/views.py:57 participation/views.py:102
msgid "You don't participate, so you can't create a team."
msgstr "Vous ne participez pas, vous ne pouvez pas créer d'équipe."
#: participation/views.py:57 participation/views.py:102
#: participation/views.py:59 participation/views.py:104
msgid "You are already in a team."
msgstr "Vous êtes déjà dans une équipe."
#: participation/views.py:91 tfjm/templates/base.html:78
#: participation/views.py:93 tfjm/templates/base.html:78
#: tfjm/templates/base.html:249
msgid "Join team"
msgstr "Rejoindre une équipe"
#: participation/views.py:153 participation/views.py:450
#: participation/views.py:484
#: participation/views.py:155 participation/views.py:452
#: participation/views.py:486
msgid "You are not in a team."
msgstr "Vous n'êtes pas dans une équipe."
#: participation/views.py:154 participation/views.py:485
#: participation/views.py:156 participation/views.py:487
msgid "You don't participate, so you don't have any team."
msgstr "Vous ne participez pas, vous n'avez donc pas d'équipe."
#: participation/views.py:180
#: participation/views.py:182
#, python-brace-format
msgid "Detail of team {trigram}"
msgstr "Détails de l'équipe {trigram}"
#: participation/views.py:217
#: participation/views.py:219
msgid "You don't participate, so you can't request the validation of the team."
msgstr ""
"Vous ne participez pas, vous ne pouvez pas demander la validation de "
"l'équipe."
#: participation/views.py:220
#: participation/views.py:222
msgid "The validation of the team is already done or pending."
msgstr "La validation de l'équipe est déjà faite ou en cours."
#: participation/views.py:223
#: participation/views.py:225
msgid ""
"The team can't be validated: missing email address confirmations, "
"authorizations, people, motivation letter or the tournament is not set."
@ -1466,93 +1486,93 @@ msgstr ""
"d'adresse e-mail, soit une autorisation, soit des personnes, soit la lettre "
"de motivation, soit le tournoi n'a pas été choisi."
#: participation/views.py:245
#: participation/views.py:247
msgid "You are not an organizer of the tournament."
msgstr "Vous n'êtes pas un⋅e organisateur⋅rice du tournoi."
#: participation/views.py:248
#: participation/views.py:250
msgid "This team has no pending validation."
msgstr "L'équipe n'a pas de validation en attente."
#: participation/views.py:278
#: participation/views.py:280
msgid "You must specify if you validate the registration or not."
msgstr "Vous devez spécifier si vous validez l'inscription ou non."
#: participation/views.py:313
#: participation/views.py:315
#, python-brace-format
msgid "Update team {trigram}"
msgstr "Mise à jour de l'équipe {trigram}"
#: participation/views.py:374 participation/views.py:430
#: participation/views.py:376 participation/views.py:432
#, python-brace-format
msgid "Motivation letter of {team}.{ext}"
msgstr "Lettre de motivation de {team}.{ext}"
#: participation/views.py:405
#: participation/views.py:407
#, python-brace-format
msgid "Photo authorization of {participant}.{ext}"
msgstr "Autorisation de droit à l'image de {participant}.{ext}"
#: participation/views.py:411
#: participation/views.py:413
#, python-brace-format
msgid "Parental authorization of {participant}.{ext}"
msgstr "Autorisation parentale de {participant}.{ext}"
#: participation/views.py:418
#: participation/views.py:420
#, python-brace-format
msgid "Health sheet of {participant}.{ext}"
msgstr "Fiche sanitaire de {participant}.{ext}"
#: participation/views.py:424
#: participation/views.py:426
#, python-brace-format
msgid "Vaccine sheet of {participant}.{ext}"
msgstr "Carnet de vaccination de {participant}.{ext}"
#: participation/views.py:434
#: participation/views.py:436
#, python-brace-format
msgid "Photo authorizations of team {trigram}.zip"
msgstr "Autorisations de droit à l'image de l'équipe {trigram}.zip"
#: participation/views.py:452
#: participation/views.py:454
msgid "The team is already validated or the validation is pending."
msgstr "La validation de l'équipe est déjà faite ou en cours."
#: participation/views.py:499
#: participation/views.py:501
msgid "The team is not validated yet."
msgstr "L'équipe n'est pas encore validée."
#: participation/views.py:513
#: participation/views.py:515
#, python-brace-format
msgid "Participation of team {trigram}"
msgstr "Participation de l'équipe {trigram}"
#: participation/views.py:639
#: participation/views.py:641
msgid "You can't upload a solution after the deadline."
msgstr "Vous ne pouvez pas envoyer de solution après la date limite."
#: participation/views.py:730
#: participation/views.py:732
#, python-brace-format
msgid "Jurys of {pool}"
msgstr "Juré⋅es de la {pool}"
#: participation/views.py:757
#: participation/views.py:759
msgid "New TFJM² jury account"
msgstr "Nouveau compte de juré⋅e pour le TFJM²"
#: participation/views.py:770
#: participation/views.py:772
#, python-brace-format
msgid "The jury {name} has been successfully added!"
msgstr "Læ juré⋅e {name} a été ajouté⋅e avec succès !"
#: participation/views.py:806
#: participation/views.py:808
msgid "The following user is not registered as a jury:"
msgstr "L'utilisateur⋅rice suivant n'est pas inscrit⋅e en tant que juré⋅e :"
#: participation/views.py:814
#: participation/views.py:816
msgid "Notes were successfully uploaded."
msgstr "Les notes ont bien été envoyées."
#: participation/views.py:926
#: participation/views.py:974
msgid "You can't upload a synthesis after the deadline."
msgstr "Vous ne pouvez pas envoyer de note de synthèse après la date limite."

View File

@ -323,7 +323,7 @@ class PassageForm(forms.ModelForm):
class Meta:
model = Passage
fields = ('solution_number', 'defender', 'opponent', 'reporter', 'defender_penalties',)
fields = ('position', 'solution_number', 'defender', 'opponent', 'reporter', 'defender_penalties',)
class SynthesisForm(forms.ModelForm):

View File

@ -0,0 +1,44 @@
# Generated by Django 4.2 on 2023-04-06 22:05
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("participation", "0005_alter_team_options"),
]
operations = [
migrations.AlterModelOptions(
name="passage",
options={
"ordering": ("pool", "position"),
"verbose_name": "passage",
"verbose_name_plural": "passages",
},
),
migrations.AddField(
model_name="passage",
name="position",
field=models.PositiveSmallIntegerField(
choices=[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5)],
default=1,
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(5),
],
verbose_name="position",
),
),
migrations.AlterField(
model_name="participation",
name="valid",
field=models.BooleanField(
default=None,
help_text="The participation got the validation of the organizers.",
null=True,
verbose_name="valid team",
),
),
]

View File

@ -6,7 +6,7 @@ import os
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.core.validators import MaxValueValidator, MinValueValidator, RegexValidator
from django.db import models
from django.db.models import Index
from django.urls import reverse_lazy
@ -431,6 +431,13 @@ class Passage(models.Model):
related_name="passages",
)
position = models.PositiveSmallIntegerField(
verbose_name=_("position"),
choices=zip(range(1, 6), range(1, 6)),
default=1,
validators=[MinValueValidator(1), MaxValueValidator(5)],
)
solution_number = models.PositiveSmallIntegerField(
verbose_name=_("defended solution"),
choices=[
@ -539,6 +546,7 @@ class Passage(models.Model):
class Meta:
verbose_name = _("passage")
verbose_name_plural = _("passages")
ordering = ('pool', 'position',)
class Tweak(models.Model):

View File

@ -13,6 +13,9 @@
<dt class="col-sm-3">{% trans "Pool:" %}</dt>
<dd class="col-sm-9"><a href="{{ passage.pool.get_absolute_url }}">{{ passage.pool }}</a></dd>
<dt class="col-sm-3">{% trans "Position:" %}</dt>
<dd class="col-sm-9">{{ passage.position }}</dd>
<dt class="col-sm-3">{% trans "Defender:" %}</dt>
<dd class="col-sm-9"><a href="{{ passage.defender.get_absolute_url }}">{{ passage.defender.team }}</a></dd>

View File

@ -55,6 +55,31 @@
{% endfor %}
</ul>
</div>
{% if user.registration.is_volunteer %}
<div class="card-footer text-center">
<div class="btn-group">
<a class="btn btn-info" href="{% url 'participation:pool_scale_note_sheet' pk=pool.pk %}">
{% trans "Download the scale sheet" %}{% if pool.passages.count == 5 %} — {% trans "Room" %} 1{% endif %}
</a>
{% if pool.passages.count == 5 %}
<a class="btn btn-info" href="{% url 'participation:pool_scale_note_sheet' pk=pool.pk %}?page=2">
{% trans "Room" %} 2
</a>
{% endif %}
</div>
<div class="btn-group">
<a class="btn btn-info" href="{% url 'participation:pool_final_note_sheet' pk=pool.pk %}">
{% trans "Download the final notation sheet" %}{% if pool.passages.count == 5 %} — {% trans "Room" %} 1{% endif %}
</a>
{% if pool.passages.count == 5 %}
<a class="btn btn-info" href="{% url 'participation:pool_final_note_sheet' pk=pool.pk %}?page=2">
{% trans "Room" %} 2
</a>
{% endif %}
</div>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadNotesModal">{% trans "Upload notes from a CSV file" %}</button>
</div>
{% endif %}
</div>
</div>
{% if user.registration.is_volunteer %}
@ -62,7 +87,6 @@
<button class="btn btn-success" data-bs-toggle="modal" data-bs-target="#addPassageModal">{% trans "Add passage" %}</button>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updatePoolModal">{% trans "Update" %}</button>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#updateTeamsModal">{% trans "Update teams" %}</button>
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#uploadNotesModal">{% trans "Upload notes from a CSV file" %}</button>
</div>
{% endif %}
</div>

View File

@ -0,0 +1,126 @@
\documentclass[12pt,a4paper,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[french]{babel}
\usepackage[a4paper]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{color}
\usepackage{mathtools}
\usepackage{comment}
\usepackage{array}
\usepackage{multirow}
\usepackage{footnote}
\usepackage{xintexpr}
\addtolength{\textwidth}{4cm}
\setlength{\parindent}{0mm}
\geometry{left=1.6cm,right=1.6cm,top=1.2cm,bottom=2cm}
\newcommand{\tfjm}{$\mathbb{TFJM}^2$}
\pagestyle{empty}
\renewcommand{\leq}{\leqslant}
\def\tfjmedition{~{{ tfjm_number }}}
\begin{document}
\thispagestyle{empty}
\begin{center}
\Large {\bf \tfjmedition$^{e}$ Tournoi Fran\c cais des Jeunes Math\'ematiciennes et Math\'ematiciens \tfjm}
\end{center}
\vspace{3mm}
\begin{center}
\begin{itemize}
{% for passage in passages.all %}
\item D\'efenseur\textperiodcentered{}se au passage {{ forloop.counter }} : \underline{\texttt{~{{ passage.defender.team.trigram }}~}} $\qquad$ probl\`eme \underline{~{{ passage.solution_number }}~}
{% endfor %}
\end{itemize}
\end{center}
\vspace{6mm}
%%%%%%%%%%%%%%%%%%%%%DEFENSEUR
\begin{tabular}{|c|p{20mm}|p{11cm}|c{% for passage in passages.all %}|p{2cm}{% endfor %}|}\hline
\multicolumn{4}{|l|}{{\bf D\'efenseur\textperiodcentered{}se} \normalsize pr\'esente les id\'ees et r\'esultats principaux pour la solution du probl\`eme.} {% for passage in passages.all %}& Passage {{ forloop.counter }} {% endfor %}\\ \hline \hline
%ECRIT
\multirow{6}{3mm}{\centering \bf\'E\\ C\\ R\\ I\\ T} & \multirow{3}{20mm}{Partie scientifique} & Profondeur des r\'esultats d\'emontr\'es & [0,5] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Originalit\'e et pertinence des preuves& [0,3] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Exactitude et justesse des d\'emonstrations, algorithmes, etc. & [0,7] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
&\multirow{2}{20mm}{Forme} & Pr\'esentation (lisibilit\'e, etc.) & [0,2] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Clart\'e du raisonnement : facile \`a comprendre ou compl\`etement obscur ? & [0,3]{{ esp|safe }} \\ \cline{2-{{ passages.count|add:4 }}}
&\multicolumn{3}{|l|}{\bf TOTAL \'ECRIT (/20)} {{ esp|safe }} \\ \hline \hline
%ORAL
\multirow{8}{3mm}{\centering\bf O\\ R\\ A\\ L} & \multirow{4}{20mm}{Partie scientifique} & Compr\'ehension du mat\'eriel, connaissance des sujets math\'ematiques correspondants \emph{lors de la pr\'esentation} & [0,3] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& P\'edagogie, notamment clart\'e, exactitude et justesse des d\'emonstrations \emph{lors de la pr\'esentation} & [0,3] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Capacit\'e \`a r\'eagir aux questions et remarques de l'Opposant\textperiodcentered{}e et de læ Rapporteur\textperiodcentered{}e & [0,4] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Capacit\'e \`a r\'eagir aux questions et remarques du jury & [0,2] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
&\multirow{3}{20mm}{Forme} & Bri\`evet\'e et propret\'e de la pr\'esentation & [0,2] {{ esp|safe }} \\ \cline{3-{{ passages.count|add:4 }}}
&& Capacit\'e de faire avancer le d\'ebat & [0,2] {{ esp|safe }} \\ \cline{3-{{ passages.count|add:4 }}}
&& \emph{Conformit\'e} entre la pr\'esentation et le mat\'eriel \'ecrit & [--5,0] {{ esp|safe }} \\ \cline{2-{{ passages.count|add:4 }}}
&\multicolumn{3}{|l|}{\bf TOTAL ORAL (/16)} {{ esp|safe }} \\ \hline
\end{tabular}
\newpage
%%%%%%%%%%%%%%%%%OPPOSANT
\begin{tabular}{|c|p{20mm}|p{11cm}|c{% for passage in passages.all %}|p{2cm}{% endfor %}|}\hline
\multicolumn{4}{|l|}{L' {\bf Opposant\textperiodcentered{}e} \normalsize fournit une analyse critique de la solution et de la pr\'esentation.}
{% for passage in passages.all %}& Passage {{ forloop.counter }} {% endfor %} \\ \hline \hline
%ECRIT
\multirow{4}{3mm}{\centering\bf\'E\\ C\\ R\\ I\\ T} &\multirow{2}{20mm}{Partie scientifique} & Compr\'ehension du probl\`eme, savoir \'evaluer la qualit\'e g\'en\'erale de la solution & [0,4] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Rep\'erer les erreurs et leur importance & [0,3] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
& Forme & Pr\'esentation (lisibilit\'e, etc.) & [0,2] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
&\multicolumn{3}{|l|}{\bf TOTAL \'ECRIT (/9)} {{ esp|safe }} \\ \hline \hline
%ORAL
\multirow{6}{3mm}{\centering\bf O\\ R\\ A\\ L} & \multirow{3}{20mm}{Partie scientifique} & Compr\'ehension du probl\`eme, savoir \'evaluer la qualit\'e g\'en\'erale de la pr\'esentation de læ D\'efenseur\textperiodcentered{}se
& [0,2] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Rep\'erer les erreurs et leur importance & [0,2] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Pertinence des questions & [0,3] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
& Forme & M\`ene un d\'ebat de fa\c con comp\'etente et propre. & [0,3] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
&\multicolumn{3}{|l|}{\bf TOTAL ORAL (/10)} {{ esp|safe }}\\ \hline
\end{tabular}
\vfill
%%%%%%%%%%%%%%%%%%%%%%RAPPORTEUR
\begin{tabular}{|c|p{20mm}|p{11cm}|c{% for passage in passages.all %}|p{2cm}{% endfor %}|}\hline
\multicolumn{4}{|l|}{{\bf Rapporteur\textperiodcentered{}e} \normalsize \'evalue le d\'ebat entre læ D\'efenseur\textperiodcentered{}se et l'Opposant\textperiodcentered{}e.} {% for passage in passages.all %}& Passage {{ forloop.counter }} {% endfor %}\\ \hline \hline
%ECRIT
\multirow{4}{3mm}{\centering\bf\'E\\ C\\ R\\ I\\ T} &\multirow{2}{20mm}{Partie scientifique} & Compr\'ehension du probl\`eme, savoir \'evaluer la qualit\'e g\'en\'erale de la solution & [0,4] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
& & Rep\'erer les erreurs et leur importance & [0,3] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
& Forme & Pr\'esentation (lisibilit\'e, etc.) & [0,2] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
&\multicolumn{3}{|l|}{\bf TOTAL \'ECRIT (/9)} {{ esp|safe }}\\ \hline \hline
%ORAL
\multirow{6}{3mm}{\centering\bf O\\ R\\ A\\ L} &\multirow{4}{20mm}{Partie scientifique} & Compr\'ehension du probl\`eme, savoir \'evaluer la qualit\'e g\'en\'erale de la pr\'esentation de læ D\'efenseur\textperiodcentered{}se & [0,1] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Savoir \'evaluer la qualit\'e g\'en\'erale du d\'ebat & [0,2] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Rep\'erer les points importants non abord\'es & [0,2] {{ esp|safe }}\\ \cline{3-{{ passages.count|add:4 }}}
&& Pertinence des questions & [0,2] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
& Forme & M\`ene un d\'ebat de fa\c con comp\'etente et propre. & [0,3] {{ esp|safe }}\\ \cline{2-{{ passages.count|add:4 }}}
& \multicolumn{3}{|l|}{\bf TOTAL ORAL (/10)} {{ esp|safe }}\\ \hline
\end{tabular}
\vfill
{% if passages.count == 4 %}
%%%%%%% INTERVENTION EXCEPTIONNELLE
\begin{tabular}{|c|p{11cm}|c|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}\hline
\multicolumn{3}{|l|}{L'{\bf Intervention exceptionnelle} \normalsize permet de signaler une erreur grave omise par tous.} {% for passage in passages.all %}& Passage {{ forloop.counter }} {% endfor %}\\ \hline \hline
%ORAL
\multirow{1}{3mm}{\centering\bf O\\ R\\ A\\ L}
& Toute intervention exceptionnelle non pertinente est sanctionn\'ee par une note n\'egative, l'absence d'intervention re\c coit un z\'ero forfaitaire. \phantom{pour avoir oral en entier dans la} \phantom{colonne il} \phantom{faut blablater un peu}& [-4,4] {{ esp|safe }}\\ \hline
\end{tabular}
{% endif %}
\end{document}

View File

@ -0,0 +1,90 @@
\documentclass[10pt,a4paper,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage[french]{babel}
\usepackage[a4paper]{geometry}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{hyperref}
\usepackage{color}
\usepackage{mathtools}
\usepackage{comment}
\usepackage{array}
\usepackage{multirow}
\usepackage{footnote}
\usepackage{tabularx}
\usepackage{xintexpr}
\addtolength{\textwidth}{6cm}
\addtolength{\oddsidemargin}{-3cm}
\addtolength{\textheight}{2cm}
\addtolength{\topmargin}{-0.5cm}
\setlength{\parindent}{0mm}
\newcommand{\tfjm}{$\mathbb{TFJM}^2$}
\renewcommand{\leq}{\leqslant}
\def\tfjmedition{~{{ tfjm_number }}}
\begin{document}
\pagenumbering{gobble}
\centering
\Large {\bf \tfjmedition$^{e}$ Tournoi Fran\c cais des Jeunes Math\'ematiciennes et Math\'ematiciens \tfjm}\\
\vspace{3mm}
Tour {{ pool.round }} \;-- Poule {{ pool.get_letter_display }}{{ page }} \;-- {% if pool.round == 1 %}{{ pool.tournament.date_start }}{% else %}{{ pool.tournament.date_end }}{% endif %}
\vspace{15mm}
\begin{tabular}{|p{35mm}{% for passage in passages.all %}{% if passages.count == 3 %}|p{3cm}|p{3cm}{% else %}|p{2.5cm}|p{2.5cm}{% endif %}{% endfor %}|}\hline
\multirow{2}{35mm}{\LARGE R\^ole} {% for passage in passages.all %}& \multicolumn{2}{c|}{ \Large Probl\`eme {{ passage.solution_number }}}{% endfor %} \\ \cline{2-{{ passages.count|add:passages.count|add:1 }}}
{% for passage in passages.all %}& \hspace{4mm} {\Large \'ECRIT} & \hspace{4mm} {\Large ORAL}{% endfor %} \\ \hline
\multirow{2}{35mm}{\LARGE D\'efenseur\textperiodcentered{}se} {% for passage in passages.all %}& \multicolumn{2}{c|}{\Large {{ passage.defender.team.trigram }}}{% endfor %} \\ \cline{2-{{ passages.count|add:passages.count|add:1 }}}
{% for passage in passages.all %}
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 20$
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 16$
{% endfor %} & \hline
\multirow{2}{35mm}{\LARGE Opposant\textperiodcentered{}e} {% for passage in passages.all %}& \multicolumn{2}{c|}{\Large {{ passage.opponent.team.trigram }}}{% endfor %} \\ \cline{2-{{ passages.count|add:passages.count|add:1 }}}
{% for passage in passages.all %}
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 9$
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 10$
{% endfor %} & \hline
\multirow{2}{35mm}{\LARGE Rapporteur\textperiodcentered{}e} {% for passage in passages.all %}& \multicolumn{2}{c|}{\Large {{ passage.reporter.team.trigram }}}{% endfor %} \\ \cline{2-{{ passages.count|add:passages.count|add:1 }}}
{% for passage in passages.all %}
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 9$
& \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 10$
{% endfor %} & \hline
{% if passages.count == 4 %}
\multirow{4}{35mm}{\Large Intervention exceptionnelle}& \multicolumn{2}{c|}{\Large {{ passages.last.defender.team.trigram }}}{% for passage in passages.all %}{% if forloop.counter < 4 %} & \multicolumn{2}{c|}{\Large {{ passage.defender.team.trigram }}}{% endif %}{% endfor %} \\ \cline{2-{{ passages.count|add:passages.count|add:1 }}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}\\
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}
& \multicolumn{2}{c|}{\phantom{asd asd} \phantom{asd asd}}\\
& \multicolumn{2}{c|}{\centering \normalsize$-4\leq x\leq 4$}
& \multicolumn{2}{c|}{\centering \normalsize$-4\leq x\leq 4$}
& \multicolumn{2}{c|}{\centering \normalsize$-4\leq x\leq 4$}
& \multicolumn{2}{c|}{\centering \normalsize$-4\leq x\leq 4$} & \hline
{% endif %}
\end{tabular}
\vspace{15mm}
\LARGE Nom de læ jur\'e\textperiodcentered{}e :
{% if is_jury %}\underline{ {{ user.first_name|safe }} {{ user.last_name|safe }} }{% else %}\underline{\phantom{Phrase suffisamment longue pour le nom}}{% endif %}
$\qquad$ Signature : \underline{\phantom{Phrase moins longue}}
\newpage
%}
\end{document}

View File

@ -4,9 +4,10 @@
from django.urls import path
from django.views.generic import TemplateView
from .views import CreateTeamView, JoinTeamView, MyParticipationDetailView, MyTeamDetailView, NoteUpdateView, \
ParticipationDetailView, PassageCreateView, PassageDetailView, PassageUpdateView, PoolAddJurysView, PoolCreateView,\
PoolDetailView, PoolUpdateTeamsView, PoolUpdateView, PoolUploadNotesView, SolutionUploadView, SynthesisUploadView,\
from .views import CreateTeamView, FinalNotationSheetTemplateView, JoinTeamView, MyParticipationDetailView, \
MyTeamDetailView, NoteUpdateView, ParticipationDetailView, PassageCreateView, PassageDetailView, \
PassageUpdateView, PoolAddJurysView, PoolCreateView, PoolDetailView, PoolUpdateTeamsView, PoolUpdateView, \
PoolUploadNotesView, ScaleNotationSheetTemplateView, SolutionUploadView, SynthesisUploadView,\
TeamAuthorizationsView, TeamDetailView, TeamLeaveView, TeamListView, TeamUpdateView, \
TeamUploadMotivationLetterView, TournamentCreateView, TournamentDetailView, TournamentExportCSVView, \
TournamentListView, TournamentUpdateView
@ -36,6 +37,8 @@ urlpatterns = [
path("pools/create/", PoolCreateView.as_view(), name="pool_create"),
path("pools/<int:pk>/", PoolDetailView.as_view(), name="pool_detail"),
path("pools/<int:pk>/update/", PoolUpdateView.as_view(), name="pool_update"),
path("pools/<int:pk>/notation/scale/", ScaleNotationSheetTemplateView.as_view(), name="pool_scale_note_sheet"),
path("pools/<int:pk>/notation/final/", FinalNotationSheetTemplateView.as_view(), name="pool_final_note_sheet"),
path("pools/<int:pk>/update-teams/", PoolUpdateTeamsView.as_view(), name="pool_update_teams"),
path("pools/<int:pk>/add-jurys/", PoolAddJurysView.as_view(), name="pool_add_jurys"),
path("pools/<int:pk>/upload-notes/", PoolUploadNotesView.as_view(), name="pool_upload_notes"),

View File

@ -4,6 +4,8 @@
import csv
from io import BytesIO
import os
import subprocess
from tempfile import mkdtemp
from zipfile import ZipFile
from django.conf import settings
@ -818,6 +820,52 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView):
return reverse_lazy('participation:pool_detail', args=(self.kwargs['pk'],))
class NotationSheetTemplateView(VolunteerMixin, DetailView):
"""
Generate a PDF from a LaTeX template for the notation papers.
"""
model = Pool
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
passages = self.object.passages.all()
if passages.count() == 5:
page = self.request.GET.get('page', '1')
if not page.isnumeric() or page not in ['1', '2']:
page = '1'
passages = passages.filter(id__in=[passages[0].id, passages[2].id, passages[4].id]
if page == '1' else [passages[1].id, passages[3].id])
context['page'] = page
context['passages'] = passages
context['esp'] = passages.count() * '&'
context['is_jury'] = self.request.user.registration in self.object.juries.all() \
and 'blank' not in self.request.GET
context['tfjm_number'] = timezone.now().year - 2010
return context
def render_to_response(self, context, **response_kwargs):
tex = render_to_string(self.template_name, context=context, request=self.request)
temp_dir = mkdtemp()
with open(os.path.join(temp_dir, "texput.tex"), "w") as f:
f.write(tex)
process = subprocess.Popen(["pdflatex", "-interaction=nonstopmode", f"-output-directory={temp_dir}",
os.path.join(temp_dir, "texput.tex"), ])
process.wait()
return FileResponse(streaming_content=open(os.path.join(temp_dir, "texput.pdf"), "rb"),
content_type="application/pdf",
filename=self.template_name.split("/")[-1][:-3] + "pdf")
class ScaleNotationSheetTemplateView(NotationSheetTemplateView):
template_name = 'participation/tex/bareme.tex'
class FinalNotationSheetTemplateView(NotationSheetTemplateView):
template_name = 'participation/tex/finale.tex'
class PassageCreateView(VolunteerMixin, CreateView):
model = Passage
form_class = PassageForm

View File

@ -0,0 +1,19 @@
# Generated by Django 4.2 on 2023-04-06 22:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("registration", "0007_alter_participantregistration_options_and_more"),
]
operations = [
migrations.AlterField(
model_name="payment",
name="valid",
field=models.BooleanField(
default=False, null=True, verbose_name="payment valid"
),
),
]