From 338a19ec3263478961c0dacd07fb48c841eba37d Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Tue, 16 Apr 2024 23:58:42 +0200 Subject: [PATCH] Remove observer status Signed-off-by: Emmy D'Anello --- draw/models.py | 4 - locale/fr/LC_MESSAGES/django.po | 466 +++++++++--------- participation/admin.py | 4 +- participation/forms.py | 4 +- ...e_observer_oral_remove_passage_observer.py | 24 + participation/models.py | 68 +-- participation/tables.py | 2 +- .../participation/passage_detail.html | 21 - .../templates/participation/tex/bareme.tex | 12 - .../templates/participation/tex/finale.tex | 16 - participation/views.py | 75 +-- 11 files changed, 279 insertions(+), 417 deletions(-) create mode 100644 participation/migrations/0011_remove_note_observer_oral_remove_passage_observer.py diff --git a/draw/models.py b/draw/models.py index 9a028d7..0dc8a66 100644 --- a/draw/models.py +++ b/draw/models.py @@ -396,10 +396,6 @@ class Pool(models.Model): reporter=tds[line[2]].participation, defender_penalties=tds[line[0]].penalty_int, ) - if self.size == 4: - # Add observer for 4-teams pools - passage.observer = tds[line[3]].participation - await passage.asave() # Update Google Sheets if os.getenv('GOOGLE_PRIVATE_KEY_ID', None): diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index f8e1cff..a1d2366 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: TFJM\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-07 13:39+0200\n" +"POT-Creation-Date: 2024-04-16 23:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -31,12 +31,12 @@ msgstr "équipes" #: participation/admin.py:79 participation/admin.py:140 #: participation/admin.py:171 participation/models.py:656 #: participation/models.py:680 participation/models.py:886 -#: registration/models.py:748 +#: registration/models.py:756 #: registration/templates/registration/payment_form.html:53 msgid "tournament" msgstr "tournoi" -#: draw/admin.py:92 draw/models.py:234 draw/models.py:433 +#: draw/admin.py:92 draw/models.py:234 draw/models.py:429 #: participation/models.py:890 msgid "round" msgstr "tour" @@ -208,82 +208,82 @@ msgstr "poule associée" msgid "The full pool instance." msgstr "L'instance complète de la poule." -#: draw/models.py:411 +#: draw/models.py:407 #, python-brace-format msgid "Pool {letter}{number}" msgstr "Poule {letter}{number}" -#: draw/models.py:414 draw/models.py:441 participation/admin.py:136 -#: participation/admin.py:155 participation/models.py:1375 -#: participation/models.py:1384 participation/tables.py:84 +#: draw/models.py:410 draw/models.py:437 participation/admin.py:136 +#: participation/admin.py:155 participation/models.py:1364 +#: participation/models.py:1373 participation/tables.py:84 msgid "pool" msgstr "poule" -#: draw/models.py:415 participation/models.py:1376 +#: draw/models.py:411 participation/models.py:1365 msgid "pools" msgstr "poules" -#: draw/models.py:427 participation/models.py:876 participation/models.py:1545 -#: participation/models.py:1575 participation/models.py:1617 +#: draw/models.py:423 participation/models.py:876 participation/models.py:1514 +#: participation/models.py:1544 participation/models.py:1586 msgid "participation" msgstr "participation" -#: draw/models.py:448 +#: draw/models.py:444 msgid "passage index" msgstr "numéro de passage" -#: draw/models.py:449 +#: draw/models.py:445 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:457 +#: draw/models.py:453 msgid "choose index" msgstr "numéro de choix" -#: draw/models.py:458 +#: draw/models.py:454 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:464 draw/models.py:487 participation/models.py:1398 -#: participation/models.py:1582 +#: draw/models.py:460 draw/models.py:483 participation/models.py:1387 +#: participation/models.py:1551 #, python-brace-format msgid "Problem #{problem}" msgstr "Problème n°{problem}" -#: draw/models.py:468 +#: draw/models.py:464 msgid "accepted problem" msgstr "problème accepté" -#: draw/models.py:475 +#: draw/models.py:471 msgid "passage dice" msgstr "dé d'ordre de passage" -#: draw/models.py:482 +#: draw/models.py:478 msgid "choice dice" msgstr "dé d'ordre de choix" -#: draw/models.py:491 +#: draw/models.py:487 msgid "purposed problem" msgstr "problème proposé" -#: draw/models.py:496 +#: draw/models.py:492 msgid "rejected problems" msgstr "problèmes rejetés" -#: draw/models.py:525 +#: draw/models.py:521 #, 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:531 +#: draw/models.py:527 msgid "team draw" msgstr "tirage d'équipe" -#: draw/models.py:532 +#: draw/models.py:528 msgid "team draws" msgstr "tirages d'équipe" @@ -334,7 +334,7 @@ msgstr "Continuer le tirage" #: draw/templates/draw/tournament_content.html:216 participation/admin.py:167 #: participation/models.py:252 participation/models.py:671 #: participation/templates/participation/tournament_harmonize.html:15 -#: registration/models.py:157 registration/models.py:739 +#: registration/models.py:157 registration/models.py:747 #: registration/tables.py:39 #: registration/templates/registration/payment_form.html:52 msgid "team" @@ -378,8 +378,8 @@ msgstr "Êtes-vous sûr·e de vouloir annuler le tirage au sort ?" msgid "Close" msgstr "Fermer" -#: draw/views.py:31 participation/views.py:161 participation/views.py:500 -#: participation/views.py:531 +#: draw/views.py:31 participation/views.py:162 participation/views.py:501 +#: participation/views.py:532 msgid "You are not in a team." msgstr "Vous n'êtes pas dans une équipe." @@ -457,21 +457,21 @@ msgid "selected for final" msgstr "sélectionnée pour la finale" #: participation/admin.py:124 participation/admin.py:183 -#: participation/models.py:1405 participation/tables.py:112 +#: participation/models.py:1394 participation/tables.py:112 msgid "defender" msgstr "défenseur⋅se" -#: participation/admin.py:128 participation/models.py:1412 -#: participation/models.py:1629 +#: participation/admin.py:128 participation/models.py:1401 +#: participation/models.py:1598 msgid "opponent" msgstr "opposant⋅e" -#: participation/admin.py:132 participation/models.py:1419 -#: participation/models.py:1630 +#: participation/admin.py:132 participation/models.py:1408 +#: participation/models.py:1599 msgid "reporter" msgstr "rapporteur⋅rice" -#: participation/admin.py:187 participation/models.py:1580 +#: participation/admin.py:187 participation/models.py:1549 msgid "problem" msgstr "numéro de problème" @@ -491,7 +491,7 @@ msgstr "Ce trigramme est déjà utilisé." msgid "No team was found with this access code." msgstr "Aucune équipe n'a été trouvée avec ce code d'accès." -#: participation/forms.py:58 participation/views.py:502 +#: participation/forms.py:58 participation/views.py:503 msgid "The team is already validated or the validation is pending." msgstr "La validation de l'équipe est déjà faite ou en cours." @@ -720,7 +720,7 @@ msgstr "" "L'équipe {trigram} n'a pas encore été validée par les organisateurices. " "Merci de patienter." -#: participation/models.py:196 registration/models.py:567 +#: participation/models.py:196 registration/models.py:575 msgid "Pending validation" msgstr "Validation en attente" @@ -869,7 +869,7 @@ msgstr "" "parties.

Vous pouvez envoyer vos solutions sur votre " "page de participation.

" -#: participation/models.py:762 registration/models.py:592 +#: participation/models.py:762 registration/models.py:600 msgid "" "

The draw of the solutions for the tournament {tournament} is planned on " "the {date:%Y-%m-%d %H:%M}. You can join it on this link." @@ -879,7 +879,7 @@ msgstr "" "{date:%d/%m/%Y %H:%M}. Vous pouvez y participer sur ce lien.

" -#: participation/models.py:768 registration/models.py:599 +#: participation/models.py:768 registration/models.py:607 msgid "Draw of solutions" msgstr "Tirage au sort des solutions" @@ -917,7 +917,7 @@ msgstr "" "href='{solution_url}'>problème {problem}. Vous pouvez envoyer votre note " "de synthèse sur cette page.

