mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 17:02:24 +00:00
Use a custom BBB url link, that is not necessary on visio.animath.live
This commit is contained in:
parent
c06ae694cd
commit
ea9d7cdd50
@ -158,7 +158,7 @@ class SolutionForm(forms.ModelForm):
|
||||
class PoolForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Pool
|
||||
fields = ('tournament', 'round', 'bbb_code', 'juries',)
|
||||
fields = ('tournament', 'round', 'bbb_url', 'juries',)
|
||||
widgets = {
|
||||
"juries": forms.CheckboxSelectMultiple,
|
||||
}
|
||||
|
@ -323,7 +323,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=f"https://visio.animath.live/b/{pool.bbb_code}",
|
||||
url_params = urlencode(dict(url=pool.bbb_url,
|
||||
isAudioConf='false', displayName='$matrix_display_name',
|
||||
avatarUrl='$matrix_avatar_url', userId='$matrix_user_id')) \
|
||||
.replace("%24", "$")
|
||||
|
22
apps/participation/migrations/0004_auto_20210122_1827.py
Normal file
22
apps/participation/migrations/0004_auto_20210122_1827.py
Normal file
@ -0,0 +1,22 @@
|
||||
# Generated by Django 3.0.11 on 2021-01-22 17:27
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('participation', '0003_team_motivation_letter'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='pool',
|
||||
name='bbb_code',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='pool',
|
||||
name='bbb_url',
|
||||
field=models.CharField(blank=True, default='', help_text='The link of the BBB visio for this pool.', max_length=255, verbose_name='BigBlueButton URL'),
|
||||
),
|
||||
]
|
@ -355,19 +355,14 @@ class Pool(models.Model):
|
||||
verbose_name=_("juries"),
|
||||
)
|
||||
|
||||
bbb_code = models.CharField(
|
||||
max_length=11,
|
||||
bbb_url = models.CharField(
|
||||
max_length=255,
|
||||
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}")],
|
||||
verbose_name=_("BigBlueButton URL"),
|
||||
help_text=_("The link of the BBB visio for this pool."),
|
||||
)
|
||||
|
||||
@property
|
||||
def bbb_url(self):
|
||||
return f"https://visio.animath.live/b/{self.bbb_code}"
|
||||
|
||||
@property
|
||||
def solutions(self):
|
||||
return Solution.objects.filter(participation__in=self.participations, final_solution=self.tournament.final)
|
||||
|
Loading…
Reference in New Issue
Block a user