change contest testcases visibility

This commit is contained in:
cuom1999 2020-04-10 01:30:19 -05:00
parent 5aa9af5013
commit b73bc7ad4d
30 changed files with 21449 additions and 23000 deletions

View file

@ -0,0 +1,28 @@
# Generated by Django 2.2.9 on 2020-04-10 06:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('judge', '0103_fix_custom_validator'),
]
operations = [
migrations.AlterField(
model_name='contestproblem',
name='output_prefix_override',
field=models.IntegerField(blank=True, default=0, null=True, verbose_name='visible testcases'),
),
migrations.AlterField(
model_name='problemdata',
name='checker',
field=models.CharField(blank=True, choices=[('standard', 'Standard'), ('floats', 'Floats'), ('floatsabs', 'Floats (absolute)'), ('floatsrel', 'Floats (relative)'), ('rstripped', 'Non-trailing spaces'), ('sorted', 'Unordered'), ('identical', 'Byte identical'), ('linecount', 'Line-by-line'), ('custom', 'Custom checker (PY)'), ('customval', 'Custom validator (CPP)')], max_length=10, verbose_name='checker'),
),
migrations.AlterField(
model_name='problemtestcase',
name='checker',
field=models.CharField(blank=True, choices=[('standard', 'Standard'), ('floats', 'Floats'), ('floatsabs', 'Floats (absolute)'), ('floatsrel', 'Floats (relative)'), ('rstripped', 'Non-trailing spaces'), ('sorted', 'Unordered'), ('identical', 'Byte identical'), ('linecount', 'Line-by-line'), ('custom', 'Custom checker (PY)'), ('customval', 'Custom validator (CPP)')], max_length=10, verbose_name='checker'),
),
]

View file

@ -347,7 +347,8 @@ class ContestProblem(models.Model):
partial = models.BooleanField(default=True, verbose_name=_('partial'))
is_pretested = models.BooleanField(default=False, verbose_name=_('is pretested'))
order = models.PositiveIntegerField(db_index=True, verbose_name=_('order'))
output_prefix_override = models.IntegerField(verbose_name=_('output prefix length override'), null=True, blank=True)
output_prefix_override = models.IntegerField(help_text=_('0 to not show testcases, 1 to show'),
verbose_name=_('visible testcases'), null=True, blank=True, default=0)
max_submissions = models.IntegerField(help_text=_('Maximum number of submissions for this problem, '
'or 0 for no limit.'), default=0,
validators=[MinValueValidator(0, _('Why include a problem you '