1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-02-24 03:01:19 +00:00

Compare commits

..

No commits in common. "bbd8ad43cdc96f53d0e44e2fab5a919ed979b8b1" and "bb01e1b0b521f23611efb4c8991e2a1bbfb949da" have entirely different histories.

5 changed files with 73 additions and 125 deletions

View File

@ -169,7 +169,7 @@ class SolutionForm(forms.ModelForm):
class PoolForm(forms.ModelForm): class PoolForm(forms.ModelForm):
class Meta: class Meta:
model = Pool model = Pool
fields = ('tournament', 'round', 'bbb_url', 'results_available', 'juries',) fields = ('tournament', 'round', 'bbb_url', 'juries',)
widgets = { widgets = {
"juries": forms.CheckboxSelectMultiple, "juries": forms.CheckboxSelectMultiple,
} }

View File

@ -1,18 +0,0 @@
# Generated by Django 3.1.7 on 2021-04-10 07:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('participation', '0004_passage_defender_penalties'),
]
operations = [
migrations.AddField(
model_name='pool',
name='results_available',
field=models.BooleanField(default=False, help_text='Check this case when results become accessible to teams. They stay accessible to you. Only averages are given.', verbose_name='results available'),
),
]

View File

@ -368,13 +368,6 @@ class Pool(models.Model):
help_text=_("The link of the BBB visio for this pool."), help_text=_("The link of the BBB visio for this pool."),
) )
results_available = models.BooleanField(
default=False,
verbose_name=_("results available"),
help_text=_("Check this case when results become accessible to teams. "
"They stay accessible to you. Only averages are given."),
)
@property @property
def solutions(self): def solutions(self):
return Solution.objects.filter(participation__in=self.participations, final_solution=self.tournament.final) return Solution.objects.filter(participation__in=self.participations, final_solution=self.tournament.final)
@ -598,12 +591,7 @@ class Synthesis(models.Model):
) )
def __str__(self): def __str__(self):
return _("Synthesis of {team} as {type} for problem {problem} of {defender}").format( return _("Synthesis for the {type} of the {passage}").format(type=self.get_type_display(), passage=self.passage)
team=self.participation.team.trigram,
type=self.get_type_display(),
problem=self.passage.solution_number,
defender=self.passage.defender.team.trigram,
)
class Meta: class Meta:
verbose_name = _("synthesis") verbose_name = _("synthesis")

View File

