Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
Odevzdávací Systém MO
Commits
8d03aba2
Commit
8d03aba2
authored
4 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
DB: Přidána zadání a změněna sémantika časového omezení submitu
parent
4f677798
Branches
Branches containing commit
No related tags found
1 merge request
!9
WIP: Zárodek uživatelské části webu a submitování
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
db/db.ddl
+8
-5
8 additions, 5 deletions
db/db.ddl
mo/db.py
+2
-1
2 additions, 1 deletion
mo/db.py
with
10 additions
and
6 deletions
db/db.ddl
+
8
−
5
View file @
8d03aba2
...
...
@@ -73,10 +73,12 @@ CREATE TABLE schools (
CREATE TYPE round_state AS ENUM (
'preparing', -- v přípravě (viditelné pouze organizátorům)
'running', -- je možno odevzdávat
(za daných časových omezeních)
'running', -- je možno odevzdávat
'grading', -- je možno opravovat a vyplňovat body
'closed' -- uzavřeno, není dovoleno nic měnit, zveřejněny výsledky
-- garanta stavy neomezují, vždycky může všechno
-- Garanta stavy neomezují, vždycky může všechno.
-- Ve stavu "running" mohou odevzdávat účastníci i dozor, a to i po termínu,
-- jen se odevzdaná řešení zobrazují jako opožděná.
);
CREATE TABLE rounds (
...
...
@@ -87,9 +89,10 @@ CREATE TABLE rounds (
level int NOT NULL, -- úroveň hierarchie míst
name varchar(255) NOT NULL, -- zobrazované jméno ("Krajské kolo" apod.)
state round_state NOT NULL DEFAULT 'preparing', -- stav kola
submit_start timestamp with time zone DEFAULT NULL, -- od kdy se smí odevzdávat
ct_submit_end timestamp with time zone DEFAULT NULL, -- do kdy mohou odevzdávat účastníci
pr_submit_end timestamp with time zone DEFAULT NULL, -- do kdy může odevzdávat dozor
tasks_file varchar(255) DEFAULT NULL, -- jméno souboru se zadáním úloh
ct_tasks_start timestamp with time zone DEFAULT NULL, -- od kdy účastníci vidí zadání
ct_submit_end timestamp with time zone DEFAULT NULL, -- do kdy účastníci mohou regulérně odevzdávat
pr_submit_end timestamp with time zone DEFAULT NULL, -- do kdy dozor může regulérně odevzdávat
UNIQUE (year, category, seq)
);
...
...
This diff is collapsed.
Click to expand it.
mo/db.py
+
2
−
1
View file @
8d03aba2
...
...
@@ -178,7 +178,8 @@ class Round(Base):
level
=
Column
(
Integer
,
nullable
=
False
)
name
=
Column
(
String
(
255
),
nullable
=
False
)
state
=
Column
(
Enum
(
RoundState
,
name
=
'
round_state
'
),
nullable
=
False
,
server_default
=
text
(
"'
preparing
'
::round_state
"
))
submit_start
=
Column
(
DateTime
(
True
))
tasks_file
=
Column
(
String
(
255
))
ct_tasks_start
=
Column
(
DateTime
(
True
))
ct_submit_end
=
Column
(
DateTime
(
True
))
pr_submit_end
=
Column
(
DateTime
(
True
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment