1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
1 |
--
|
2 |
-- PostgreSQL database dump
|
|
3 |
--
|
|
4 |
||
5 |
SET statement_timeout = 0; |
|
6 |
SET client_encoding = 'UTF8'; |
|
7 |
SET standard_conforming_strings = off; |
|
8 |
SET check_function_bodies = false; |
|
9 |
SET client_min_messages = warning; |
|
10 |
SET escape_string_warning = off; |
|
11 |
||
12 |
SET search_path = public, pg_catalog; |
|
13 |
||
14 |
--
|
|
15 |
-- Name: assessed_assessedid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
16 |
--
|
|
17 |
||
18 |
SELECT pg_catalog.setval('assessed_assessedid_seq', 1, false); |
|
19 |
||
20 |
||
21 |
--
|
|
22 |
-- Name: login_unixid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
23 |
--
|
|
24 |
||
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
25 |
SELECT pg_catalog.setval('login_unixid_seq', 5004, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
26 |
|
27 |
||
28 |
--
|
|
29 |
-- Name: login_loginid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
30 |
--
|
|
31 |
||
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
32 |
SELECT pg_catalog.setval('login_loginid_seq', 5, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
33 |
|
34 |
||
35 |
--
|
|
36 |
-- Name: offering_offeringid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
37 |
--
|
|
38 |
||
39 |
SELECT pg_catalog.setval('offering_offeringid_seq', 6, true); |
|
40 |
||
41 |
||
42 |
--
|
|
43 |
-- Name: project_extension_extensionid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
44 |
--
|
|
45 |
||
46 |
SELECT pg_catalog.setval('project_extension_extensionid_seq', 1, false); |
|
47 |
||
48 |
||
49 |
--
|
|
50 |
-- Name: project_group_groupid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
51 |
--
|
|
52 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
53 |
SELECT pg_catalog.setval('project_group_groupid_seq', 1, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
54 |
|
55 |
||
56 |
--
|
|
57 |
-- Name: project_projectid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
58 |
--
|
|
59 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
60 |
SELECT pg_catalog.setval('project_projectid_seq', 3, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
61 |
|
62 |
||
63 |
--
|
|
64 |
-- Name: project_set_projectsetid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
65 |
--
|
|
66 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
67 |
SELECT pg_catalog.setval('project_set_projectsetid_seq', 2, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
68 |
|
69 |
||
70 |
--
|
|
71 |
-- Name: project_submission_submissionid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
72 |
--
|
|
73 |
||
74 |
SELECT pg_catalog.setval('project_submission_submissionid_seq', 1, false); |
|
75 |
||
76 |
||
77 |
--
|
|
78 |
-- Name: semester_semesterid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
79 |
--
|
|
80 |
||
81 |
SELECT pg_catalog.setval('semester_semesterid_seq', 4, true); |
|
82 |
||
83 |
||
84 |
--
|
|
85 |
-- Name: subject_subjectid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
86 |
--
|
|
87 |
||
88 |
SELECT pg_catalog.setval('subject_subjectid_seq', 4, true); |
|
89 |
||
90 |
||
91 |
--
|
|
92 |
-- Name: suite_variable_varid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
93 |
--
|
|
94 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
95 |
SELECT pg_catalog.setval('suite_variable_varid_seq', 2, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
96 |
|
97 |
||
98 |
--
|
|
99 |
-- Name: test_case_part_partid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
100 |
--
|
|
101 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
102 |
SELECT pg_catalog.setval('test_case_part_partid_seq', 6, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
103 |
|
104 |
||
105 |
--
|
|
106 |
-- Name: test_case_testid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
107 |
--
|
|
108 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
109 |
SELECT pg_catalog.setval('test_case_testid_seq', 6, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
110 |
|
111 |
||
112 |
--
|
|
113 |
-- Name: test_suite_suiteid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
114 |
--
|
|
115 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
116 |
SELECT pg_catalog.setval('test_suite_suiteid_seq', 3, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
117 |
|
118 |
||
119 |
--
|
|
120 |
-- Name: worksheet_exercise_ws_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
121 |
--
|
|
122 |
||
123 |
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 1, false); |
|
124 |
||
125 |
||
126 |
--
|
|
127 |
-- Name: worksheet_worksheetid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
|
|
128 |
--
|
|
129 |
||
130 |
SELECT pg_catalog.setval('worksheet_worksheetid_seq', 1, false); |
|
131 |
||
132 |
||
133 |
--
|
|
134 |
-- Data for Name: login; Type: TABLE DATA; Schema: public; Owner: -
|
|
135 |
--
|
|
136 |
||
137 |
SET SESSION AUTHORIZATION DEFAULT; |
|
138 |
||
139 |
ALTER TABLE login DISABLE TRIGGER ALL; |
|
140 |
||
141 |
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (1, 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'enabled', true, 5000, 'Anne Admin', NULL, NULL, '2009-12-08 11:44:02.285862', 'password', NULL, 'Anne Admin', NULL, NULL); |
|
142 |
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (2, 'lecturer', '5f4dcc3b5aa765d61d8327deb882cf99', 'enabled', false, 5001, 'Larry Lecturer', NULL, NULL, '2009-12-08 12:12:16.375628', 'password', NULL, 'Larry Lecturer', NULL, NULL); |
|
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
143 |
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (3, 'tutor', '5f4dcc3b5aa765d61d8327deb882cf99', 'enabled', false, 5002, 'Terry Tutor', NULL, NULL, '2009-12-08 19:08:59.817505', 'password', NULL, 'Terry Tutor', NULL, NULL); |
144 |
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (4, 'studenta', '5f4dcc3b5aa765d61d8327deb882cf99', 'enabled', false, 5003, 'Alice Student', NULL, NULL, '2009-12-08 12:11:46.349133', 'password', NULL, 'Alice Student', NULL, NULL); |
|
145 |
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (5, 'studentb', '5f4dcc3b5aa765d61d8327deb882cf99', 'no_agreement', false, 5004, 'Bob Student', NULL, NULL, NULL, NULL, NULL, 'Bob Student', NULL, NULL); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
146 |
|
147 |
||
148 |
ALTER TABLE login ENABLE TRIGGER ALL; |
|
149 |
||
150 |
--
|
|
151 |
-- Data for Name: semester; Type: TABLE DATA; Schema: public; Owner: -
|
|
152 |
--
|
|
153 |
||
154 |
ALTER TABLE semester DISABLE TRIGGER ALL; |
|
155 |
||
156 |
INSERT INTO semester (semesterid, year, semester, state) VALUES (1, '2009', '1', 'past'); |
|
157 |
INSERT INTO semester (semesterid, year, semester, state) VALUES (2, '2009', '2', 'current'); |
|
158 |
INSERT INTO semester (semesterid, year, semester, state) VALUES (3, '2010', '1', 'future'); |
|
159 |
INSERT INTO semester (semesterid, year, semester, state) VALUES (4, '2010', '2', 'future'); |
|
160 |
||
161 |
||
162 |
ALTER TABLE semester ENABLE TRIGGER ALL; |
|
163 |
||
164 |
--
|
|
165 |
-- Data for Name: subject; Type: TABLE DATA; Schema: public; Owner: -
|
|
166 |
--
|
|
167 |
||
168 |
ALTER TABLE subject DISABLE TRIGGER ALL; |
|
169 |
||
170 |
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name, url) VALUES (1, '100101', 'Introduction to IVLE', 'ivle-101', 'http://www.ivle.org/example/101'); |
|
171 |
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name, url) VALUES (2, '100102', 'Intermediate IVLE', 'ivle-102', 'http://www.ivle.org/example/102'); |
|
172 |
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name, url) VALUES (3, '100201', 'Advanced IVLE', 'ivle-201', 'http://www.ivle.org/example/201'); |
|
173 |
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name, url) VALUES (4, '100202', 'Mastering IVLE', 'ivle-202', 'http://www.ivle.org/example/202'); |
|
174 |
||
175 |
||
176 |
ALTER TABLE subject ENABLE TRIGGER ALL; |
|
177 |
||
178 |
--
|
|
179 |
-- Data for Name: offering; Type: TABLE DATA; Schema: public; Owner: -
|
|
180 |
--
|
|
181 |
||
182 |
ALTER TABLE offering DISABLE TRIGGER ALL; |
|
183 |
||
184 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (1, 1, 1, 'none'); |
|
185 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (2, 2, 2, 'none'); |
|
186 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (3, 1, 3, 'none'); |
|
187 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (4, 3, 3, 'none'); |
|
188 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (5, 2, 4, 'none'); |
|
189 |
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (6, 4, 4, 'none'); |
|
190 |
||
191 |
||
192 |
ALTER TABLE offering ENABLE TRIGGER ALL; |
|
193 |
||
194 |
--
|
|
195 |
-- Data for Name: project_set; Type: TABLE DATA; Schema: public; Owner: -
|
|
196 |
--
|
|
197 |
||
198 |
ALTER TABLE project_set DISABLE TRIGGER ALL; |
|
199 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
200 |
INSERT INTO project_set (projectsetid, offeringid, max_students_per_group) VALUES (1, 2, NULL); |
201 |
INSERT INTO project_set (projectsetid, offeringid, max_students_per_group) VALUES (2, 2, 3); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
202 |
|
203 |
||
204 |
ALTER TABLE project_set ENABLE TRIGGER ALL; |
|
205 |
||
206 |
--
|
|
207 |
-- Data for Name: project; Type: TABLE DATA; Schema: public; Owner: -
|
|
208 |
--
|
|
209 |
||
210 |
ALTER TABLE project DISABLE TRIGGER ALL; |
|
211 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
212 |
INSERT INTO project (projectid, short_name, name, synopsis, url, projectsetid, deadline) VALUES (1, 'phase1', 'Phase 1', 'This is the first project in Intermediate IVLE.', NULL, 1, '2009-08-21 18:00:00'); |
213 |
INSERT INTO project (projectid, short_name, name, synopsis, url, projectsetid, deadline) VALUES (2, 'phase2', 'Phase 2', 'This is the second project in Intermediate IVLE. |
|
214 |
Get into groups of 3.', NULL, 2, '2009-09-11 18:00:00'); |
|
215 |
INSERT INTO project (projectid, short_name, name, synopsis, url, projectsetid, deadline) VALUES (3, 'phase3', 'Phase 3', 'This is the final project in Intermediate IVLE. |
|
216 |
Complete this with the same group as Phase 2.', NULL, 2, '2009-09-25 18:00:00'); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
217 |
|
218 |
||
219 |
ALTER TABLE project ENABLE TRIGGER ALL; |
|
220 |
||
221 |
--
|
|
222 |
-- Data for Name: project_group; Type: TABLE DATA; Schema: public; Owner: -
|
|
223 |
--
|
|
224 |
||
225 |
ALTER TABLE project_group DISABLE TRIGGER ALL; |
|
226 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
227 |
INSERT INTO project_group (groupnm, groupid, projectsetid, nick, createdby, epoch) VALUES ('group1', 1, 2, 'group1', 2, '2009-12-08 17:04:42.981005'); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
228 |
|
229 |
||
230 |
ALTER TABLE project_group ENABLE TRIGGER ALL; |
|
231 |
||
232 |
--
|
|
233 |
-- Data for Name: assessed; Type: TABLE DATA; Schema: public; Owner: -
|
|
234 |
--
|
|
235 |
||
236 |
ALTER TABLE assessed DISABLE TRIGGER ALL; |
|
237 |
||
238 |
||
239 |
||
240 |
ALTER TABLE assessed ENABLE TRIGGER ALL; |
|
241 |
||
242 |
--
|
|
243 |
-- Data for Name: enrolment; Type: TABLE DATA; Schema: public; Owner: -
|
|
244 |
--
|
|
245 |
||
246 |
ALTER TABLE enrolment DISABLE TRIGGER ALL; |
|
247 |
||
248 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (2, 1, 'lecturer', NULL, NULL, NULL, NULL, NULL, true); |
|
249 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (2, 2, 'lecturer', NULL, NULL, NULL, NULL, NULL, true); |
|
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
250 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (3, 2, 'tutor', NULL, NULL, NULL, NULL, NULL, true); |
251 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (4, 1, 'student', NULL, NULL, NULL, NULL, NULL, true); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
252 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (4, 2, 'student', NULL, NULL, NULL, NULL, NULL, true); |
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
253 |
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (5, 2, 'student', NULL, NULL, NULL, NULL, NULL, true); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
254 |
|
255 |
||
256 |
ALTER TABLE enrolment ENABLE TRIGGER ALL; |
|
257 |
||
258 |
--
|
|
259 |
-- Data for Name: exercise; Type: TABLE DATA; Schema: public; Owner: -
|
|
260 |
--
|
|
261 |
||
262 |
ALTER TABLE exercise DISABLE TRIGGER ALL; |
|
263 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
264 |
INSERT INTO exercise (identifier, name, description, partial, solution, include, num_rows) VALUES ('factorial', 'Factorial', 'Write a function, `fac`, to compute the **factorial** of a number. e.g.:: |
265 |
||
266 |
>>> fac(4)
|
|
267 |
24
|
|
268 |
||
269 |
Then, write a function `main`, which reads a number from stdin, and writes its factorial to stdout. e.g.::
|
|
270 |
||
271 |
>>> main()
|
|
272 |
4
|
|
273 |
24
|
|
274 |
', 'def fac(n): |
|
275 |
pass
|
|
276 |
||
277 |
def main():
|
|
278 |
pass
|
|
279 |
', 'def fac(n): |
|
280 |
if n == 0:
|
|
281 |
return 1
|
|
282 |
else:
|
|
283 |
return n * fac(n-1)
|
|
284 |
||
285 |
def main():
|
|
286 |
f = int(raw_input())
|
|
287 |
print fac(f)', '', 12); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
288 |
|
289 |
||
290 |
ALTER TABLE exercise ENABLE TRIGGER ALL; |
|
291 |
||
292 |
--
|
|
293 |
-- Data for Name: worksheet; Type: TABLE DATA; Schema: public; Owner: -
|
|
294 |
--
|
|
295 |
||
296 |
ALTER TABLE worksheet DISABLE TRIGGER ALL; |
|
297 |
||
298 |
||
299 |
||
300 |
ALTER TABLE worksheet ENABLE TRIGGER ALL; |
|
301 |
||
302 |
--
|
|
303 |
-- Data for Name: worksheet_exercise; Type: TABLE DATA; Schema: public; Owner: -
|
|
304 |
--
|
|
305 |
||
306 |
ALTER TABLE worksheet_exercise DISABLE TRIGGER ALL; |
|
307 |
||
308 |
||
309 |
||
310 |
ALTER TABLE worksheet_exercise ENABLE TRIGGER ALL; |
|
311 |
||
312 |
--
|
|
313 |
-- Data for Name: exercise_attempt; Type: TABLE DATA; Schema: public; Owner: -
|
|
314 |
--
|
|
315 |
||
316 |
ALTER TABLE exercise_attempt DISABLE TRIGGER ALL; |
|
317 |
||
318 |
||
319 |
||
320 |
ALTER TABLE exercise_attempt ENABLE TRIGGER ALL; |
|
321 |
||
322 |
--
|
|
323 |
-- Data for Name: exercise_save; Type: TABLE DATA; Schema: public; Owner: -
|
|
324 |
--
|
|
325 |
||
326 |
ALTER TABLE exercise_save DISABLE TRIGGER ALL; |
|
327 |
||
328 |
||
329 |
||
330 |
ALTER TABLE exercise_save ENABLE TRIGGER ALL; |
|
331 |
||
332 |
--
|
|
333 |
-- Data for Name: group_invitation; Type: TABLE DATA; Schema: public; Owner: -
|
|
334 |
--
|
|
335 |
||
336 |
ALTER TABLE group_invitation DISABLE TRIGGER ALL; |
|
337 |
||
338 |
||
339 |
||
340 |
ALTER TABLE group_invitation ENABLE TRIGGER ALL; |
|
341 |
||
342 |
--
|
|
343 |
-- Data for Name: group_member; Type: TABLE DATA; Schema: public; Owner: -
|
|
344 |
--
|
|
345 |
||
346 |
ALTER TABLE group_member DISABLE TRIGGER ALL; |
|
347 |
||
1369
by Matt Giuca
Sample data: Added project sets, projects, groups and members. |
348 |
INSERT INTO group_member (loginid, groupid) VALUES (4, 1); |
1380
by Matt Giuca
Sample data: Added a new user, Terry Tutor, enrolled as a tutor in one of the subject, to test tutor permissions as distinct from lecturer permissions. |
349 |
INSERT INTO group_member (loginid, groupid) VALUES (5, 1); |
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
350 |
|
351 |
||
352 |
ALTER TABLE group_member ENABLE TRIGGER ALL; |
|
353 |
||
354 |
--
|
|
355 |
-- Data for Name: project_extension; Type: TABLE DATA; Schema: public; Owner: -
|
|
356 |
--
|
|
357 |
||
358 |
ALTER TABLE project_extension DISABLE TRIGGER ALL; |
|
359 |
||
360 |
||
361 |
||
362 |
ALTER TABLE project_extension ENABLE TRIGGER ALL; |
|
363 |
||
364 |
--
|
|
365 |
-- Data for Name: project_mark; Type: TABLE DATA; Schema: public; Owner: -
|
|
366 |
--
|
|
367 |
||
368 |
ALTER TABLE project_mark DISABLE TRIGGER ALL; |
|
369 |
||
370 |
||
371 |
||
372 |
ALTER TABLE project_mark ENABLE TRIGGER ALL; |
|
373 |
||
374 |
--
|
|
375 |
-- Data for Name: project_submission; Type: TABLE DATA; Schema: public; Owner: -
|
|
376 |
--
|
|
377 |
||
378 |
ALTER TABLE project_submission DISABLE TRIGGER ALL; |
|
379 |
||
380 |
||
381 |
||
382 |
ALTER TABLE project_submission ENABLE TRIGGER ALL; |
|
383 |
||
384 |
--
|
|
385 |
-- Data for Name: test_suite; Type: TABLE DATA; Schema: public; Owner: -
|
|
386 |
--
|
|
387 |
||
388 |
ALTER TABLE test_suite DISABLE TRIGGER ALL; |
|
389 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
390 |
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (2, 'factorial', 'Test fac(5)', 1, 'fac', ''); |
391 |
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (1, 'factorial', 'Test fac(4)', 0, 'fac', ''); |
|
392 |
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (3, 'factorial', 'Test main', 2, 'main', '4 |
|
393 |
'); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
394 |
|
395 |
||
396 |
ALTER TABLE test_suite ENABLE TRIGGER ALL; |
|
397 |
||
398 |
--
|
|
399 |
-- Data for Name: suite_variable; Type: TABLE DATA; Schema: public; Owner: -
|
|
400 |
--
|
|
401 |
||
402 |
ALTER TABLE suite_variable DISABLE TRIGGER ALL; |
|
403 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
404 |
INSERT INTO suite_variable (varid, suiteid, var_name, var_value, var_type, arg_no) VALUES (1, 1, '', '4', 'arg', 0); |
405 |
INSERT INTO suite_variable (varid, suiteid, var_name, var_value, var_type, arg_no) VALUES (2, 2, '', '5', 'arg', 0); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
406 |
|
407 |
||
408 |
ALTER TABLE suite_variable ENABLE TRIGGER ALL; |
|
409 |
||
410 |
--
|
|
411 |
-- Data for Name: test_case; Type: TABLE DATA; Schema: public; Owner: -
|
|
412 |
--
|
|
413 |
||
414 |
ALTER TABLE test_case DISABLE TRIGGER ALL; |
|
415 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
416 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (1, 1, 'Calculates factorial correctly', 'Wrong answer', 'ignore', 0); |
417 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (2, 1, 'Doesn''t use functools', 'You used functools, you arrogant git', 'ignore', 1); |
|
418 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (3, 2, 'Calculates factorial correctly', 'Wrong answer', 'ignore', 0); |
|
419 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (5, 3, 'Main worked correctly', 'Main printed something else as well. You should only print out the answer.', 'ignore', 1); |
|
420 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (4, 3, 'Main printout included the correct answer', 'Main didn''t print out the correct answer', 'ignore', 0); |
|
421 |
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (6, 1, 'Doesn''t use __import__', 'You used __import__, you subversive git!', 'ignore', 2); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
422 |
|
423 |
||
424 |
ALTER TABLE test_case ENABLE TRIGGER ALL; |
|
425 |
||
426 |
--
|
|
427 |
-- Data for Name: test_case_part; Type: TABLE DATA; Schema: public; Owner: -
|
|
428 |
--
|
|
429 |
||
430 |
ALTER TABLE test_case_part DISABLE TRIGGER ALL; |
|
431 |
||
1436
by Matt Giuca
Sample data: Added an exercise which demonstrates exercises, test suites, test cases and test case parts. |
432 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (1, 1, 'result', 'match', '', NULL); |
433 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (2, 2, 'code', 'check', 'lambda solution, attempt: ''functools'' not in attempt', NULL); |
|
434 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (3, 3, 'result', 'match', '', NULL); |
|
435 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (5, 5, 'stdout', 'norm', 'lambda x: x.strip() # Allow leading or trailing whitespace', NULL); |
|
436 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (4, 4, 'stdout', 'check', 'lambda solution, attempt: solution.strip() in attempt # Substring test', NULL); |
|
437 |
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (6, 6, 'code', 'check', 'lambda solution, attempt: ''__import__'' not in attempt', NULL); |
|
1349
by Matt Giuca
Added sample data infrastructure, with a little bit of sample data. The sample data is in examples/db/sample.sql. Documentation in doc/man/sample.rst details the infrastructure for importing and exporting sample data. |
438 |
|
439 |
||
440 |
ALTER TABLE test_case_part ENABLE TRIGGER ALL; |
|
441 |
||
442 |
--
|
|
443 |
-- PostgreSQL database dump complete
|
|
444 |
--
|
|
445 |