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