mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 18:22: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 PoolForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Pool
|
model = Pool
|
||||||
fields = ('tournament', 'round', 'bbb_code', 'juries',)
|
fields = ('tournament', 'round', 'bbb_url', 'juries',)
|
||||||
widgets = {
|
widgets = {
|
||||||
"juries": forms.CheckboxSelectMultiple,
|
"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}:tfjm.org", avatar_uri)
|
||||||
Matrix.set_room_avatar(f"#poule-{slug}-{pool.id}-jurys: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',
|
isAudioConf='false', displayName='$matrix_display_name',
|
||||||
avatarUrl='$matrix_avatar_url', userId='$matrix_user_id')) \
|
avatarUrl='$matrix_avatar_url', userId='$matrix_user_id')) \
|
||||||
.replace("%24", "$")
|
.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"),
|
verbose_name=_("juries"),
|
||||||
)
|
)
|
||||||
|
|
||||||
bbb_code = models.CharField(
|
bbb_url = models.CharField(
|
||||||
max_length=11,
|
max_length=255,
|
||||||
blank=True,
|
blank=True,
|
||||||
default="",
|
default="",
|
||||||
verbose_name=_("BigBlueButton code"),
|
verbose_name=_("BigBlueButton URL"),
|
||||||
help_text=_("The code of the form xxx-xxx-xxx at the end of the BBB link."),
|
help_text=_("The link of the BBB visio for this pool."),
|
||||||
validators=[RegexValidator("[a-z]{3}-[a-z]{3}-[a-z]{3}")],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def bbb_url(self):
|
|
||||||
return f"https://visio.animath.live/b/{self.bbb_code}"
|
|
||||||
|
|
||||||
@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)
|
||||||
|
Loading…
Reference in New Issue
Block a user