-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af66423
commit 9e8ef76
Showing
10 changed files
with
58 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,53 +79,19 @@ class ContextVenue(ContextNaboj): | |
'code': Regex(r'[A-Z]{5}'), | ||
'name': And(str, len), | ||
'language': valid_language, | ||
'teams': [ContextNaboj.team], | ||
'teams_grouped': [[ContextNaboj.team]], | ||
'problems_modulo': [[ContextNaboj.problem]], | ||
Optional('orgs'): [And(str, len)], | ||
'evaluators': int, | ||
'start': And(int, lambda x: 0 <= x < 1440), | ||
}) | ||
|
||
def _add_extra_teams(self, competition, venue): | ||
code = 0 | ||
while len(self.data['teams']) % competition.data['tearoff']['per_page'] != 0: | ||
self.data['teams'].append({ | ||
'id': 0, | ||
'code': f'SKBAS{999 - code}', | ||
'contact_email': "[email protected]", | ||
'contact_name': "Unnamed", | ||
'contact_phone': "", | ||
'contestants': "unknown", | ||
'display_name': f"Extra set {999 - code}", | ||
'in_school_symbol': None, | ||
'language': self.data['language'], | ||
'name': "", | ||
'number': 0, | ||
'school': f"Extra set {999 - code}", | ||
'school_address': "", | ||
'school_id': 0, | ||
'school_name': f"Extra set {999 - code}", | ||
'status': 'R', | ||
'venue': self.data['id'], | ||
'venue_code': self.data['code'], | ||
'venue_id': 0, | ||
#'venue_id': self.data['id'], # Currently there is a collision with venue.id from web!!! Fix later | ||
}) | ||
code += 1 | ||
|
||
def populate(self, competition, volume, venue): | ||
super().populate(competition) | ||
comp = ContextCompetition(self.root, competition) | ||
vol = ContextVolume(self.root, competition, volume) | ||
self.load_meta(competition, volume, venue) \ | ||
.add_id(venue) | ||
self._add_extra_teams(comp, vol) | ||
self.add( | ||
teams=lists.numerate(self.data.get('teams'), itertools.count(0)), | ||
teams_grouped=lists.split_div( | ||
lists.numerate(self.data.get('teams')), comp.data['tearoff']['per_page'] | ||
), | ||
problems_modulo=lists.split_mod( | ||
lists.add_numbers([x['id'] for x in vol.data['problems']], itertools.count(1)), | ||
self.data['evaluators'], first=1, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
(@ extends 'base-booklet.jtt' @) | ||
|
||
(@ block content @) | ||
\fancypagestyle{instructions}{% | ||
\pagestyle{naboj} | ||
\fancyhead[LE,RO]{\textit{(* i18n[language.id].instructions.title *)}} | ||
\fancyfoot[C]{} | ||
} | ||
\pagestyle{instructions} | ||
|
||
\section{(* i18n[language.id].instructions.title *)} | ||
\input{build/(* module.id *)/(* competition.id *)/(* volume.id *)/languages/(* language.id *)/evaluators.tex} | ||
(@ endblock @) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters