-
Notifications
You must be signed in to change notification settings - Fork 0
/
data3.sql
149 lines (117 loc) · 6.19 KB
/
data3.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
SET SEARCH_PATH TO markus;
-- If there is already any data in these tables, empty it out.
TRUNCATE TABLE Result CASCADE;
TRUNCATE TABLE Grade CASCADE;
TRUNCATE TABLE RubricItem CASCADE;
TRUNCATE TABLE Grader CASCADE;
TRUNCATE TABLE Submissions CASCADE;
TRUNCATE TABLE Membership CASCADE;
TRUNCATE TABLE AssignmentGroup CASCADE;
TRUNCATE TABLE Required CASCADE;
TRUNCATE TABLE Assignment CASCADE;
TRUNCATE TABLE MarkusUser CASCADE;
-- Now insert data from scratch.
INSERT INTO MarkusUser VALUES ('i1', 'iln1', 'ifn1', 'instructor');
INSERT INTO MarkusUser VALUES ('s1', 'sln1', 'sfn1', 'student');
INSERT INTO MarkusUser VALUES ('s2', 'sln2', 'sfn2', 'student');
INSERT INTO MarkusUser VALUES ('s3', 'sln3', 'sfn3', 'student');
INSERT INTO MarkusUser VALUES ('s4', 'sln4', 'sfn4', 'student');
INSERT INTO MarkusUser VALUES ('s5', 'sln5', 'sfn5', 'student');
INSERT INTO MarkusUser VALUES ('s6', 'sln6', 'sfn6', 'student');
INSERT INTO MarkusUser VALUES ('s7', 'sln7', 'sfn7', 'student');
INSERT INTO MarkusUser VALUES ('t1', 'tln1', 'tfn1', 'TA');
INSERT INTO MarkusUser VALUES ('t2', 'tln2', 'tfn2', 'TA');
INSERT INTO MarkusUser VALUES ('t3', 'tln3', 'tfn3', 'TA');
INSERT INTO Assignment VALUES (1000, 'A1', '2017-02-08 20:00', 1, 2);
INSERT INTO Assignment VALUES (1001, 'A2', '2017-02-19 20:00', 1, 3);
INSERT INTO Assignment VALUES (1002, 'A3', '2017-02-20 20:00', 1, 1);
INSERT INTO Assignment VALUES (1003, 'A4', '2017-02-20 20:00', 1, 2);
INSERT INTO Required VALUES (1000, 'A1.pdf');
INSERT INTO Required VALUES (1001, 'A2.pdf');
INSERT INTO Required VALUES (1002, 'A3.pdf');
INSERT INTO AssignmentGroup VALUES (2001, 1000, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2002, 1000, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2003, 1000, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2004, 1000, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2005, 1001, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2006, 1001, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2007, 1001, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2008, 1001, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2009, 1002, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2010, 1002, 'repo_url');
INSERT INTO AssignmentGroup VALUES (2011, 1002, 'repo_url');
--INSERT INTO AssignmentGroup VALUES (2010, 1002, 'repo_url');
INSERT INTO Membership VALUES ('s1', 2001);
INSERT INTO Membership VALUES ('s2', 2001);
INSERT INTO Membership VALUES ('s3', 2002);
--INSERT INTO Membership VALUES ('s4', 2002);
INSERT INTO Membership VALUES ('s5', 2003);
--INSERT INTO Membership VALUES ('s6', 2003);
INSERT INTO Membership VALUES ('s7', 2004);
INSERT INTO Membership VALUES ('s1', 2005);
INSERT INTO Membership VALUES ('s2', 2006);
INSERT INTO Membership VALUES ('s3', 2007);
INSERT INTO Membership VALUES ('s4', 2007);
INSERT INTO Membership VALUES ('s5', 2008);
INSERT INTO Membership VALUES ('s6', 2008);
INSERT INTO Membership VALUES ('s7', 2008);
INSERT INTO Membership VALUES ('s3', 2009);
--INSERT INTO Membership VALUES ('s5', 2010);
INSERT INTO Membership VALUES ('s6', 2011);
--INSERT INTO Membership VALUES ('s7', 2012);
INSERT INTO Submissions VALUES (3000, 'A1.pdf', 's1', 2001, '2017-02-07 19:59');
INSERT INTO Submissions VALUES (3001, 'A1.pdf', 's3', 2002, '2017-02-04 19:59');
INSERT INTO Submissions VALUES (3002, 'A1.pdf', 's5', 2003, '2017-02-07 19:59');
INSERT INTO Submissions VALUES (3003, 'A1.pdf', 's7', 2004, '2017-02-06 19:59');
INSERT INTO Submissions VALUES (3008, 'A1.pdf', 's1', 2001, '2017-02-08 19:59');
INSERT INTO Submissions VALUES (3009, 'A1.pdf', 's3', 2002, '2017-02-09 19:59');
INSERT INTO Submissions VALUES (3010, 'A1.pdf', 's6', 2003, '2017-02-01 19:59');
INSERT INTO Submissions VALUES (3011, 'A1.pdf', 's7', 2004, '2017-02-02 17:59');
INSERT INTO Submissions VALUES (3012, 'A1.pdf', 's1', 2001, '2017-02-07 1:59');
INSERT INTO Submissions VALUES (3013, 'A1.pdf', 's4', 2002, '2017-02-04 19:59');
INSERT INTO Submissions VALUES (3014, 'A1.pdf', 's5', 2003, '2017-02-01 19:59');
INSERT INTO Submissions VALUES (3015, 'A1.pdf', 's7', 2004, '2017-02-06 18:59');
INSERT INTO Submissions VALUES (3004, 'A2.pdf', 's1', 2005, '2017-02-18 19:59');
INSERT INTO Submissions VALUES (3005, 'A2.pdf', 's2', 2006, '2017-02-18 19:59');
INSERT INTO Submissions VALUES (3006, 'A2.pdf', 's4', 2007, '2017-02-17 19:59');
INSERT INTO Submissions VALUES (3007, 'A2.pdf', 's6', 2008, '2017-02-14 19:59');
INSERT INTO Submissions VALUES (3017, 'A2.pdf', 's3', 2007, '2017-02-14 19:59');
INSERT INTO Submissions VALUES (3016, 'A3.pdf', 's3', 2009, '2017-02-14 19:59');
INSERT INTO Grader VALUES (2001, 't1');
INSERT INTO Grader VALUES (2002, 't2');
INSERT INTO Grader VALUES (2003, 't3');
INSERT INTO Grader VALUES (2004, 't1');
INSERT INTO Grader VALUES (2005, 't3');
INSERT INTO Grader VALUES (2006, 't2');
INSERT INTO Grader VALUES (2007, 't3');
INSERT INTO Grader VALUES (2008, 't1');
INSERT INTO RubricItem VALUES (4000, 1000, 'style', 4, 0.25);
INSERT INTO RubricItem VALUES (4001, 1000, 'tester', 12, 0.75);
INSERT INTO RubricItem VALUES (4002, 1001, 'style', 4, 0.25);
INSERT INTO RubricItem VALUES (4003, 1001, 'tester', 10, 0.75);
INSERT INTO RubricItem VALUES (4004, 1002, 'tester', 10, 1);
INSERT INTO Grade VALUES (2001, 4000, 3);
INSERT INTO Grade VALUES (2001, 4001, 9);
INSERT INTO Grade VALUES (2002, 4000, 2);
INSERT INTO Grade VALUES (2002, 4001, 3);
INSERT INTO Grade VALUES (2003, 4000, 1);
INSERT INTO Grade VALUES (2003, 4001, 6);
--INSERT INTO Grade VALUES (2004, 4000, 4);
--INSERT INTO Grade VALUES (2004, 4001, 10);
INSERT INTO Grade VALUES (2005, 4002, 3);
INSERT INTO Grade VALUES (2005, 4003, 9);
--INSERT INTO Grade VALUES (2006, 4002, 2);
--INSERT INTO Grade VALUES (2006, 4003, 7);
INSERT INTO Grade VALUES (2007, 4002, 1);
INSERT INTO Grade VALUES (2007, 4003, 3);
INSERT INTO Grade VALUES (2008, 4002, 4);
INSERT INTO Grade VALUES (2008, 4003, 10);
INSERT INTO Result VALUES (2001, 7.5, false);
INSERT INTO Result VALUES (2002, 2.75, true);
INSERT INTO Result VALUES (2003, 4.75, false);
--INSERT INTO Result VALUES (2004, 8.5, true);
INSERT INTO Result VALUES (2005, 7.5, false);
--INSERT INTO Result VALUES (2006, 5.75, true);
INSERT INTO Result VALUES (2007, 2.5, true);
INSERT INTO Result VALUES (2008, 8.5, false);
INSERT INTO Result VALUES (2009, 5.5, false);