Skip to content

Commit

Permalink
models/contest: clarify rate_all behaviour
Browse files Browse the repository at this point in the history
Rate all is confusingly named, since it really means "rate even users
who don't submit". In my opinion, this should have been the default, but
instead we can simply fix the description.
  • Loading branch information
Riolku committed Aug 29, 2024
1 parent 7cb7486 commit c181ab9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions judge/migrations/0148_clarify_rate_all_desc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('judge', '0147_judge_add_tiers'),
]

operations = [
migrations.AlterField(
model_name='contest',
name='rate_all',
field=models.BooleanField(default=False, help_text='Rate users even if they make no submissions.', verbose_name='rate all'),
),
]
4 changes: 3 additions & 1 deletion judge/models/contest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ class Contest(models.Model):
rating_ceiling = models.IntegerField(verbose_name=_('rating ceiling'),
help_text=_('Do not rate users who have a higher rating.'),
null=True, blank=True)
rate_all = models.BooleanField(verbose_name=_('rate all'), help_text=_('Rate all users who joined.'), default=False)
rate_all = models.BooleanField(verbose_name=_('rate all'),
help_text=_('Rate users even if they make no submissions.'),
default=False)
rate_exclude = models.ManyToManyField(Profile, verbose_name=_('exclude from ratings'), blank=True,
related_name='rate_exclude+')
is_private = models.BooleanField(verbose_name=_('private to specific users'), default=False)
Expand Down

0 comments on commit c181ab9

Please sign in to comment.