|
1 | 1 | BEGIN; |
2 | 2 |
|
3 | 3 | -- Configure which challenge instances should be displayed to users at which point in time. |
| 4 | +-- Note that times are generally UTC. |
4 | 5 | -- You can pass a single string argument to challenges by appending it in parentheses. |
5 | 6 | DELETE FROM challenges; |
6 | 7 | INSERT INTO challenges (cid, team, t_start, t_stop) VALUES |
7 | 8 | -- expired |
8 | | - ('Attendance(01.01.2018)', 0, datetime('2018-01-01 00:00:00'), datetime('2018-01-01 14:00:00')), |
| 9 | + ('Basic(Example Challenge (expired))', 0, datetime('2000-01-01 00:00:00'), datetime('2011-01-01 11:11:00+01:00')), |
9 | 10 | -- solved |
10 | | - ('Attendance(05.01.2018)', 0, datetime('2018-01-05 00:00:00'), datetime('2018-01-05 14:00:00')), |
| 11 | + ('Basic(Example Challenge (solved))', 0, datetime('now'), datetime('now','+1 month')), |
11 | 12 | -- active |
12 | | - ('Attendance(' || date('now') || ')', 0, datetime('now'), datetime('now','+1 day')), |
| 13 | + ('Basic(Example Challenge (active))', 0, datetime('now'), datetime('now','+1 month')), |
13 | 14 | -- still invisible |
14 | | - ('Attendance(01.01.2042)', 0, datetime('2042-01-01 00:00:00'), datetime('2042-01-01 14:00:00')), |
| 15 | + ('Basic(Example Challenge (appears in the future))', 0, datetime('2042-01-01 00:00:00'), datetime('2042-01-01 14:00:00')), |
15 | 16 | -- Other examples |
16 | 17 | ('TcpServer', 1, datetime('now'), datetime('now','+1 month')), |
17 | 18 | ('WebServer', 1, datetime('now'), datetime('now','+1 month')), |
@@ -40,19 +41,19 @@ INSERT INTO teams (tid, uid) VALUES |
40 | 41 |
|
41 | 42 | -- |
42 | 43 | -- |
43 | | --- The SQL statements only serve to illustrate the r8 UI. |
| 44 | +-- The SQL statements below only serve to illustrate the r8 UI. |
44 | 45 | -- In a production deployment, we would COMMIT; here and be done. |
45 | 46 | -- |
46 | 47 | -- |
47 | 48 |
|
48 | 49 | DELETE FROM flags; |
49 | 50 | INSERT INTO flags (fid, cid, max_submissions) VALUES |
50 | 51 | -- easy to memorize flags for testing. |
51 | | - ('expired', 'Attendance(01.01.2018)', 999999), |
52 | | - ('da', 'Attendance(' || date('now') || ')', 999999), |
53 | | - ('limited', 'Attendance(' || date('now') || ')', 0), |
54 | | - ('future', 'Attendance(01.01.2042)', 999999), |
55 | | - ('solved', 'Attendance(05.01.2018)', 1) |
| 52 | + ('expired', 'Basic(Example Challenge (expired))', 999999), |
| 53 | + ('active', 'Basic(Example Challenge (active))', 999999), |
| 54 | + ('limited', 'Basic(Example Challenge (active))', 0), |
| 55 | + ('future', 'Basic(Example Challenge (appears in the future))', 999999), |
| 56 | + ('solved', 'Basic(Example Challenge (solved))', 1) |
56 | 57 | ; |
57 | 58 |
|
58 | 59 | DELETE FROM events; |
|
0 commit comments