" -#: participation/models.py:813 registration/models.py:614 +#: participation/models.py:813 registration/models.py:622 msgid "First round" msgstr "Premier tour" @@ -930,7 +930,7 @@ msgstr "" "

Pour le second tour, vous défendrez votre " "solution du problème {problem}.

" -#: participation/models.py:856 registration/models.py:625 +#: participation/models.py:856 registration/models.py:633 msgid "Second round" msgstr "Second tour" @@ -989,33 +989,29 @@ msgstr "" msgid "The president of the jury must be part of the jury." msgstr "Læ président⋅e du jury doit faire partie du jury." -#: participation/models.py:1356 +#: participation/models.py:1345 #, python-brace-format msgid "The jury {jury} is not part of the jury for this pool." msgstr "{jury} ne fait pas partie du jury pour cette poule." -#: participation/models.py:1369 +#: participation/models.py:1358 #, python-brace-format 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:1389 +#: participation/models.py:1378 msgid "position" msgstr "position" -#: participation/models.py:1396 +#: participation/models.py:1385 msgid "defended solution" msgstr "solution défendue" -#: participation/models.py:1429 -msgid "observer" -msgstr "observateur⋅rice" - -#: participation/models.py:1434 +#: participation/models.py:1413 msgid "penalties" msgstr "pénalités" -#: participation/models.py:1436 +#: participation/models.py:1415 msgid "" "Number of penalties for the defender. The defender will loose a 0.5 " "coefficient per penalty." @@ -1023,124 +1019,120 @@ msgstr "" "Nombre de pénalités pour l'équipe défenseuse. Elle perd un coefficient 0.5 " "sur sa présentation orale par pénalité." -#: participation/models.py:1512 participation/models.py:1515 -#: participation/models.py:1518 participation/models.py:1521 +#: participation/models.py:1484 participation/models.py:1487 +#: participation/models.py:1490 #, 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:1526 +#: participation/models.py:1495 #, python-brace-format msgid "Passage of {defender} for problem {problem}" msgstr "Passage de {defender} pour le problème {problem}" -#: participation/models.py:1530 participation/models.py:1539 -#: participation/models.py:1624 participation/models.py:1666 +#: participation/models.py:1499 participation/models.py:1508 +#: participation/models.py:1593 participation/models.py:1635 msgid "passage" msgstr "passage" -#: participation/models.py:1531 +#: participation/models.py:1500 msgid "passages" msgstr "passages" -#: participation/models.py:1550 +#: participation/models.py:1519 msgid "difference" msgstr "différence" -#: participation/models.py:1551 +#: participation/models.py:1520 msgid "Score to add/remove on the final score" msgstr "Score à ajouter/retrancher au score final" -#: participation/models.py:1558 +#: participation/models.py:1527 msgid "tweak" msgstr "harmonisation" -#: participation/models.py:1559 +#: participation/models.py:1528 msgid "tweaks" msgstr "harmonisations" -#: participation/models.py:1587 +#: participation/models.py:1556 msgid "solution for the final tournament" msgstr "solution pour la finale" -#: participation/models.py:1592 participation/models.py:1635 +#: participation/models.py:1561 participation/models.py:1604 msgid "file" msgstr "fichier" -#: participation/models.py:1602 +#: participation/models.py:1571 #, 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:1604 +#: participation/models.py:1573 msgid "for final" msgstr "pour la finale" -#: participation/models.py:1607 +#: participation/models.py:1576 msgid "solution" msgstr "solution" -#: participation/models.py:1608 +#: participation/models.py:1577 msgid "solutions" msgstr "solutions" -#: participation/models.py:1641 +#: participation/models.py:1610 #, 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:1649 +#: participation/models.py:1618 msgid "synthesis" msgstr "note de synthèse" -#: participation/models.py:1650 +#: participation/models.py:1619 msgid "syntheses" msgstr "notes de synthèse" -#: participation/models.py:1659 +#: participation/models.py:1628 msgid "jury" msgstr "jury" -#: participation/models.py:1671 +#: participation/models.py:1640 msgid "defender writing note" msgstr "note d'écrit défenseur⋅se" -#: participation/models.py:1677 +#: participation/models.py:1646 msgid "defender oral note" msgstr "note d'oral défenseur⋅se" -#: participation/models.py:1683 +#: participation/models.py:1652 msgid "opponent writing note" msgstr "note d'écrit opposant⋅e" -#: participation/models.py:1689 +#: participation/models.py:1658 msgid "opponent oral note" msgstr "note d'oral opposant⋅e" -#: participation/models.py:1695 +#: participation/models.py:1664 msgid "reporter writing note" msgstr "note d'écrit rapporteur⋅rice" -#: participation/models.py:1701 +#: participation/models.py:1670 msgid "reporter oral note" msgstr "note d'oral du rapporteur⋅rice" -#: participation/models.py:1707 -msgid "observer note" -msgstr "note de l'observation" - -#: participation/models.py:1768 +#: participation/models.py:1728 #, python-brace-format msgid "Notes of {jury} for {passage}" msgstr "Notes de {jury} pour le {passage}" -#: participation/models.py:1771 +#: participation/models.py:1731 msgid "note" msgstr "note" -#: participation/models.py:1772 +#: participation/models.py:1732 msgid "notes" msgstr "notes" @@ -1177,8 +1169,8 @@ msgstr "Pas d'équipe définie" #: participation/tables.py:142 #: participation/templates/participation/note_form.html:14 #: participation/templates/participation/passage_detail.html:15 -#: participation/templates/participation/passage_detail.html:161 -#: participation/templates/participation/passage_detail.html:167 +#: participation/templates/participation/passage_detail.html:140 +#: participation/templates/participation/passage_detail.html:146 #: participation/templates/participation/pool_detail.html:13 #: participation/templates/participation/pool_detail.html:157 #: participation/templates/participation/team_detail.html:179 @@ -1280,7 +1272,7 @@ msgid "Upload solution" msgstr "Envoyer une solution" #: participation/templates/participation/participation_detail.html:65 -#: participation/templates/participation/passage_detail.html:173 +#: participation/templates/participation/passage_detail.html:152 #: participation/templates/participation/pool_detail.html:162 #: participation/templates/participation/team_detail.html:238 #: participation/templates/participation/upload_motivation_letter.html:13 @@ -1320,87 +1312,75 @@ msgstr "Opposant⋅e :" msgid "Reporter:" msgstr "Rapporteur⋅rice :" -#: participation/templates/participation/passage_detail.html:38 -msgid "Observer:" -msgstr "Observateur⋅rice :" - -#: participation/templates/participation/passage_detail.html:42 +#: participation/templates/participation/passage_detail.html:37 msgid "Defended solution:" msgstr "Solution défendue" -#: participation/templates/participation/passage_detail.html:45 +#: participation/templates/participation/passage_detail.html:40 msgid "Defender penalties count:" msgstr "Nombre de pénalités :" -#: participation/templates/participation/passage_detail.html:48 +#: participation/templates/participation/passage_detail.html:43 #: participation/templates/participation/pool_detail.html:54 msgid "Syntheses:" msgstr "Notes de synthèse :" -#: participation/templates/participation/passage_detail.html:53 +#: participation/templates/participation/passage_detail.html:48 #: participation/templates/participation/pool_detail.html:63 msgid "No synthesis was uploaded yet." msgstr "Aucune note de synthèse n'a encore été envoyée." -#: participation/templates/participation/passage_detail.html:61 -#: participation/templates/participation/passage_detail.html:166 +#: participation/templates/participation/passage_detail.html:56 +#: participation/templates/participation/passage_detail.html:145 msgid "Update notes" msgstr "Modifier les notes" -#: participation/templates/participation/passage_detail.html:66 -#: participation/templates/participation/passage_detail.html:172 +#: participation/templates/participation/passage_detail.html:61 +#: participation/templates/participation/passage_detail.html:151 msgid "Upload synthesis" msgstr "Envoyer une note de synthèse" -#: participation/templates/participation/passage_detail.html:74 +#: participation/templates/participation/passage_detail.html:69 msgid "Notes detail" msgstr "Détails des notes" -#: participation/templates/participation/passage_detail.html:82 +#: participation/templates/participation/passage_detail.html:77 msgid "Average points for the defender writing" msgstr "Moyenne de l'écrit de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:88 +#: participation/templates/participation/passage_detail.html:83 msgid "Average points for the defender oral" msgstr "Moyenne de l'oral de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:94 +#: participation/templates/participation/passage_detail.html:89 msgid "Average points for the opponent writing" msgstr "Moyenne de l'écrit de l'équipe opposante" -#: participation/templates/participation/passage_detail.html:100 +#: participation/templates/participation/passage_detail.html:95 msgid "Average points for the opponent oral" msgstr "Moyenne de l'oral de l'équipe opposante" -#: participation/templates/participation/passage_detail.html:106 +#: participation/templates/participation/passage_detail.html:101 msgid "Average points for the reporter writing" msgstr "Moyenne de l'écrit de l'équipe rapportrice" -#: participation/templates/participation/passage_detail.html:112 +#: participation/templates/participation/passage_detail.html:107 msgid "Average points for the reporter oral" msgstr "Moyenne de l'oral de l'équipe rapportrice" -#: participation/templates/participation/passage_detail.html:119 -msgid "Average points for the observer oral" -msgstr "Moyenne de l'oral de l'équipe observatrice" - -#: participation/templates/participation/passage_detail.html:130 +#: participation/templates/participation/passage_detail.html:117 msgid "Defender points" msgstr "Points de l'équipe défenseuse" -#: participation/templates/participation/passage_detail.html:136 +#: participation/templates/participation/passage_detail.html:123 msgid "Opponent points" msgstr "Points de l'équipe opposante" -#: participation/templates/participation/passage_detail.html:142 +#: participation/templates/participation/passage_detail.html:129 msgid "Reporter points" msgstr "Points de l'équipe rapportrice" -#: participation/templates/participation/passage_detail.html:149 -msgid "Observer points" -msgstr "Points de l'équipe observatrice" - -#: participation/templates/participation/passage_detail.html:160 +#: participation/templates/participation/passage_detail.html:139 #: participation/templates/participation/passage_form.html:11 msgid "Update passage" msgstr "Modifier le passage" @@ -1623,7 +1603,7 @@ msgid "Payment of" msgstr "Paiement de" #: participation/templates/participation/team_detail.html:160 -#: registration/models.py:669 +#: registration/models.py:677 msgid "grouped" msgstr "groupé" @@ -1688,7 +1668,7 @@ msgid "Invalidate" msgstr "Invalider" #: participation/templates/participation/team_detail.html:237 -#: participation/views.py:332 +#: participation/views.py:333 msgid "Upload motivation letter" msgstr "Envoyer la lettre de motivation" @@ -1697,7 +1677,7 @@ msgid "Update team" msgstr "Modifier l'équipe" #: participation/templates/participation/team_detail.html:247 -#: participation/views.py:494 +#: participation/views.py:495 msgid "Leave team" msgstr "Quitter l'équipe" @@ -1826,7 +1806,7 @@ msgid "Rank" msgstr "Rang" #: participation/templates/participation/tournament_harmonize.html:16 -#: registration/models.py:640 +#: registration/models.py:648 msgid "Note" msgstr "Note" @@ -1875,44 +1855,44 @@ msgstr "Modèles :" msgid "Warning: non-free format" msgstr "Attention : format non libre" -#: participation/views.py:61 tfjm/templates/base.html:79 +#: participation/views.py:62 tfjm/templates/base.html:79 #: tfjm/templates/navbar.html:35 msgid "Create team" msgstr "Créer une équipe" -#: participation/views.py:70 participation/views.py:111 +#: participation/views.py:71 participation/views.py:112 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:72 participation/views.py:113 +#: participation/views.py:73 participation/views.py:114 msgid "You are already in a team." msgstr "Vous êtes déjà dans une équipe." -#: participation/views.py:102 tfjm/templates/base.html:74 +#: participation/views.py:103 tfjm/templates/base.html:74 #: tfjm/templates/navbar.html:40 msgid "Join team" msgstr "Rejoindre une équipe" -#: participation/views.py:162 participation/views.py:532 +#: participation/views.py:163 participation/views.py:533 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:188 +#: participation/views.py:189 #, python-brace-format msgid "Detail of team {trigram}" msgstr "Détails de l'équipe {trigram}" -#: participation/views.py:217 +#: participation/views.py:218 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:221 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:224 msgid "" "The team can't be validated: missing email address confirmations, " "authorizations, people, motivation letter or the tournament is not set." @@ -1921,159 +1901,159 @@ 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:246 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:249 msgid "This team has no pending validation." msgstr "L'équipe n'a pas de validation en attente." -#: participation/views.py:275 +#: participation/views.py:276 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:310 +#: participation/views.py:311 #, python-brace-format msgid "Update team {trigram}" msgstr "Mise à jour de l'équipe {trigram}" -#: participation/views.py:371 participation/views.py:479 +#: participation/views.py:372 participation/views.py:480 #, python-brace-format msgid "Motivation letter of {team}.{ext}" msgstr "Lettre de motivation de {team}.{ext}" -#: participation/views.py:404 +#: participation/views.py:405 #, python-brace-format msgid "Authorizations of team {trigram}.zip" msgstr "Autorisations de l'équipe {trigram}.zip" -#: participation/views.py:408 +#: participation/views.py:409 #, python-brace-format msgid "Authorizations of {tournament}.zip" msgstr "Autorisations du tournoi {tournament}.zip" -#: participation/views.py:427 +#: participation/views.py:428 #, python-brace-format msgid "Photo authorization of {participant}.{ext}" msgstr "Autorisation de droit à l'image de {participant}.{ext}" -#: participation/views.py:436 +#: participation/views.py:437 #, python-brace-format msgid "Parental authorization of {participant}.{ext}" msgstr "Autorisation parentale de {participant}.{ext}" -#: participation/views.py:444 +#: participation/views.py:445 #, python-brace-format msgid "Health sheet of {participant}.{ext}" msgstr "Fiche sanitaire de {participant}.{ext}" -#: participation/views.py:452 +#: participation/views.py:453 #, python-brace-format msgid "Vaccine sheet of {participant}.{ext}" msgstr "Carnet de vaccination de {participant}.{ext}" -#: participation/views.py:463 +#: participation/views.py:464 #, python-brace-format msgid "Photo authorization of {participant} (final).{ext}" msgstr "Autorisation de droit à l'image de {participant} (finale).{ext}" -#: participation/views.py:472 +#: participation/views.py:473 #, python-brace-format msgid "Parental authorization of {participant} (final).{ext}" msgstr "Autorisation parentale de {participant} (finale).{ext}" -#: participation/views.py:546 +#: participation/views.py:547 msgid "The team is not validated yet." msgstr "L'équipe n'est pas encore validée." -#: participation/views.py:560 +#: participation/views.py:561 #, python-brace-format msgid "Participation of team {trigram}" msgstr "Participation de l'équipe {trigram}" -#: participation/views.py:648 +#: participation/views.py:649 #, python-brace-format msgid "Payments of {tournament}" msgstr "Paiements de {tournament}" -#: participation/views.py:747 +#: participation/views.py:748 msgid "Notes published!" msgstr "Notes publiées !" -#: participation/views.py:749 +#: participation/views.py:750 msgid "Notes hidden!" msgstr "Notes dissimulées !" -#: participation/views.py:780 +#: participation/views.py:781 #, python-brace-format msgid "Harmonize notes of {tournament} - Day {round}" msgstr "Harmoniser les notes de {tournament} - Jour {round}" -#: participation/views.py:893 +#: participation/views.py:894 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:1010 +#: participation/views.py:1011 #, python-brace-format msgid "Solutions of team {trigram}.zip" msgstr "Solutions de l'équipe {trigram}.zip" -#: participation/views.py:1010 +#: participation/views.py:1011 #, python-brace-format msgid "Syntheses of team {trigram}.zip" msgstr "Notes de synthèse de l'équipe {trigram}.zip" -#: participation/views.py:1027 participation/views.py:1042 +#: participation/views.py:1028 participation/views.py:1043 #, python-brace-format msgid "Solutions of {tournament}.zip" msgstr "Solutions de {tournament}.zip" -#: participation/views.py:1027 participation/views.py:1042 +#: participation/views.py:1028 participation/views.py:1043 #, python-brace-format msgid "Syntheses of {tournament}.zip" msgstr "Notes de synthèse de {tournament}.zip" -#: participation/views.py:1051 +#: participation/views.py:1052 #, python-brace-format msgid "Solutions for pool {pool} of tournament {tournament}.zip" msgstr "Solutions pour la poule {pool} du tournoi {tournament}.zip" -#: participation/views.py:1052 +#: participation/views.py:1053 #, python-brace-format msgid "Syntheses for pool {pool} of tournament {tournament}.zip" msgstr "Notes de synthèses pour la poule {pool} du tournoi {tournament}.zip" -#: participation/views.py:1094 +#: participation/views.py:1095 #, python-brace-format msgid "Jury of pool {pool} for {tournament} with teams {teams}" msgstr "Jury de la poule {pool} pour {tournament} avec les équipes {teams}" -#: participation/views.py:1110 +#: participation/views.py:1111 #, python-brace-format msgid "The jury {name} is already in the pool!" msgstr "{name} est déjà dans la poule !" -#: participation/views.py:1130 +#: participation/views.py:1131 msgid "New TFJM² jury account" msgstr "Nouveau compte de juré⋅e pour le TFJM²" -#: participation/views.py:1151 +#: participation/views.py:1152 #, python-brace-format msgid "The jury {name} has been successfully added!" msgstr "{name} a été ajouté⋅e avec succès en tant que juré⋅e !" -#: participation/views.py:1187 +#: participation/views.py:1188 #, python-brace-format msgid "The jury {name} has been successfully removed!" msgstr "{name} a été retiré⋅e avec succès du jury !" -#: participation/views.py:1213 +#: participation/views.py:1214 #, python-brace-format msgid "The jury {name} has been successfully promoted president!" msgstr "{name} a été nommé⋅e président⋅e du jury !" -#: participation/views.py:1241 +#: participation/views.py:1242 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 :" @@ -2081,17 +2061,17 @@ msgstr "L'utilisateur⋅rice suivant n'est pas inscrit⋅e en tant que juré⋅e msgid "Notes were successfully uploaded." msgstr "Les notes ont bien été envoyées." -#: participation/views.py:1891 +#: participation/views.py:1855 #, python-brace-format msgid "Notation sheets of pool {pool} of {tournament}.zip" msgstr "Feuilles de notations pour la poule {pool} du tournoi {tournament}.zip" -#: participation/views.py:1896 +#: participation/views.py:1860 #, python-brace-format msgid "Notation sheets of {tournament}.zip" msgstr "Feuilles de notation de {tournament}.zip" -#: participation/views.py:2073 +#: participation/views.py:2033 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." @@ -2130,7 +2110,7 @@ msgstr "rôle" msgid "participant" msgstr "participant⋅e" -#: registration/forms.py:25 registration/models.py:501 +#: registration/forms.py:25 registration/models.py:509 msgid "coach" msgstr "encadrant⋅e" @@ -2174,7 +2154,7 @@ msgstr "" msgid "registration" msgstr "inscription" -#: registration/models.py:130 registration/models.py:665 +#: registration/models.py:130 registration/models.py:673 msgid "registrations" msgstr "inscriptions" @@ -2248,7 +2228,7 @@ msgstr "autorisation de droit à l'image" msgid "photo authorization (final)" msgstr "autorisation de droit à l'image (finale)" -#: registration/models.py:250 +#: registration/models.py:258 #, python-brace-format msgid "" "You are not in a team. You can create one or ou rejoindre une équipe existante pour " "participer." -#: registration/models.py:256 +#: registration/models.py:264 msgid "No team" msgstr "Pas d'équipe" -#: registration/models.py:264 +#: registration/models.py:272 #, python-brace-format msgid "" "You have not uploaded your photo authorization. You can do it by clicking on " @@ -2271,11 +2251,11 @@ msgstr "" "Vous n'avez pas envoyé votre autorisation de droit à l'image. Vous pouvez le " "faire en cliquant sur ce lien." -#: registration/models.py:269 registration/models.py:282 +#: registration/models.py:277 registration/models.py:290 msgid "Photo authorization" msgstr "Autorisation de droit à l'image" -#: registration/models.py:277 +#: registration/models.py:285 #, python-brace-format msgid "" "You have not uploaded your photo authorization for the final tournament. You " @@ -2284,75 +2264,75 @@ msgstr "" "Vous n'avez pas envoyé votre autorisation de droit à l'image pour la finale. " "Vous pouvez le faire en cliquant sur ce lien." -#: registration/models.py:297 +#: registration/models.py:305 msgid "Team selected for the final tournament" msgstr "Équipe sélectionnée pour la finale" -#: registration/models.py:319 +#: registration/models.py:327 msgid "participant registration" msgstr "inscription de participant⋅e" -#: registration/models.py:320 +#: registration/models.py:328 msgid "participant registrations" msgstr "inscriptions de participant⋅es" -#: registration/models.py:329 +#: registration/models.py:337 msgid "birth date" msgstr "date de naissance" -#: registration/models.py:335 +#: registration/models.py:343 msgid "12th grade" msgstr "Terminale" -#: registration/models.py:336 +#: registration/models.py:344 msgid "11th grade" msgstr "Première" -#: registration/models.py:337 +#: registration/models.py:345 msgid "10th grade or lower" msgstr "Seconde ou inférieur" -#: registration/models.py:339 +#: registration/models.py:347 msgid "student class" msgstr "classe" -#: registration/models.py:344 +#: registration/models.py:352 msgid "school" msgstr "école" -#: registration/models.py:349 +#: registration/models.py:357 msgid "responsible name" msgstr "nom d'un⋅e responsable légal⋅e" -#: registration/models.py:354 +#: registration/models.py:362 msgid "responsible phone number" msgstr "numéro de téléphone d'un⋅e responsable légal⋅e" -#: registration/models.py:359 +#: registration/models.py:367 msgid "responsible email address" msgstr "adresse e-mail d'un⋅e responsable légal⋅e" -#: registration/models.py:364 +#: registration/models.py:372 msgid "parental authorization" msgstr "autorisation parentale" -#: registration/models.py:371 +#: registration/models.py:379 msgid "parental authorization (final)" msgstr "autorisation parentale (finale)" -#: registration/models.py:378 +#: registration/models.py:386 msgid "health sheet" msgstr "fiche sanitaire" -#: registration/models.py:385 +#: registration/models.py:393 msgid "vaccine sheet" msgstr "carnet de vaccination" -#: registration/models.py:393 +#: registration/models.py:401 msgid "student" msgstr "élève" -#: registration/models.py:404 +#: registration/models.py:412 #, python-brace-format msgid "" "You have not uploaded your parental authorization. You can do it by clicking " @@ -2361,11 +2341,11 @@ msgstr "" "Vous n'avez pas envoyé votre autorisation parentale. Vous pouvez le faire en " "cliquant sur ce lien." -#: registration/models.py:409 registration/models.py:469 +#: registration/models.py:417 registration/models.py:477 msgid "Parental authorization" msgstr "Autorisation parentale" -#: registration/models.py:415 +#: registration/models.py:423 #, python-brace-format msgid "" "You have not uploaded your health sheet. You can do it by clicking on ce lien." -#: registration/models.py:420 +#: registration/models.py:428 msgid "Health sheet" msgstr "Fiche sanitaire" -#: registration/models.py:426 +#: registration/models.py:434 #, python-brace-format msgid "" "You have not uploaded your vaccine sheet. You can do it by clicking on ce lien." -#: registration/models.py:431 +#: registration/models.py:439 msgid "Vaccine sheet" msgstr "Carnet de vaccination" -#: registration/models.py:440 +#: registration/models.py:448 #, python-brace-format msgid "" "You have to pay {amount} € for your registration, or send a scholarship " @@ -2402,15 +2382,15 @@ msgstr "" "notification de bourse ou un justificatif de paiement. Vous pouvez le faire " "sur la page de paiement." -#: registration/models.py:446 registration/models.py:455 +#: registration/models.py:454 registration/models.py:463 msgid "Payment" msgstr "Paiement" -#: registration/models.py:452 +#: registration/models.py:460 msgid "Your payment is under approval." msgstr "Votre paiement est en cours de validation." -#: registration/models.py:463 +#: registration/models.py:471 #, python-brace-format msgid "" "You have not uploaded your parental authorization for the final tournament. " @@ -2419,19 +2399,19 @@ msgstr "" "Vous n'avez pas envoyé votre autorisation parentale pour la finale. Vous " "pouvez le faire en cliquant sur ce lien." -#: registration/models.py:478 +#: registration/models.py:486 msgid "student registration" msgstr "inscription d'élève" -#: registration/models.py:479 +#: registration/models.py:487 msgid "student registrations" msgstr "inscriptions d'élève" -#: registration/models.py:490 +#: registration/models.py:498 msgid "most recent degree in mathematics, computer science or physics" msgstr "Dernier diplôme obtenu en mathématiques, informatique ou physique" -#: registration/models.py:491 +#: registration/models.py:499 msgid "" "Your most recent degree in maths, computer science or physics, or your last " "entrance exam (CAPES, Agrégation,…)" @@ -2439,23 +2419,23 @@ msgstr "" "Votre dernier diplôme en mathématiques, informatique ou physique, ou votre " "dernier concours obtenu (CAPES, Agrégation, …)" -#: registration/models.py:496 registration/models.py:518 +#: registration/models.py:504 registration/models.py:526 msgid "professional activity" msgstr "activité professionnelle" -#: registration/models.py:509 +#: registration/models.py:517 msgid "coach registration" msgstr "inscription d'encadrant⋅e" -#: registration/models.py:510 +#: registration/models.py:518 msgid "coach registrations" msgstr "inscriptions d'encadrant⋅es" -#: registration/models.py:522 +#: registration/models.py:530 msgid "administrator" msgstr "administrateur⋅rice" -#: registration/models.py:523 +#: registration/models.py:531 msgid "" "An administrator has all rights. Please don't give this right to all juries " "and volunteers." @@ -2463,15 +2443,15 @@ msgstr "" "Un⋅e administrateur⋅rice a tous les droits. Merci de ne pas donner ce droit " "à toustes les juré⋅es et bénévoles." -#: registration/models.py:533 +#: registration/models.py:541 msgid "admin" msgstr "admin" -#: registration/models.py:533 +#: registration/models.py:541 msgid "volunteer" msgstr "bénévole" -#: registration/models.py:546 +#: registration/models.py:554 msgid "" "Registrations for tournament {tournament} are closing on {date:%Y-%m-%d %H:" "%M}. There are for now {validated_teams} validated teams (+ {pending_teams} " @@ -2481,11 +2461,11 @@ msgstr "" "%M}. Il y a pour l'instant {validated_teams} équipes validées (+ " "{pending_teams} en attente) sur {max_teams} attendues." -#: registration/models.py:554 +#: registration/models.py:562 msgid "Registrations" msgstr "Inscriptions" -#: registration/models.py:561 +#: registration/models.py:569 #, python-brace-format msgid "" "The team {trigram} requested to be validated for the tournament of " @@ -2496,7 +2476,7 @@ msgstr "" "Vous pouvez vérifier le statut de l'équipe sur la page de " "l'équipe." -#: registration/models.py:578 +#: registration/models.py:586 #, python-brace-format msgid "" "There are {valid} validated payments, {pending} pending and {invalid} " @@ -2507,11 +2487,11 @@ msgstr "" "invalides pour le tournoi {tournament}. Vous pouvez vérifier le statut des " "paiements sur la liste des paiements." -#: registration/models.py:585 +#: registration/models.py:593 msgid "Payments" msgstr "Paiements" -#: registration/models.py:609 registration/models.py:620 +#: registration/models.py:617 registration/models.py:628 #, python-brace-format msgid "" "

