1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-24 18:22:24 +00:00

Store the BBB link in the Pool model

This commit is contained in:
Yohann D'ANELLO 2021-01-21 17:55:20 +01:00
parent 56ad352e64
commit 35042f077f
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
5 changed files with 87 additions and 50 deletions

View File

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

View File

@ -321,7 +321,7 @@ class Command(BaseCommand):
Matrix.set_room_avatar(f"#poule-{slug}-{pool.id}:tfjm.org", avatar_uri)
Matrix.set_room_avatar(f"#poule-{slug}-{pool.id}-jurys:tfjm.org", avatar_uri)
url_params = urlencode(dict(url="https://visio.animath.live/b/XXX-XXX-XXX",
url_params = urlencode(dict(url=f"https://visio.animath.live/b/{pool.bbb_code}",
isAudioConf='false', displayName='$matrix_display_name',
avatarUrl='$matrix_avatar_url', userId='$matrix_user_id')) \
.replace("%24", "$")

View File

@ -0,0 +1,19 @@
# Generated by Django 3.0.11 on 2021-01-21 16:47
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('participation', '0011_note'),
]
operations = [
migrations.AddField(
model_name='pool',
name='bbb_code',
field=models.CharField(blank=True, default='', help_text='The code of the form xxx-xxx-xxx at the end of the BBB link.', max_length=11, validators=[django.core.validators.RegexValidator('[a-z]{3}-[a-z]{3}-[a-z]{3}')], verbose_name='BigBlueButton code'),
),
]

View File

@ -344,6 +344,15 @@ class Pool(models.Model):
verbose_name=_("juries"),
)
bbb_code = models.CharField(
max_length=11,
blank=True,
default="",
verbose_name=_("BigBlueButton code"),
help_text=_("The code of the form xxx-xxx-xxx at the end of the BBB link."),
validators=[RegexValidator("[a-z]{3}-[a-z]{3}-[a-z]{3}")],
)
@property
def solutions(self):
return Solution.objects.filter(participation__in=self.participations, final_solution=self.tournament.final)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-19 00:29+0100\n"
"POT-Creation-Date: 2021-01-21 17:46+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Yohann D'ANELLO <yohann.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -120,26 +120,32 @@ msgstr "Je m'engage à participer à l'intégralité du TFJM²."
msgid "Message to address to the team:"
msgstr "Message à adresser à l'équipe :"
#: apps/participation/forms.py:123
#: apps/participation/forms.py:124
msgid "The uploaded file size must be under 5 Mo."
msgstr "Le fichier envoyé doit peser moins de 5 Mo."
#: apps/participation/forms.py:125
#: apps/participation/forms.py:126 apps/participation/forms.py:189
msgid "The uploaded file must be a PDF file."
msgstr "Le fichier envoyé doit être au format PDF."
#: apps/participation/forms.py:129
#: apps/participation/forms.py:130
msgid "The PDF file must not have more than 30 pages."
msgstr "Le fichier PDF ne doit pas avoir plus de 30 pages."
#: apps/participation/forms.py:169
#: apps/participation/forms.py:170
msgid "The defender, the opponent and the reporter must be different."
msgstr "Le défenseur, l'opposant et le rapporteur doivent être différents."
#: apps/participation/forms.py:173
#: apps/participation/forms.py:174
msgid "This defender did not work on this problem."
msgstr "Ce défenseur ne travaille pas sur ce problème."
#: apps/participation/forms.py:187 apps/registration/forms.py:116
#: apps/registration/forms.py:138 apps/registration/forms.py:160
#: apps/registration/forms.py:214
msgid "The uploaded file size must be under 2 Mo."
msgstr "Le fichier envoyé doit peser moins de 2 Mo."
#: apps/participation/models.py:30 apps/participation/models.py:121
#: apps/participation/tables.py:17 apps/participation/tables.py:34
msgid "name"
@ -179,7 +185,7 @@ msgstr "début"
msgid "end"
msgstr "fin"
#: apps/participation/models.py:136 apps/participation/models.py:377
#: apps/participation/models.py:136 apps/participation/models.py:386
#: apps/participation/templates/participation/tournament_detail.html:18
msgid "place"
msgstr "lieu"
@ -257,8 +263,8 @@ msgstr "L'équipe est sélectionnée pour la finale."
msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})"
#: apps/participation/models.py:315 apps/participation/models.py:499
#: apps/participation/models.py:537
#: apps/participation/models.py:315 apps/participation/models.py:508
#: apps/participation/models.py:546
msgid "participation"
msgstr "participation"
@ -279,140 +285,148 @@ msgstr "Tour {round}"
msgid "juries"
msgstr "jurys"
#: apps/participation/models.py:358
#: apps/participation/models.py:352
msgid "BigBlueButton code"
msgstr "Code BigBlueButton"
#: apps/participation/models.py:353
msgid "The code of the form xxx-xxx-xxx at the end of the BBB link."
msgstr "Le code de la forme xxx-xxx-xxx à la fin du lien BBB."
#: apps/participation/models.py:367
#, python-brace-format
msgid "Pool {round} for tournament {tournament} with teams {teams}"
msgstr "Poule {round} du tournoi {tournament} avec les équipes {teams}"
#: apps/participation/models.py:364 apps/participation/models.py:372
#: apps/participation/models.py:373 apps/participation/models.py:381
msgid "pool"
msgstr "poule"
#: apps/participation/models.py:365
#: apps/participation/models.py:374
msgid "pools"
msgstr "poules"
#: apps/participation/models.py:379
#: apps/participation/models.py:388
msgid "Where the solution is presented?"
msgstr "Où est-ce que les solutions sont défendues ?"
#: apps/participation/models.py:384
#: apps/participation/models.py:393
msgid "defended solution"
msgstr "solution défendue"
#: apps/participation/models.py:386 apps/participation/models.py:506
#: apps/participation/models.py:395 apps/participation/models.py:515
#, python-brace-format
msgid "Problem #{problem}"
msgstr "Problème n°{problem}"
#: apps/participation/models.py:393 apps/participation/tables.py:105
#: apps/participation/models.py:402 apps/participation/tables.py:105
msgid "defender"
msgstr "défenseur"
#: apps/participation/models.py:400 apps/participation/models.py:549
#: apps/participation/models.py:409 apps/participation/models.py:558
msgid "opponent"
msgstr "opposant"
#: apps/participation/models.py:407 apps/participation/models.py:550
#: apps/participation/models.py:416 apps/participation/models.py:559
msgid "reporter"
msgstr "rapporteur"
#: apps/participation/models.py:467 apps/participation/models.py:470
#: apps/participation/models.py:473
#: apps/participation/models.py:476 apps/participation/models.py:479
#: apps/participation/models.py:482
#, python-brace-format
msgid "Team {trigram} is not registered in the pool."
msgstr "L'équipe {trigram} n'est pas inscrite dans la poule."
#: apps/participation/models.py:478
#: apps/participation/models.py:487
#, python-brace-format
msgid "Passage of {defender} for problem {problem}"
msgstr "Passage de {defender} pour le problème {problem}"
#: apps/participation/models.py:482 apps/participation/models.py:544
#: apps/participation/models.py:582
#: apps/participation/models.py:491 apps/participation/models.py:553
#: apps/participation/models.py:591
msgid "passage"
msgstr "passage"
#: apps/participation/models.py:483
#: apps/participation/models.py:492
msgid "passages"
msgstr "passages"
#: apps/participation/models.py:504
#: apps/participation/models.py:513
msgid "problem"
msgstr "numéro de problème"
#: apps/participation/models.py:511
#: apps/participation/models.py:520
msgid "solution for the final tournament"
msgstr "solution pour la finale"
#: apps/participation/models.py:516 apps/participation/models.py:555
#: apps/participation/models.py:525 apps/participation/models.py:564
msgid "file"
msgstr "fichier"
#: apps/participation/models.py:524
#: apps/participation/models.py:533
#, python-brace-format
msgid "Solution of team {team} for problem {problem}"
msgstr "Solution de l'équipe {team} pour le problème {problem}"
#: apps/participation/models.py:528
#: apps/participation/models.py:537
msgid "solution"
msgstr "solution"
#: apps/participation/models.py:529
#: apps/participation/models.py:538
msgid "solutions"
msgstr "solutions"
#: apps/participation/models.py:563
#: apps/participation/models.py:572
#, python-brace-format
msgid "Synthesis for the {type} of the {passage}"
msgstr "Synthèse pour {type} du {passage}"
#: apps/participation/models.py:566
#: apps/participation/models.py:575
msgid "synthesis"
msgstr "note de synthèse"
#: apps/participation/models.py:567
#: apps/participation/models.py:576
msgid "syntheses"
msgstr "notes de synthèse"
#: apps/participation/models.py:575
#: apps/participation/models.py:584
msgid "jury"
msgstr "jury"
#: apps/participation/models.py:587
#: apps/participation/models.py:596
msgid "defender writing note"
msgstr "note d'écrit du défenseur"
#: apps/participation/models.py:593
#: apps/participation/models.py:602
msgid "defender oral note"
msgstr "note d'oral du défenseur"
#: apps/participation/models.py:599
#: apps/participation/models.py:608
msgid "opponent writing note"
msgstr "note d'écrit de l'opposant"
#: apps/participation/models.py:605
#: apps/participation/models.py:614
msgid "opponent oral note"
msgstr "note d'oral de l'opposant"
#: apps/participation/models.py:611
#: apps/participation/models.py:620
msgid "reporter writing note"
msgstr "not d'écrit du rapporteur"
#: apps/participation/models.py:617
#: apps/participation/models.py:626
msgid "reporter oral note"
msgstr "note d'oral du rapporteur"
#: apps/participation/models.py:626
#: apps/participation/models.py:635
#, python-brace-format
msgid "Notes of {jury} for {passage}"
msgstr "Notes de {jury} pour le {passage}"
#: apps/participation/models.py:633
#: apps/participation/models.py:642
msgid "note"
msgstr "note"
#: apps/participation/models.py:634
#: apps/participation/models.py:643
msgid "notes"
msgstr "notes"
@ -1017,11 +1031,6 @@ msgstr "bénévole"
msgid "admin"
msgstr "admin"
#: apps/registration/forms.py:116 apps/registration/forms.py:138
#: apps/registration/forms.py:160 apps/registration/forms.py:214
msgid "The uploaded file size must be under 2 Mo."
msgstr "Le fichier envoyé doit peser moins de 2 Mo."
#: apps/registration/forms.py:118 apps/registration/forms.py:140
#: apps/registration/forms.py:162 apps/registration/forms.py:216
msgid "The uploaded file must be a PDF, PNG of JPEG file."