@ -539,8 +539,7 @@ class TournamentDetailView(DetailView):
notes = dict() notes = dict()
for participation in self.object.participations.all(): for participation in self.object.participations.all():
note = sum(pool.average(participation) note = sum(pool.average(participation)
for pool in self.object.pools.filter(participations=participation).all() for pool in self.object.pools.filter(participations=participation).all())
if pool.results_available or self.request.user.registration.is_volunteer)
if note: if note:
notes[participation] = note notes[participation] = note
context["notes"] = sorted(notes.items(), key=lambda x: x[1], reverse=True) context["notes"] = sorted(notes.items(), key=lambda x: x[1], reverse=True)
@ -617,14 +616,12 @@ class PoolDetailView(LoginRequiredMixin, DetailView):
context["passages"] = PassageTable(self.object.passages.all()) context["passages"] = PassageTable(self.object.passages.all())
if self.object.results_available or self.request.user.registration.is_volunteer: notes = dict()
# Hide notes before the end of the turn for participation in self.object.participations.all():
notes = dict() note = self.object.average(participation)
for participation in self.object.participations.all(): if note:
note = self.object.average(participation) notes[participation] = note
if note: context["notes"] = sorted(notes.items(), key=lambda x: x[1], reverse=True)
notes[participation] = note
context["notes"] = sorted(notes.items(), key=lambda x: x[1], reverse=True)
return context return context

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TFJM\n" "Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-04-10 10:02+0200\n" "POT-Creation-Date: 2021-04-03 21:58+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n" "Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -203,7 +203,7 @@ msgstr "début"
msgid "end" msgid "end"
msgstr "fin" msgstr "fin"
#: apps/participation/models.py:147 apps/participation/models.py:408 #: apps/participation/models.py:147 apps/participation/models.py:401
#: apps/participation/templates/participation/tournament_detail.html:18 #: apps/participation/templates/participation/tournament_detail.html:18
msgid "place" msgid "place"
msgstr "lieu" msgstr "lieu"
@ -286,8 +286,8 @@ msgstr "L'équipe est sélectionnée pour la finale."
msgid "Participation of the team {name} ({trigram})" msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/participation/models.py:331 apps/participation/models.py:537 #: apps/participation/models.py:331 apps/participation/models.py:530
#: apps/participation/models.py:575 #: apps/participation/models.py:568
msgid "participation" msgid "participation"
msgstr "participation" msgstr "participation"
@ -316,62 +316,49 @@ msgstr "Lien BigBlueButton"
msgid "The link of the BBB visio for this pool." msgid "The link of the BBB visio for this pool."
msgstr "Le lien du salon BBB pour cette poule." msgstr "Le lien du salon BBB pour cette poule."
#: apps/participation/models.py:373 #: apps/participation/models.py:382
msgid "results available"
msgstr "résultats disponibles"
#: apps/participation/models.py:374
msgid ""
"Check this case when results become accessible to teams. They stay "
"accessible to you. Only averages are given."
msgstr ""
"Cochez cette case lorsque les résultats deviennent accessibles aux équipes. "
"Ils restent toujours accessibles pour vous. Seules les moyennes sont "
"communiquées."
#: apps/participation/models.py:389
#, python-brace-format #, python-brace-format
msgid "Pool {round} for tournament {tournament} with teams {teams}" msgid "Pool {round} for tournament {tournament} with teams {teams}"
msgstr "Poule {round} du tournoi {tournament} avec les équipes {teams}" msgstr "Poule {round} du tournoi {tournament} avec les équipes {teams}"
#: apps/participation/models.py:395 apps/participation/models.py:403 #: apps/participation/models.py:388 apps/participation/models.py:396
msgid "pool" msgid "pool"
msgstr "poule" msgstr "poule"
#: apps/participation/models.py:396 #: apps/participation/models.py:389
msgid "pools" msgid "pools"
msgstr "poules" msgstr "poules"
#: apps/participation/models.py:410 #: apps/participation/models.py:403
msgid "Where the solution is presented?" msgid "Where the solution is presented?"
msgstr "Où est-ce que les solutions sont défendues ?" msgstr "Où est-ce que les solutions sont défendues ?"
#: apps/participation/models.py:415 #: apps/participation/models.py:408
msgid "defended solution" msgid "defended solution"
msgstr "solution défendue" msgstr "solution défendue"
#: apps/participation/models.py:417 apps/participation/models.py:544 #: apps/participation/models.py:410 apps/participation/models.py:537
#, python-brace-format #, python-brace-format
msgid "Problem #{problem}" msgid "Problem #{problem}"
msgstr "Problème n°{problem}" msgstr "Problème n°{problem}"
#: apps/participation/models.py:424 apps/participation/tables.py:106 #: apps/participation/models.py:417 apps/participation/tables.py:106
msgid "defender" msgid "defender"
msgstr "défenseur" msgstr "défenseur"
#: apps/participation/models.py:431 apps/participation/models.py:587 #: apps/participation/models.py:424 apps/participation/models.py:580
msgid "opponent" msgid "opponent"
msgstr "opposant" msgstr "opposant"
#: apps/participation/models.py:438 apps/participation/models.py:588 #: apps/participation/models.py:431 apps/participation/models.py:581
msgid "reporter" msgid "reporter"
msgstr "rapporteur" msgstr "rapporteur"
#: apps/participation/models.py:443 #: apps/participation/models.py:436
msgid "penalties" msgid "penalties"
msgstr "pénalités" msgstr "pénalités"
#: apps/participation/models.py:445 #: apps/participation/models.py:438
msgid "" msgid ""
"Number of penalties for the defender. The defender will loose a 0.5 " "Number of penalties for the defender. The defender will loose a 0.5 "
"coefficient per penalty." "coefficient per penalty."
@ -379,104 +366,102 @@ msgstr ""
"Nombre de pénalités pour le défenseur. Le défenseur perd un coefficient 0.5 " "Nombre de pénalités pour le défenseur. Le défenseur perd un coefficient 0.5 "
"sur sa solution écrite par pénalité." "sur sa solution écrite par pénalité."
#: apps/participation/models.py:505 apps/participation/models.py:508 #: apps/participation/models.py:498 apps/participation/models.py:501
#: apps/participation/models.py:511 #: apps/participation/models.py:504
#, python-brace-format #, python-brace-format
msgid "Team {trigram} is not registered in the pool." msgid "Team {trigram} is not registered in the pool."
msgstr "L'équipe {trigram} n'est pas inscrite dans la poule." msgstr "L'équipe {trigram} n'est pas inscrite dans la poule."
#: apps/participation/models.py:516 #: apps/participation/models.py:509
#, python-brace-format #, python-brace-format
msgid "Passage of {defender} for problem {problem}" msgid "Passage of {defender} for problem {problem}"
msgstr "Passage de {defender} pour le problème {problem}" msgstr "Passage de {defender} pour le problème {problem}"
#: apps/participation/models.py:520 apps/participation/models.py:582 #: apps/participation/models.py:513 apps/participation/models.py:575
#: apps/participation/models.py:625 #: apps/participation/models.py:613
msgid "passage" msgid "passage"
msgstr "passage" msgstr "passage"
#: apps/participation/models.py:521 #: apps/participation/models.py:514
msgid "passages" msgid "passages"
msgstr "passages" msgstr "passages"
#: apps/participation/models.py:542 #: apps/participation/models.py:535
msgid "problem" msgid "problem"
msgstr "numéro de problème" msgstr "numéro de problème"
#: apps/participation/models.py:549 #: apps/participation/models.py:542
msgid "solution for the final tournament" msgid "solution for the final tournament"
msgstr "solution pour la finale" msgstr "solution pour la finale"
#: apps/participation/models.py:554 apps/participation/models.py:593 #: apps/participation/models.py:547 apps/participation/models.py:586
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: apps/participation/models.py:562 #: apps/participation/models.py:555
#, python-brace-format #, python-brace-format
msgid "Solution of team {team} for problem {problem}" msgid "Solution of team {team} for problem {problem}"
msgstr "Solution de l'équipe {team} pour le problème {problem}" msgstr "Solution de l'équipe {team} pour le problème {problem}"
#: apps/participation/models.py:566 #: apps/participation/models.py:559
msgid "solution" msgid "solution"
msgstr "solution" msgstr "solution"
#: apps/participation/models.py:567 #: apps/participation/models.py:560
msgid "solutions" msgid "solutions"
msgstr "solutions" msgstr "solutions"
#: apps/participation/models.py:601 #: apps/participation/models.py:594
#, python-brace-format #, python-brace-format
msgid "Synthesis of {team} as {type} for problem {problem} of {defender}" msgid "Synthesis for the {type} of the {passage}"
msgstr "" msgstr "Synthèse de {type} du {passage}"
"Note de synthèse de l'équipe {team} en tant que {type} pour le problème "
"{problem} de {defender}"
#: apps/participation/models.py:609 #: apps/participation/models.py:597
msgid "synthesis" msgid "synthesis"
msgstr "note de synthèse" msgstr "note de synthèse"
#: apps/participation/models.py:610 #: apps/participation/models.py:598
msgid "syntheses" msgid "syntheses"
msgstr "notes de synthèse" msgstr "notes de synthèse"
#: apps/participation/models.py:618 #: apps/participation/models.py:606
msgid "jury" msgid "jury"
msgstr "jury" msgstr "jury"
#: apps/participation/models.py:630 #: apps/participation/models.py:618
msgid "defender writing note" msgid "defender writing note"
msgstr "note d'écrit du défenseur" msgstr "note d'écrit du défenseur"
#: apps/participation/models.py:636 #: apps/participation/models.py:624
msgid "defender oral note" msgid "defender oral note"
msgstr "note d'oral du défenseur" msgstr "note d'oral du défenseur"
#: apps/participation/models.py:642 #: apps/participation/models.py:630
msgid "opponent writing note" msgid "opponent writing note"
msgstr "note d'écrit de l'opposant" msgstr "note d'écrit de l'opposant"
#: apps/participation/models.py:648 #: apps/participation/models.py:636
msgid "opponent oral note" msgid "opponent oral note"
msgstr "note d'oral de l'opposant" msgstr "note d'oral de l'opposant"
#: apps/participation/models.py:654 #: apps/participation/models.py:642
msgid "reporter writing note" msgid "reporter writing note"
msgstr "not d'écrit du rapporteur" msgstr "not d'écrit du rapporteur"
#: apps/participation/models.py:660 #: apps/participation/models.py:648
msgid "reporter oral note" msgid "reporter oral note"
msgstr "note d'oral du rapporteur" msgstr "note d'oral du rapporteur"
#: apps/participation/models.py:669 #: apps/participation/models.py:657
#, python-brace-format #, python-brace-format
msgid "Notes of {jury} for {passage}" msgid "Notes of {jury} for {passage}"
msgstr "Notes de {jury} pour le {passage}" msgstr "Notes de {jury} pour le {passage}"
#: apps/participation/models.py:676 #: apps/participation/models.py:664
msgid "note" msgid "note"
msgstr "note" msgstr "note"
#: apps/participation/models.py:677 #: apps/participation/models.py:665
msgid "notes" msgid "notes"
msgstr "notes" msgstr "notes"
@ -551,9 +536,9 @@ msgid "Join"
msgstr "Rejoindre" msgstr "Rejoindre"
#: apps/participation/templates/participation/note_form.html:11 #: apps/participation/templates/participation/note_form.html:11
#: apps/participation/templates/participation/passage_detail.html:49 #: apps/participation/templates/participation/passage_detail.html:47
#: apps/participation/templates/participation/passage_detail.html:105 #: apps/participation/templates/participation/passage_detail.html:103
#: apps/participation/templates/participation/passage_detail.html:111 #: apps/participation/templates/participation/passage_detail.html:108
#: apps/participation/templates/participation/pool_detail.html:55 #: apps/participation/templates/participation/pool_detail.html:55
#: apps/participation/templates/participation/pool_detail.html:73 #: apps/participation/templates/participation/pool_detail.html:73
#: apps/participation/templates/participation/pool_detail.html:78 #: apps/participation/templates/participation/pool_detail.html:78
@ -612,11 +597,11 @@ msgid "Upload solution"
msgstr "Envoyer une solution" msgstr "Envoyer une solution"
#: apps/participation/templates/participation/participation_detail.html:50 #: apps/participation/templates/participation/participation_detail.html:50
#: apps/participation/templates/participation/passage_detail.html:117 #: apps/participation/templates/participation/passage_detail.html:113
#: apps/participation/templates/participation/team_detail.html:172 #: apps/participation/templates/participation/team_detail.html:172
#: apps/participation/templates/participation/upload_motivation_letter.html:13 #: apps/participation/templates/participation/upload_motivation_letter.html:13
#: apps/participation/templates/participation/upload_solution.html:11 #: apps/participation/templates/participation/upload_solution.html:11
#: apps/participation/templates/participation/upload_synthesis.html:16 #: apps/participation/templates/participation/upload_synthesis.html:11
#: apps/registration/templates/registration/upload_health_sheet.html:17 #: apps/registration/templates/registration/upload_health_sheet.html:17
#: apps/registration/templates/registration/upload_parental_authorization.html:17 #: apps/registration/templates/registration/upload_parental_authorization.html:17
#: apps/registration/templates/registration/upload_photo_authorization.html:18 #: apps/registration/templates/registration/upload_photo_authorization.html:18
@ -663,57 +648,57 @@ msgstr "Notes de synthèse :"
msgid "No synthesis was uploaded yet." msgid "No synthesis was uploaded yet."
msgstr "Aucune note de synthèse n'a encore été envoyée." msgstr "Aucune note de synthèse n'a encore été envoyée."
#: apps/participation/templates/participation/passage_detail.html:47 #: apps/participation/templates/participation/passage_detail.html:46
#: apps/participation/templates/participation/passage_detail.html:110 #: apps/participation/templates/participation/passage_detail.html:107
msgid "Update notes" msgid "Update notes"
msgstr "Modifier les notes" msgstr "Modifier les notes"
#: apps/participation/templates/participation/passage_detail.html:53 #: apps/participation/templates/participation/passage_detail.html:51
#: apps/participation/templates/participation/passage_detail.html:116 #: apps/participation/templates/participation/passage_detail.html:112
msgid "Upload synthesis" msgid "Upload synthesis"
msgstr "Envoyer une note de synthèse" msgstr "Envoyer une note de synthèse"
#: apps/participation/templates/participation/passage_detail.html:61 #: apps/participation/templates/participation/passage_detail.html:59
msgid "Notes detail" msgid "Notes detail"
msgstr "Détails des notes" msgstr "Détails des notes"
#: apps/participation/templates/participation/passage_detail.html:68 #: apps/participation/templates/participation/passage_detail.html:66
msgid "Average points for the defender writing:" msgid "Average points for the defender writing:"
msgstr "Moyenne de l'écrit du défenseur :" msgstr "Moyenne de l'écrit du défenseur :"
#: apps/participation/templates/participation/passage_detail.html:71 #: apps/participation/templates/participation/passage_detail.html:69
msgid "Average points for the defender oral:" msgid "Average points for the defender oral:"
msgstr "Moyenne de l'oral du défenseur :" msgstr "Moyenne de l'oral du défenseur :"
#: apps/participation/templates/participation/passage_detail.html:74 #: apps/participation/templates/participation/passage_detail.html:72
msgid "Average points for the opponent writing:" msgid "Average points for the opponent writing:"
msgstr "Moyenne de l'écrit de l'opposant :" msgstr "Moyenne de l'écrit de l'opposant :"
#: apps/participation/templates/participation/passage_detail.html:77 #: apps/participation/templates/participation/passage_detail.html:75
msgid "Average points for the opponent oral:" msgid "Average points for the opponent oral:"
msgstr "Moyenne de l'oral de l'opposant :" msgstr "Moyenne de l'oral de l'opposant :"
#: apps/participation/templates/participation/passage_detail.html:80 #: apps/participation/templates/participation/passage_detail.html:78
msgid "Average points for the reporter writing:" msgid "Average points for the reporter writing:"
msgstr "Moyenne de l'écrit du rapporteur :" msgstr "Moyenne de l'écrit du rapporteur :"
#: apps/participation/templates/participation/passage_detail.html:83 #: apps/participation/templates/participation/passage_detail.html:81
msgid "Average points for the reporter oral:" msgid "Average points for the reporter oral:"
msgstr "Moyenne de l'oral du rapporteur :" msgstr "Moyenne de l'oral du rapporteur :"
#: apps/participation/templates/participation/passage_detail.html:90 #: apps/participation/templates/participation/passage_detail.html:88
msgid "Defender points:" msgid "Defender points:"
msgstr "Points du défenseur :" msgstr "Points du défenseur :"
#: apps/participation/templates/participation/passage_detail.html:93 #: apps/participation/templates/participation/passage_detail.html:91
msgid "Opponent points:" msgid "Opponent points:"
msgstr "Points de l'opposant :" msgstr "Points de l'opposant :"
#: apps/participation/templates/participation/passage_detail.html:96 #: apps/participation/templates/participation/passage_detail.html:94
msgid "Reporter points:" msgid "Reporter points:"
msgstr "Points du rapporteur :" msgstr "Points du rapporteur :"
#: apps/participation/templates/participation/passage_detail.html:104 #: apps/participation/templates/participation/passage_detail.html:102
#: apps/participation/templates/participation/passage_form.html:11 #: apps/participation/templates/participation/passage_form.html:11
msgid "Update passage" msgid "Update passage"
msgstr "Modifier le passage" msgstr "Modifier le passage"
@ -1003,10 +988,6 @@ msgstr "Ajouter un tournoi"
msgid "Back to the team detail" msgid "Back to the team detail"
msgstr "Retour aux détails de l'utilisateur" msgstr "Retour aux détails de l'utilisateur"
#: apps/participation/templates/participation/upload_synthesis.html:9
msgid "Templates:"
msgstr "Modèles :"
#: apps/participation/views.py:43 tfjm/templates/base.html:74 #: apps/participation/views.py:43 tfjm/templates/base.html:74
#: tfjm/templates/base.html:233 #: tfjm/templates/base.html:233
msgid "Create team" msgid "Create team"
@ -1113,11 +1094,11 @@ msgstr "L'équipe n'est pas encore validée."
msgid "Participation of team {trigram}" msgid "Participation of team {trigram}"
msgstr "Participation de l'équipe {trigram}" msgstr "Participation de l'équipe {trigram}"
#: apps/participation/views.py:579 #: apps/participation/views.py:578
msgid "You can't upload a solution after the deadline." msgid "You can't upload a solution after the deadline."
msgstr "Vous ne pouvez pas envoyer de solution après la date limite." msgstr "Vous ne pouvez pas envoyer de solution après la date limite."
#: apps/participation/views.py:765 #: apps/participation/views.py:759
msgid "You can't upload a synthesis after the deadline." 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." msgstr "Vous ne pouvez pas envoyer de note de synthèse après la date limite."