Source code for oioioi.scoresreveal.models
from django.db import models
from django.utils.translation import gettext_lazy as _
from oioioi.contests.models import ProblemInstance, Submission
[docs]class ScoreReveal(models.Model):
[docs] submission = models.OneToOneField(
Submission,
related_name='revealed',
verbose_name=_("submission"),
on_delete=models.CASCADE,
)
[docs]class ScoreRevealConfig(models.Model):
[docs] problem_instance = models.OneToOneField(
ProblemInstance,
verbose_name=_("problem instance"),
related_name='scores_reveal_config',
on_delete=models.CASCADE,
)
[docs] reveal_limit = models.IntegerField(
verbose_name=_("reveal limit"),
help_text=_("If empty, all submissions are revealed automatically."),
blank=True,
null=True,
)
[docs] disable_time = models.IntegerField(
blank=True, null=True, verbose_name=_("disable for last minutes of the round")
)