Fix bug
This commit is contained in:
parent
07d5ad2216
commit
6c1d0c7672
2 changed files with 3 additions and 7 deletions
|
@ -11,14 +11,13 @@ class abstractclassmethod(classmethod):
|
|||
|
||||
|
||||
class BaseContestFormat(metaclass=ABCMeta):
|
||||
has_hidden_subtasks = False
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self, contest, config):
|
||||
self.config = config
|
||||
self.contest = contest
|
||||
|
||||
# Use in ioi16 to display ranking with hidden subtasks
|
||||
self.has_hidden_subtasks = False
|
||||
|
||||
@abstractproperty
|
||||
def name(self):
|
||||
"""
|
||||
|
|
|
@ -10,14 +10,11 @@ from judge.timezone import from_database_time, to_database_time
|
|||
class NewIOIContestFormat(IOIContestFormat):
|
||||
name = gettext_lazy("New IOI")
|
||||
config_defaults = {"cumtime": False}
|
||||
has_hidden_subtasks = True
|
||||
"""
|
||||
cumtime: Specify True if time penalties are to be computed. Defaults to False.
|
||||
"""
|
||||
|
||||
def __init__(self, contest, config):
|
||||
super().__init__(contest, config)
|
||||
self.has_hidden_subtasks = True
|
||||
|
||||
def get_hidden_subtasks(self):
|
||||
queryset = self.contest.contest_problems.values_list("id", "hidden_subtasks")
|
||||
res = {}
|
||||
|
|
Loading…
Reference in a new issue