~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to examples/db/sample.sql

  • Committer: David Coles
  • Date: 2010-07-28 10:45:53 UTC
  • mfrom: (1829 trunk)
  • mto: This revision was merged to the branch mainline in revision 1830.
  • Revision ID: coles.david@gmail.com-20100728104553-5z3nxt0l6kyfqfh5
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
 
163
163
ALTER TABLE exercise DISABLE TRIGGER ALL;
164
164
 
165
 
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
INSERT INTO exercise (identifier, name, description, description_xhtml_cache, partial, solution, include, num_rows) VALUES ('factorial', 'Factorial', 'Write a function, `fac`, to compute the **factorial** of a number. e.g.::
166
166
 
167
167
    >>> fac(4)
168
168
    24
172
172
    >>> main()
173
173
    4
174
174
    24
175
 
', 'def fac(n):
 
175
', NULL, 'def fac(n):
176
176
    pass
177
177
 
178
178
def main():
186
186
def main():
187
187
    f = int(raw_input())
188
188
    print fac(f)', '', 12);
189
 
INSERT INTO exercise (identifier, name, description, partial, solution, include, num_rows) VALUES ('hello', 'Hello world', 'Write a program which prints out "Hello, world!" when it is run.
 
189
INSERT INTO exercise (identifier, name, description, description_xhtml_cache, partial, solution, include, num_rows) VALUES ('hello', 'Hello world', 'Write a program which prints out "Hello, world!" when it is run.
190
190
 
191
 
Note that if you print anything with the words "Hello world", but with wrong punctuation and capitalization, you will get some positive feedback, but still fail overall. You need to print an exact match.', 'print "..."', 'print "Hello, world!"', 'import re', 4);
 
191
Note that if you print anything with the words "Hello world", but with wrong punctuation and capitalization, you will get some positive feedback, but still fail overall. You need to print an exact match.', NULL, 'print "..."', 'print "Hello, world!"', 'import re', 4);
192
192
 
193
193
 
194
194
ALTER TABLE exercise ENABLE TRIGGER ALL;
256
256
 
257
257
ALTER TABLE offering DISABLE TRIGGER ALL;
258
258
 
259
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) VALUES (1, 1, 1, 'This subject will introduce you to the basics of IVLE.', 'http://www.ivle.org/example/101', 'none', false, NULL);
260
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) 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', false, NULL);
261
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) VALUES (3, 1, 3, 'This subject will introduce you to the basics of IVLE, again.', 'http://www.ivle.org/example/101', 'none', false, NULL);
262
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) VALUES (4, 3, 3, 'This subject will provide you with a working knowledge of advanced IVLE concepts.', 'http://www.ivle.org/example/201', 'none', false, NULL);
263
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) 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', false, NULL);
264
 
INSERT INTO offering (offeringid, subject, semesterid, description, url, groups_student_permissions, show_worksheet_marks, worksheet_cutoff) VALUES (6, 4, 4, 'After undertaking this subject, you should be a master of all things IVLEy.', 'http://www.ivle.org/example/202', 'none', false, NULL);
 
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');
265
265
 
266
266
 
267
267
ALTER TABLE offering ENABLE TRIGGER ALL;
340
340
 
341
341
ALTER TABLE semester DISABLE TRIGGER ALL;
342
342
 
343
 
INSERT INTO semester (semesterid, year, semester, state) VALUES (1, '2009', '1', 'past');
344
 
INSERT INTO semester (semesterid, year, semester, state) VALUES (2, '2009', '2', 'current');
345
 
INSERT INTO semester (semesterid, year, semester, state) VALUES (3, '2010', '1', 'future');
346
 
INSERT INTO semester (semesterid, year, semester, state) VALUES (4, '2010', '2', 'future');
 
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');
347
347
 
348
348
 
349
349
ALTER TABLE semester ENABLE TRIGGER ALL;
431
431
 
432
432
ALTER TABLE worksheet DISABLE TRIGGER ALL;
433
433
 
434
 
INSERT INTO worksheet (worksheetid, offeringid, identifier, name, data, assessable, seq_no, format, published) VALUES (1, 2, 'worksheet1', 'Worksheet Basics', 'IVLE allows lecturers and tutors to create worksheets, which are presented to students, optionally, for assessment.
 
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.
435
435
 
436
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".
437
437
 
446
446
Here is a second exercise. This one involves writing functions, and has multiple parts. The test suite will test each part individually.
447
447
 
448
448
.. exercise:: factorial
449
 
', true, 0, 'rst', true);
 
449
', NULL, true, true, 0, 'rst');
450
450
 
451
451
 
452
452
ALTER TABLE worksheet ENABLE TRIGGER ALL;