mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-10-31 03:29:52 +01:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			641e53e617
			...
			4c476a50ea
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 4c476a50ea | ||
|  | 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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user