92
91
-- Name: suite_variable_varid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
95
SELECT pg_catalog.setval('suite_variable_varid_seq', 1, false);
94
SELECT pg_catalog.setval('suite_variable_varid_seq', 2, true);
99
98
-- Name: test_case_part_partid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
102
SELECT pg_catalog.setval('test_case_part_partid_seq', 1, false);
101
SELECT pg_catalog.setval('test_case_part_partid_seq', 10, true);
106
105
-- Name: test_case_testid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
109
SELECT pg_catalog.setval('test_case_testid_seq', 1, false);
108
SELECT pg_catalog.setval('test_case_testid_seq', 10, true);
113
112
-- Name: test_suite_suiteid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
116
SELECT pg_catalog.setval('test_suite_suiteid_seq', 1, false);
115
SELECT pg_catalog.setval('test_suite_suiteid_seq', 5, true);
120
119
-- Name: worksheet_exercise_ws_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
123
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 1, false);
122
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 2, true);
127
126
-- Name: worksheet_worksheetid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
130
SELECT pg_catalog.setval('worksheet_worksheetid_seq', 1, false);
136
SET SESSION AUTHORIZATION DEFAULT;
138
ALTER TABLE login DISABLE TRIGGER ALL;
140
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);
141
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);
142
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (3, 'studenta', '5f4dcc3b5aa765d61d8327deb882cf99', 'enabled', false, 5002, 'Alice Student', NULL, NULL, '2009-12-08 12:11:46.349133', 'password', NULL, 'Alice Student', NULL, NULL);
143
INSERT INTO login (loginid, login, passhash, state, admin, unixid, nick, pass_exp, acct_exp, last_login, svn_pass, email, fullname, studentid, settings) VALUES (4, 'studentb', '5f4dcc3b5aa765d61d8327deb882cf99', 'no_agreement', false, 5003, 'Bob Student', NULL, NULL, NULL, NULL, NULL, 'Bob Student', NULL, NULL);
146
ALTER TABLE login ENABLE TRIGGER ALL;
151
ALTER TABLE semester DISABLE TRIGGER ALL;
153
INSERT INTO semester (semesterid, year, semester, state) VALUES (1, '2009', '1', 'past');
154
INSERT INTO semester (semesterid, year, semester, state) VALUES (2, '2009', '2', 'current');
155
INSERT INTO semester (semesterid, year, semester, state) VALUES (3, '2010', '1', 'future');
156
INSERT INTO semester (semesterid, year, semester, state) VALUES (4, '2010', '2', 'future');
159
ALTER TABLE semester ENABLE TRIGGER ALL;
164
ALTER TABLE subject DISABLE TRIGGER ALL;
166
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');
167
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');
168
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');
169
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');
172
ALTER TABLE subject ENABLE TRIGGER ALL;
177
ALTER TABLE offering DISABLE TRIGGER ALL;
179
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (1, 1, 1, 'none');
180
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (2, 2, 2, 'none');
181
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (3, 1, 3, 'none');
182
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (4, 3, 3, 'none');
183
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (5, 2, 4, 'none');
184
INSERT INTO offering (offeringid, subject, semesterid, groups_student_permissions) VALUES (6, 4, 4, 'none');
187
ALTER TABLE offering ENABLE TRIGGER ALL;
192
ALTER TABLE project_set DISABLE TRIGGER ALL;
196
ALTER TABLE project_set ENABLE TRIGGER ALL;
201
ALTER TABLE project DISABLE TRIGGER ALL;
205
ALTER TABLE project ENABLE TRIGGER ALL;
210
ALTER TABLE project_group DISABLE TRIGGER ALL;
214
ALTER TABLE project_group ENABLE TRIGGER ALL;
129
SELECT pg_catalog.setval('worksheet_worksheetid_seq', 1, true);
217
133
-- Data for Name: assessed; Type: TABLE DATA; Schema: public; Owner: -
239
149
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);
240
150
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);
241
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (3, 1, 'student', NULL, NULL, NULL, NULL, NULL, true);
242
INSERT INTO enrolment (loginid, offeringid, role, result, special_result, supp_result, special_supp_result, notes, active) VALUES (3, 2, 'student', NULL, NULL, NULL, NULL, NULL, true);
151
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);
152
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);
243
153
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);
154
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);
246
157
ALTER TABLE enrolment ENABLE TRIGGER ALL;
312
230
ALTER TABLE group_member DISABLE TRIGGER ALL;
232
INSERT INTO group_member (loginid, groupid) VALUES (4, 1);
233
INSERT INTO group_member (loginid, groupid) VALUES (5, 1);
316
236
ALTER TABLE group_member ENABLE TRIGGER ALL;
239
-- Data for Name: login; Type: TABLE DATA; Schema: public; Owner: -
242
ALTER TABLE login DISABLE TRIGGER ALL;
244
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);
245
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);
246
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);
247
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);
248
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);
251
ALTER TABLE login ENABLE TRIGGER ALL;
254
-- Data for Name: offering; Type: TABLE DATA; Schema: public; Owner: -
257
ALTER TABLE offering DISABLE TRIGGER ALL;
259
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, groups_student_permissions) VALUES (1, 1, 1, 'This subject will introduce you to the basics of IVLE.', 'http://www.ivle.org/example/101', false, NULL, 'none');
260
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, 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', false, NULL, 'none');
261
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, groups_student_permissions) VALUES (3, 1, 3, 'This subject will introduce you to the basics of IVLE, again.', 'http://www.ivle.org/example/101', false, NULL, 'none');
262
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, 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', false, NULL, 'none');
263
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, 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', false, NULL, 'none');
264
INSERT INTO offering (offeringid, subject, semesterid, description, url, show_worksheet_marks, worksheet_cutoff, 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', false, NULL, 'none');
267
ALTER TABLE offering ENABLE TRIGGER ALL;
270
-- Data for Name: project; Type: TABLE DATA; Schema: public; Owner: -
273
ALTER TABLE project DISABLE TRIGGER ALL;
275
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, '3009-08-21 18:00:00');
276
INSERT INTO project (projectid, short_name, name, synopsis, url, projectsetid, deadline) VALUES (2, 'phase2', 'Phase 2', 'This is the second project in Intermediate IVLE.
277
Get into groups of 3.', NULL, 2, '3009-09-11 18:00:00');
278
INSERT INTO project (projectid, short_name, name, synopsis, url, projectsetid, deadline) VALUES (3, 'phase3', 'Phase 3', 'This is the final project in Intermediate IVLE.
279
Complete this with the same group as Phase 2.', NULL, 2, '2009-09-25 18:00:00');
282
ALTER TABLE project ENABLE TRIGGER ALL;
319
285
-- Data for Name: project_extension; Type: TABLE DATA; Schema: public; Owner: -
346
335
ALTER TABLE project_submission ENABLE TRIGGER ALL;
351
ALTER TABLE test_suite DISABLE TRIGGER ALL;
355
ALTER TABLE test_suite ENABLE TRIGGER ALL;
338
-- Data for Name: semester; Type: TABLE DATA; Schema: public; Owner: -
341
ALTER TABLE semester DISABLE TRIGGER ALL;
343
INSERT INTO semester (semesterid, year, url_name, state, display_name, code) VALUES (1, '2009', '1', 'past', 'semester 1', 'SM1');
344
INSERT INTO semester (semesterid, year, url_name, state, display_name, code) VALUES (2, '2009', '2', 'current', 'semester 2', 'SM2');
345
INSERT INTO semester (semesterid, year, url_name, state, display_name, code) VALUES (3, '2010', '1', 'future', 'semester 1', 'SM1');
346
INSERT INTO semester (semesterid, year, url_name, state, display_name, code) VALUES (4, '2010', '2', 'future', 'semester 2', 'SM2');
349
ALTER TABLE semester ENABLE TRIGGER ALL;
352
-- Data for Name: subject; Type: TABLE DATA; Schema: public; Owner: -
355
ALTER TABLE subject DISABLE TRIGGER ALL;
357
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name) VALUES (1, '100101', 'Introduction to IVLE', 'ivle-101');
358
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name) VALUES (2, '100102', 'Intermediate IVLE', 'ivle-102');
359
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name) VALUES (3, '100201', 'Advanced IVLE', 'ivle-201');
360
INSERT INTO subject (subjectid, subj_code, subj_name, subj_short_name) VALUES (4, '100202', 'Mastering IVLE', 'ivle-202');
363
ALTER TABLE subject ENABLE TRIGGER ALL;
358
366
-- Data for Name: suite_variable; Type: TABLE DATA; Schema: public; Owner: -
372
381
ALTER TABLE test_case DISABLE TRIGGER ALL;
383
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (1, 1, 'Calculates factorial correctly', 'Wrong answer', 'ignore', 0);
384
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);
385
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (3, 2, 'Calculates factorial correctly', 'Wrong answer', 'ignore', 0);
386
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);
387
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);
388
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);
389
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (7, 4, 'Prints the correct words', 'Didn''t print the words "Hello world" at all', 'ignore', 0);
390
INSERT INTO test_case (testid, suiteid, passmsg, failmsg, test_default, seq_no) VALUES (10, 4, 'Prints "Hello, world!" exactly', 'Did not print "Hello, world!" exactly', 'ignore', 1);
376
393
ALTER TABLE test_case ENABLE TRIGGER ALL;
382
399
ALTER TABLE test_case_part DISABLE TRIGGER ALL;
401
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (1, 1, 'result', 'match', '', NULL);
402
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);
403
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (3, 3, 'result', 'match', '', NULL);
404
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);
405
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);
406
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);
407
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (10, 10, 'stdout', 'match', 'lambda solution, attempt: re.match("hello[^a-z]*world[^a-z]*", attempt.lower())', NULL);
408
INSERT INTO test_case_part (partid, testid, part_type, test_type, data, filename) VALUES (7, 7, 'stdout', 'check', 'lambda solution, attempt: re.match("hello[^a-z]*world[^a-z]*", attempt.lower())', NULL);
386
411
ALTER TABLE test_case_part ENABLE TRIGGER ALL;
414
-- Data for Name: test_suite; Type: TABLE DATA; Schema: public; Owner: -
417
ALTER TABLE test_suite DISABLE TRIGGER ALL;
419
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (2, 'factorial', 'Test fac(5)', 1, 'fac', '');
420
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (1, 'factorial', 'Test fac(4)', 0, 'fac', '');
421
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (3, 'factorial', 'Test main', 2, 'main', '4
423
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (4, 'hello', 'Prints "Hello, world!" exactly', 0, '', '');
426
ALTER TABLE test_suite ENABLE TRIGGER ALL;
429
-- Data for Name: worksheet; Type: TABLE DATA; Schema: public; Owner: -
432
ALTER TABLE worksheet DISABLE TRIGGER ALL;
434
INSERT INTO worksheet (worksheetid, offeringid, identifier, name, data, data_xhtml_cache, assessable, published, seq_no, format) VALUES (1, 2, 'worksheet1', 'Worksheet Basics', 'IVLE allows lecturers and tutors to create worksheets, which are presented to students, optionally, for assessment.
436
Worksheets are reStructuredText (rich text) documents which can present students with information or tutorials, much like a textbook. For example, we might explain that "the ``print`` statement in Python lets you print text to the screen".
438
We can use any reStructuredText markup, such as **bold** and `links <http://ivle.org>`_. We can also embed exercises. For example, we might invite students to "try out the ``print`` statement in the following exercise".
440
Beginning a line with ``.. exercise:: <exercise-name>`` embeds an exercise in a worksheet, like this:
444
Now, the student may try out the above exercise, and submit it as many times as (s)he wishes. Once they have it correct, they will receive a point on their assessment.
446
Here is a second exercise. This one involves writing functions, and has multiple parts. The test suite will test each part individually.
448
.. exercise:: factorial
449
', NULL, true, true, 0, 'rst');
452
ALTER TABLE worksheet ENABLE TRIGGER ALL;
455
-- Data for Name: worksheet_exercise; Type: TABLE DATA; Schema: public; Owner: -
458
ALTER TABLE worksheet_exercise DISABLE TRIGGER ALL;
460
INSERT INTO worksheet_exercise (ws_ex_id, worksheetid, exerciseid, seq_no, active, optional) VALUES (2, 1, 'hello', 0, true, false);
461
INSERT INTO worksheet_exercise (ws_ex_id, worksheetid, exerciseid, seq_no, active, optional) VALUES (1, 1, 'factorial', 0, true, false);
464
ALTER TABLE worksheet_exercise ENABLE TRIGGER ALL;
389
467
-- PostgreSQL database dump complete