98
98
-- Name: test_case_part_partid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
101
SELECT pg_catalog.setval('test_case_part_partid_seq', 10, true);
101
SELECT pg_catalog.setval('test_case_part_partid_seq', 6, true);
105
105
-- Name: test_case_testid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
108
SELECT pg_catalog.setval('test_case_testid_seq', 10, true);
108
SELECT pg_catalog.setval('test_case_testid_seq', 6, true);
112
112
-- Name: test_suite_suiteid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
115
SELECT pg_catalog.setval('test_suite_suiteid_seq', 5, true);
115
SELECT pg_catalog.setval('test_suite_suiteid_seq', 3, true);
119
119
-- Name: worksheet_exercise_ws_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
122
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 2, true);
122
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 1, true);
257
254
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');
256
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');
257
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');
258
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');
259
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');
260
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');
261
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');
267
264
ALTER TABLE offering ENABLE TRIGGER ALL;
341
338
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');
340
INSERT INTO semester (semesterid, year, semester, state) VALUES (1, '2009', '1', 'past');
341
INSERT INTO semester (semesterid, year, semester, state) VALUES (2, '2009', '2', 'current');
342
INSERT INTO semester (semesterid, year, semester, state) VALUES (3, '2010', '1', 'future');
343
INSERT INTO semester (semesterid, year, semester, state) VALUES (4, '2010', '2', 'future');
349
346
ALTER TABLE semester ENABLE TRIGGER ALL;
386
383
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
384
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
385
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);
393
388
ALTER TABLE test_case ENABLE TRIGGER ALL;
404
399
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
400
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
401
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);
411
404
ALTER TABLE test_case_part ENABLE TRIGGER ALL;
420
413
INSERT INTO test_suite (suiteid, exerciseid, description, seq_no, function, stdin) VALUES (1, 'factorial', 'Test fac(4)', 0, 'fac', '');
421
414
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
418
ALTER TABLE test_suite ENABLE TRIGGER ALL;
432
424
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');
426
INSERT INTO worksheet (worksheetid, offeringid, identifier, name, data, assessable, 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.
428
Worksheets are reStructuredText (rich text) documents which can present students with information or tutorials, much like a textbook. For example, we might explain that "recursion is when a function calls itself".
430
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 recursion in the following exercise".
432
Beginning a line with ``.. exercise:: <exercise-name>`` embeds an exercise in a worksheet, like this:
434
.. exercise:: factorial
436
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.', true, 0, 'rst');
452
439
ALTER TABLE worksheet ENABLE TRIGGER ALL;