You are in the jury of the pool {pool} for the tournament of " @@ -2520,7 +2500,7 @@ msgstr "" "

Vous êtes dans le jury de la poule {pool} pour le tournoi {tournament}. " "Vous pouvez trouver la page de la poule ici.

" -#: registration/models.py:633 +#: registration/models.py:641 #, python-brace-format msgid "" "

You don't have given any note as a jury for the passage {passage} in the " @@ -2531,15 +2511,15 @@ msgstr "" "{passage} dans la poule {pool} de {tournament}. Vous pouvez donner vos notes " "ici.

" -#: registration/models.py:649 +#: registration/models.py:657 msgid "volunteer registration" msgstr "inscription de bénévole" -#: registration/models.py:650 +#: registration/models.py:658 msgid "volunteer registrations" msgstr "inscriptions de bénévoles" -#: registration/models.py:671 +#: registration/models.py:679 msgid "" "If set to true, then one payment is made for the full team, for example if " "the school pays for all." @@ -2547,100 +2527,100 @@ msgstr "" "Si vrai, alors un seul paiement est fait pour toute l'équipe, par exemple si " "le lycée paie pour tout le monde." -#: registration/models.py:676 +#: registration/models.py:684 msgid "total amount" msgstr "montant total" -#: registration/models.py:677 +#: registration/models.py:685 msgid "Corresponds to the total required amount to pay, in euros." msgstr "Correspond au montant total à payer, en euros." -#: registration/models.py:682 +#: registration/models.py:690 msgid "token" msgstr "jeton" -#: registration/models.py:685 +#: registration/models.py:693 msgid "A token to authorize external users to make this payment." msgstr "Un jeton pour autoriser des utilisateurs externes à faire ce paiement." -#: registration/models.py:689 +#: registration/models.py:697 msgid "for final tournament" msgstr "pour la finale" -#: registration/models.py:694 +#: registration/models.py:702 msgid "type" msgstr "type" -#: registration/models.py:697 +#: registration/models.py:705 msgid "No payment" msgstr "Pas de paiement" -#: registration/models.py:698 +#: registration/models.py:706 #: registration/templates/registration/payment_form.html:72 msgid "Credit card" msgstr "Carte bancaire" -#: registration/models.py:699 +#: registration/models.py:707 msgid "Scholarship" msgstr "Notification de bourse" -#: registration/models.py:700 +#: registration/models.py:708 #: registration/templates/registration/payment_form.html:77 msgid "Bank transfer" msgstr "Virement bancaire" -#: registration/models.py:701 +#: registration/models.py:709 msgid "Other (please indicate)" msgstr "Autre (veuillez spécifier)" -#: registration/models.py:702 +#: registration/models.py:710 msgid "The tournament is free" msgstr "Le tournoi est gratuit" -#: registration/models.py:709 +#: registration/models.py:717 msgid "Hello Asso checkout intent ID" msgstr "ID de l'intention de paiement Hello Asso" -#: registration/models.py:716 +#: registration/models.py:724 msgid "receipt" msgstr "justificatif" -#: registration/models.py:717 +#: registration/models.py:725 msgid "only if you have a scholarship or if you chose a bank transfer." msgstr "" "Nécessaire seulement si vous déclarez être boursièr⋅e ou si vous payez par " "virement bancaire." -#: registration/models.py:724 +#: registration/models.py:732 msgid "additional information" msgstr "informations additionnelles" -#: registration/models.py:725 +#: registration/models.py:733 msgid "To help us to find your payment." msgstr "Pour nous aider à retrouver votre paiement, si nécessaire." -#: registration/models.py:731 +#: registration/models.py:739 msgid "payment valid" msgstr "paiement valide" -#: registration/models.py:791 +#: registration/models.py:799 msgid "Reminder for your payment" msgstr "Rappel pour votre paiement" -#: registration/models.py:802 +#: registration/models.py:810 msgid "Payment confirmation" msgstr "Confirmation de paiement" -#: registration/models.py:824 +#: registration/models.py:832 #, python-brace-format msgid "Payment of {registrations}" msgstr "Paiements de {registrations}" -#: registration/models.py:827 +#: registration/models.py:835 msgid "payment" msgstr "paiement" -#: registration/models.py:828 +#: registration/models.py:836 msgid "payments" msgstr "paiements" diff --git a/participation/admin.py b/participation/admin.py index 97adde2..29cca92 100644 --- a/participation/admin.py +++ b/participation/admin.py @@ -51,7 +51,7 @@ class PassageInline(admin.TabularInline): model = Passage extra = 0 ordering = ('position',) - autocomplete_fields = ('defender', 'opponent', 'reporter', 'observer',) + autocomplete_fields = ('defender', 'opponent', 'reporter',) show_change_link = True @@ -118,7 +118,7 @@ class PassageAdmin(admin.ModelAdmin): list_filter = ('pool__tournament', 'pool__round', 'pool__letter', 'solution_number',) search_fields = ('pool__participations__team__name', 'pool__participations__team__trigram',) ordering = ('pool__tournament', 'pool__round', 'pool__letter', 'position',) - autocomplete_fields = ('pool', 'defender', 'opponent', 'reporter', 'observer',) + autocomplete_fields = ('pool', 'defender', 'opponent', 'reporter',) inlines = (NoteInline,) @admin.display(description=_("defender"), ordering='defender__team__trigram') diff --git a/participation/forms.py b/participation/forms.py index fa5a2b0..7c6d4c9 100644 --- a/participation/forms.py +++ b/participation/forms.py @@ -336,7 +336,7 @@ class PassageForm(forms.ModelForm): class Meta: model = Passage - fields = ('position', 'solution_number', 'defender', 'opponent', 'reporter', 'observer', 'defender_penalties',) + fields = ('position', 'solution_number', 'defender', 'opponent', 'reporter', 'defender_penalties',) class SynthesisForm(forms.ModelForm): @@ -367,4 +367,4 @@ class NoteForm(forms.ModelForm): class Meta: model = Note fields = ('defender_writing', 'defender_oral', 'opponent_writing', - 'opponent_oral', 'reporter_writing', 'reporter_oral', 'observer_oral', ) + 'opponent_oral', 'reporter_writing', 'reporter_oral', ) diff --git a/participation/migrations/0011_remove_note_observer_oral_remove_passage_observer.py b/participation/migrations/0011_remove_note_observer_oral_remove_passage_observer.py new file mode 100644 index 0000000..0fa0904 --- /dev/null +++ b/participation/migrations/0011_remove_note_observer_oral_remove_passage_observer.py @@ -0,0 +1,24 @@ +# Generated by Django 5.0.3 on 2024-04-16 21:59 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "participation", + "0010_tournament_notes_sheet_id_alter_note_defender_oral_and_more", + ), + ] + + operations = [ + migrations.RemoveField( + model_name="note", + name="observer_oral", + ), + migrations.RemoveField( + model_name="passage", + name="observer", + ), + ] diff --git a/participation/models.py b/participation/models.py index 158f866..8261cec 100644 --- a/participation/models.py +++ b/participation/models.py @@ -979,7 +979,7 @@ class Pool(models.Model): spreadsheet.del_worksheet(spreadsheet.worksheet("Sheet1")) pool_size = self.participations.count() - passage_width = 7 if pool_size == 4 else 6 + passage_width = 6 passages = self.passages.all() header = [ @@ -988,10 +988,8 @@ class Pool(models.Model): sum(([f"Défenseur⋅se ({passage.defender.team.trigram})", "", f"Opposant⋅e ({passage.opponent.team.trigram})", "", f"Rapporteur⋅rice ({passage.reporter.team.trigram})", ""] - + ([f"Observateur⋅rice ({passage.observer.team.trigram})"] if pool_size == 4 else []) for passage in passages), start=["Rôle", ""]), sum((["Écrit (/20)", "Oral (/20)", "Écrit (/10)", "Oral (/10)", "Écrit (/10)", "Oral (/10)"] - + (["Oral (± 4)"] if pool_size == 4 else []) for _passage in passages), start=["Juré⋅e", ""]), ] @@ -1002,8 +1000,6 @@ class Pool(models.Model): note = passage.notes.filter(jury=jury).first() line.extend([note.defender_writing, note.defender_oral, note.opponent_writing, note.opponent_oral, note.reporter_writing, note.reporter_oral]) - if pool_size == 4: - line.append(note.observer_oral) notes.append(line) notes.append([]) # Add empty line to ensure pretty design @@ -1016,8 +1012,8 @@ class Pool(models.Model): return getcol((number - 1) // 26) + chr(65 + (number - 1) % 26) average = ["Moyenne", ""] - coeffs = sum(([1, 1.6 - 0.4 * passage.defender_penalties, 0.9, 2, 0.9, 1] - + ([1] if pool_size == 4 else []) for passage in passages), start=["Coefficient", ""]) + coeffs = sum(([1, 1.6 - 0.4 * passage.defender_penalties, 0.9, 2, 0.9, 1] for passage in passages), + start=["Coefficient", ""]) subtotal = ["Sous-total", ""] footer = [average, coeffs, subtotal, 32 * [""]] @@ -1045,10 +1041,6 @@ class Pool(models.Model): subtotal.extend([f"={rep_w_col}{max_row + 1} * {rep_w_col}{max_row + 2}" f" + {rep_o_col}{max_row + 1} * {rep_o_col}{max_row + 2}", ""]) - if pool_size == 4: - obs_col = getcol(min_column + passage_width * i + 6) - subtotal.append(f"={obs_col}{max_row + 1} * {obs_col}{max_row + 2}") - ranking = [ ["Équipe", "", "Problème", "Total", "Rang"], ] @@ -1062,10 +1054,10 @@ class Pool(models.Model): ] case 4: passage_matrix = [ - [0, 3, 2, 1], - [1, 0, 3, 2], - [2, 1, 0, 3], - [3, 2, 1, 0], + [0, 3, 2], + [1, 0, 3], + [2, 1, 0], + [3, 2, 1], ] case 5: passage_matrix = [ @@ -1082,9 +1074,6 @@ class Pool(models.Model): formula += getcol(min_column + passage_line[0] * passage_width) + str(max_row + 3) # Defender formula += " + " + getcol(min_column + passage_line[1] * passage_width + 2) + str(max_row + 3) # Opponent formula += " + " + getcol(min_column + passage_line[2] * passage_width + 4) + str(max_row + 3) # Reporter - if pool_size == 4: - # Observer - formula += " + " + getcol(min_column + passage_line[3] * passage_width + 6) + str(max_row + 3) ranking.append([f"{participation.team.name} ({participation.team.trigram})", "", f"=${getcol(3 + (passage.position - 1) * passage_width)}$1", formula, f"=RANG(D{max_row + 5 + passage.position}; " @@ -1173,8 +1162,6 @@ class Pool(models.Model): for passage in passages: column_widths.append((f"{getcol(3 + passage_width * (passage.position - 1))}" f":{getcol(8 + passage_width * (passage.position - 1))}", 75)) - if pool_size == 4: - column_widths.append((getcol(9 + passage_width * (passage.position - 1)), 120)) for column, width in column_widths: grid_range = a1_range_to_grid_range(column, worksheet.id) format_requests.append({ @@ -1260,8 +1247,8 @@ class Pool(models.Model): for i in range(pool_size): for j in range(passage_width): column = getcol(min_column + i * passage_width + j) - min_note = 0 if j < 6 else -4 - max_note = 20 if j < 2 else 10 if j < 6 else 4 + min_note = 0 + max_note = 20 if j < 2 else 10 format_requests.append({ "setDataValidation": { "range": a1_range_to_grid_range(f"{column}{min_row - 1}:{column}{max_row}", worksheet.id), @@ -1350,7 +1337,7 @@ class Pool(models.Model): if not data or not data[0]: return - passage_width = 7 if self.participations.count() == 4 else 6 + passage_width = 6 for line in data: jury_name = line[0] jury_id = line[1] @@ -1422,16 +1409,6 @@ class Passage(models.Model): related_name="+", ) - observer = models.ForeignKey( - Participation, - on_delete=models.PROTECT, - null=True, - blank=True, - default=None, - verbose_name=_("observer"), - related_name="+", - ) - defender_penalties = models.PositiveSmallIntegerField( verbose_name=_("penalties"), default=0, @@ -1486,10 +1463,6 @@ class Passage(models.Model): def average_reporter(self) -> float: return 0.9 * self.average_reporter_writing + self.average_reporter_oral - @property - def average_observer(self) -> float: - return self.avg(note.observer_oral for note in self.notes.all()) - @property def averages(self): yield self.average_defender_writing @@ -1498,13 +1471,10 @@ class Passage(models.Model): yield self.average_opponent_oral yield self.average_reporter_writing yield self.average_reporter_oral - if self.observer: - yield self.average_observer def average(self, participation): return self.average_defender if participation == self.defender else self.average_opponent \ - if participation == self.opponent else self.average_reporter if participation == self.reporter \ - else self.average_observer if participation == self.observer else 0 + if participation == self.opponent else self.average_reporter if participation == self.reporter else 0 def get_absolute_url(self): return reverse_lazy("participation:passage_detail", args=(self.pk,)) @@ -1519,9 +1489,6 @@ class Passage(models.Model): if self.reporter not in self.pool.participations.all(): raise ValidationError(_("Team {trigram} is not registered in the pool.") .format(trigram=self.reporter.team.trigram)) - if self.observer and self.observer not in self.pool.participations.all(): - raise ValidationError(_("Team {trigram} is not registered in the pool.") - .format(trigram=self.observer.team.trigram)) return super().clean() def __str__(self): @@ -1705,12 +1672,6 @@ class Note(models.Model): default=0, ) - observer_oral = models.SmallIntegerField( - verbose_name=_("observer note"), - choices=zip(range(-4, 5), range(-4, 5)), - default=0, - ) - def get_all(self): yield self.defender_writing yield self.defender_oral @@ -1718,18 +1679,15 @@ class Note(models.Model): yield self.opponent_oral yield self.reporter_writing yield self.reporter_oral - if self.passage.observer: - yield self.observer_oral def set_all(self, defender_writing: int, defender_oral: int, opponent_writing: int, opponent_oral: int, - reporter_writing: int, reporter_oral: int, observer_oral: int = 0): + reporter_writing: int, reporter_oral: int): self.defender_writing = defender_writing self.defender_oral = defender_oral self.opponent_writing = opponent_writing self.opponent_oral = opponent_oral self.reporter_writing = reporter_writing self.reporter_oral = reporter_oral - self.observer_oral = observer_oral def update_spreadsheet(self): if not self.has_any_note(): @@ -1744,7 +1702,7 @@ class Note(models.Model): if not jury_id_cell: raise ValueError("The jury ID cell was not found in the spreadsheet.") jury_row = jury_id_cell.row - passage_width = 7 if passage.pool.participations.count() == 4 else 6 + passage_width = 6 def getcol(number: int) -> str: if number == 0: diff --git a/participation/tables.py b/participation/tables.py index 4c87c95..bd2feb5 100644 --- a/participation/tables.py +++ b/participation/tables.py @@ -155,4 +155,4 @@ class NoteTable(tables.Table): } model = Note fields = ('jury', 'defender_writing', 'defender_oral', 'opponent_writing', 'opponent_oral', - 'reporter_writing', 'reporter_oral', 'observer_oral', 'update',) + 'reporter_writing', 'reporter_oral', 'update',) diff --git a/participation/templates/participation/passage_detail.html b/participation/templates/participation/passage_detail.html index b5efcaa..1f7d31d 100644 --- a/participation/templates/participation/passage_detail.html +++ b/participation/templates/participation/passage_detail.html @@ -34,11 +34,6 @@
{% trans "Reporter:" %}
{{ passage.reporter.team }}
- {% if passage.observer %} -
{% trans "Observer:" %}
-
{{ passage.observer.team }}
- {% endif %} -
{% trans "Defended solution:" %}
{{ passage.defended_solution }}
@@ -113,14 +108,6 @@ ({{ passage.reporter.team.trigram }}) :
{{ passage.average_reporter_oral|floatformat }}/10
- - {% if passage.observer %} -
- {% trans "Average points for the observer oral" %} - ({{ passage.observer.team.trigram }}) : -
-
{{ passage.average_observer|floatformat }}/4
- {% endif %}
@@ -143,14 +130,6 @@ ({{ passage.reporter.team.trigram }}) :
{{ passage.average_reporter|floatformat }}/19
- - {% if passage.observer %} -
- {% trans "Observer points" %} - ({{ passage.observer.team.trigram }}) : -
-
{{ passage.average_observer|floatformat }}/4
- {% endif %} diff --git a/participation/templates/participation/tex/bareme.tex b/participation/templates/participation/tex/bareme.tex index 3e39534..23ea5d8 100644 --- a/participation/templates/participation/tex/bareme.tex +++ b/participation/templates/participation/tex/bareme.tex @@ -73,18 +73,6 @@ \end{tabular} -{% if passages.count == 4 %} - -\vfill - -%%%%%%% INTERVENTION EXCEPTIONNELLE -\begin{tabular}{|p{14.7cm}|c|p{2cm}|p{2cm}|p{2cm}|p{2cm}|}\hline -\multicolumn{2}{|l|}{L'{\bf Intervention exceptionnelle} \normalsize permet de signaler une erreur grave omise par tous.} {% for passage in passages.all %}& P.{{ forloop.counter }} - {{ passage.observer.team.trigram }} {% endfor %}\\ \hline \hline -%ORAL -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 %} - \newpage %%%%%%%%%%%%%%%%%OPPOSANT diff --git a/participation/templates/participation/tex/finale.tex b/participation/templates/participation/tex/finale.tex index 2ae432d..dc9a787 100644 --- a/participation/templates/participation/tex/finale.tex +++ b/participation/templates/participation/tex/finale.tex @@ -61,22 +61,6 @@ Tour {{ pool.round }} \;-- Poule {{ pool.get_letter_display }}{{ page }} \;-- {% & \phantom{asd asd} \phantom{asd asd} \centering \normalsize$0\leq x\leq 10$ & \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}{% for passage in passages.all %} & \multicolumn{2}{c|}{\Large {{ passage.observer.team.trigram }}}{% 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} diff --git a/participation/views.py b/participation/views.py index b596e61..1a8d437 100644 --- a/participation/views.py +++ b/participation/views.py @@ -1245,8 +1245,7 @@ class PoolUploadNotesView(VolunteerMixin, FormView, DetailView): return self.form_invalid(form) for vr, notes in parsed_notes.items(): - # There is an observer note for 4-teams pools - notes_count = 7 if pool.passages.count() == 4 else 6 + notes_count = 6 for i, passage in enumerate(pool.passages.all()): note = Note.objects.get_or_create(jury=vr, passage=passage)[0] passage_notes = notes[notes_count * i:notes_count * (i + 1)] @@ -1282,7 +1281,7 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): def render_to_response(self, context, **response_kwargs): # noqa: C901 pool_size = self.object.passages.count() - passage_width = 7 if pool_size == 4 else 6 + passage_width = 6 line_length = pool_size * passage_width def getcol(number: int) -> str: @@ -1454,10 +1453,6 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): col_style.addElement(TableColumnProperties(columnwidth="2.6cm", breakbefore="auto")) doc.automaticstyles.addElement(col_style) - obs_col_style = Style(name="co3", family="table-column") - obs_col_style.addElement(TableColumnProperties(columnwidth="5.2cm", breakbefore="auto")) - doc.automaticstyles.addElement(obs_col_style) - table = Table(name=f"Poule {self.object.get_letter_display()}{self.object.round}") doc.spreadsheet.addElement(table) @@ -1465,8 +1460,7 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): table.addElement(TableColumn(stylename=jury_id_style)) for i in range(line_length): - table.addElement(TableColumn( - stylename=obs_col_style if pool_size == 4 and i % passage_width == passage_width - 1 else col_style)) + table.addElement(TableColumn(stylename=col_style)) # Add line for the problems for different passages header_pb = TableRow() @@ -1479,10 +1473,10 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): for passage in self.object.passages.all(): tc = TableCell(valuetype="string", stylename=title_style_topleftright) tc.addElement(P(text=f"Problème {passage.solution_number}")) - tc.setAttribute('numbercolumnsspanned', "7" if pool_size == 4 else "6") + tc.setAttribute('numbercolumnsspanned', "6") tc.setAttribute("formula", f"of:=[.B{8 + self.object.juries.count() + passage.position}]") header_pb.addElement(tc) - header_pb.addElement(CoveredTableCell(numbercolumnsrepeated=6 if pool_size == 4 else 5)) + header_pb.addElement(CoveredTableCell(numbercolumnsrepeated=5)) # Add roles on the second line of the table header_role = TableRow() @@ -1506,17 +1500,12 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): header_role.addElement(CoveredTableCell()) reporter_tc = TableCell(valuetype="string", - stylename=title_style_right if pool_size != 4 else title_style) + stylename=title_style_right) reporter_tc.addElement(P(text="Rapporteur⋅rice")) reporter_tc.setAttribute('numbercolumnsspanned', "2") header_role.addElement(reporter_tc) header_role.addElement(CoveredTableCell()) - if pool_size == 4: - observer_tc = TableCell(valuetype="string", stylename=title_style_right) - observer_tc.addElement(P(text="Intervention exceptionnelle")) - header_role.addElement(observer_tc) - # Add maximum notes on the third line header_notes = TableRow() table.addElement(header_notes) @@ -1547,17 +1536,10 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): reporter_w_tc.addElement(P(text="Écrit (/10)")) header_notes.addElement(reporter_w_tc) - reporter_o_tc = TableCell(valuetype="string", - stylename=title_style_botright if pool_size != 4 else title_style_bot) + reporter_o_tc = TableCell(valuetype="string", stylename=title_style_botright) reporter_o_tc.addElement(P(text="Oral (/10)")) header_notes.addElement(reporter_o_tc) - if pool_size == 4: - observer_tc = TableCell(valuetype="string", - stylename=title_style_botright) - observer_tc.addElement(P(text="Oral (± 4)")) - header_notes.addElement(observer_tc) - # Add a notation line for each jury for jury in self.object.juries.all(): jury_row = TableRow() @@ -1631,16 +1613,10 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): reporter_w_tc.addElement(P(text="1")) coeff_row.addElement(reporter_w_tc) - reporter_o_tc = TableCell(valuetype="float", value=1, - stylename=style_right if pool_size != 4 else style) + reporter_o_tc = TableCell(valuetype="float", value=1, stylename=style_right) reporter_o_tc.addElement(P(text="1")) coeff_row.addElement(reporter_o_tc) - if pool_size == 4: - observer_tc = TableCell(valuetype="float", value=1, stylename=style_right) - observer_tc.addElement(P(text="1")) - coeff_row.addElement(observer_tc) - # Add the subtotal on the next line subtotal_row = TableRow() table.addElement(subtotal_row) @@ -1672,8 +1648,7 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): rep_w_col = getcol(min_column + passage_width * i + 4) rep_o_col = getcol(min_column + passage_width * i + 5) - reporter_tc = TableCell(valuetype="float", value=passage.average_reporter, - stylename=style_botright if pool_size != 4 else style_bot) + reporter_tc = TableCell(valuetype="float", value=passage.average_reporter, stylename=style_botright) reporter_tc.addElement(P(text=str(passage.average_reporter))) reporter_tc.setAttribute('numbercolumnsspanned', "2") reporter_tc.setAttribute("formula", f"of:=[.{rep_w_col}{max_row + 1}] * [.{rep_w_col}{max_row + 2}]" @@ -1681,14 +1656,6 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): subtotal_row.addElement(reporter_tc) subtotal_row.addElement(CoveredTableCell()) - if pool_size == 4: - obs_col = getcol(min_column + passage_width * i + 6) - observer_tc = TableCell(valuetype="float", value=passage.average_observer, - stylename=style_botright) - observer_tc.addElement(P(text=str(passage.average_observer))) - observer_tc.setAttribute("formula", f"of:=[.{obs_col}{max_row + 1}] * [.{obs_col}{max_row + 2}]") - subtotal_row.addElement(observer_tc) - table.addElement(TableRow()) # Compute the total scores in a new table @@ -1710,7 +1677,6 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): # For each line of the matrix P, the ith team is defender on the passage number Pi0, # opponent on the passage number Pi1, reporter on the passage number Pi2 - # and eventually observer on the passage number Pi3. passage_matrix = [] match pool_size: case 3: @@ -1721,10 +1687,10 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): ] case 4: passage_matrix = [ - [0, 3, 2, 1], - [1, 0, 3, 2], - [2, 1, 0, 3], - [3, 2, 1, 0], + [0, 3, 2], + [1, 0, 3], + [2, 1, 0], + [3, 2, 1], ] case 5: passage_matrix = [ @@ -1759,9 +1725,6 @@ class PoolNotesTemplateView(VolunteerMixin, DetailView): formula += getcol(min_column + passage_line[0] * passage_width) + str(max_row + 3) # Defender formula += " + " + getcol(min_column + passage_line[1] * passage_width + 2) + str(max_row + 3) # Opponent formula += " + " + getcol(min_column + passage_line[2] * passage_width + 4) + str(max_row + 3) # Reporter - if pool_size == 4: - # Observer - formula += " + " + getcol(min_column + passage_line[3] * passage_width + 6) + str(max_row + 3) score_tc.setAttribute("formula", formula) team_row.addElement(score_tc) @@ -1986,7 +1949,7 @@ class PassageDetailView(LoginRequiredMixin, DetailView): or reg in passage.pool.juries.all() or reg.pools_presided.filter(tournament=passage.pool.tournament).exists()) \ or reg.participates and reg.team \ - and reg.team.participation in [passage.defender, passage.opponent, passage.reporter, passage.observer]: + and reg.team.participation in [passage.defender, passage.opponent, passage.reporter]: return super().dispatch(request, *args, **kwargs) return self.handle_no_permission() @@ -2004,9 +1967,6 @@ class PassageDetailView(LoginRequiredMixin, DetailView): notes = [note for note in notes if note.has_any_note() or note.jury == reg] context["notes"] = NoteTable(notes) - # Only display the observer column for 4-teams pools - if passage.pool.participations.count() != 4: - context['notes']._sequence.remove('observer_oral') if 'notes' in context and not self.request.user.registration.is_admin: context['notes']._sequence.remove('update') @@ -2016,8 +1976,6 @@ class PassageDetailView(LoginRequiredMixin, DetailView): context['notes'].columns['opponent_oral'].column.verbose_name += f" ({passage.opponent.team.trigram})" context['notes'].columns['reporter_writing'].column.verbose_name += f" ({passage.reporter.team.trigram})" context['notes'].columns['reporter_oral'].column.verbose_name += f" ({passage.reporter.team.trigram})" - if self.object.observer: - context['notes'].columns['observer_oral'].column.verbose_name += f" ({passage.observer.team.trigram})" return context @@ -2112,11 +2070,6 @@ class NoteUpdateView(VolunteerMixin, UpdateView): form.fields['opponent_oral'].label += f" ({self.object.passage.opponent.team.trigram})" form.fields['reporter_writing'].label += f" ({self.object.passage.reporter.team.trigram})" form.fields['reporter_oral'].label += f" ({self.object.passage.reporter.team.trigram})" - if self.object.passage.observer: - form.fields['observer_oral'].label += f" ({self.object.passage.observer.team.trigram})" - else: - # Set the note of the observer only for 4-teams pools - del form.fields['observer_oral'] return form def form_valid(self, form):