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

« back to all changes in this revision

Viewing changes to examples/db/sample.sql

  • Committer: Matt Giuca
  • Date: 2010-02-04 05:32:04 UTC
  • Revision ID: matt.giuca@gmail.com-20100204053204-oqp66c3o3eqngusw
Sample database: Added a sample worksheet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
-- Name: assessed_assessedid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
15
15
--
16
16
 
17
 
SELECT pg_catalog.setval('assessed_assessedid_seq', 1, false);
 
17
SELECT pg_catalog.setval('assessed_assessedid_seq', 1, true);
18
18
 
19
19
 
20
20
--
119
119
-- Name: worksheet_exercise_ws_ex_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
120
120
--
121
121
 
122
 
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 1, false);
 
122
SELECT pg_catalog.setval('worksheet_exercise_ws_ex_id_seq', 1, true);
123
123
 
124
124
 
125
125
--
126
126
-- Name: worksheet_worksheetid_seq; Type: SEQUENCE SET; Schema: public; Owner: -
127
127
--
128
128
 
129
 
SELECT pg_catalog.setval('worksheet_worksheetid_seq', 1, false);
 
129
SELECT pg_catalog.setval('worksheet_worksheetid_seq', 1, true);
130
130
 
131
131
 
132
132
--
135
135
 
136
136
ALTER TABLE assessed DISABLE TRIGGER ALL;
137
137
 
 
138
INSERT INTO assessed (assessedid, loginid, groupid, projectid) VALUES (1, 2, NULL, 1);
138
139
 
139
140
 
140
141
ALTER TABLE assessed ENABLE TRIGGER ALL;
422
423
 
423
424
ALTER TABLE worksheet DISABLE TRIGGER ALL;
424
425
 
 
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.
 
427
 
 
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".
 
429
 
 
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".
 
431
 
 
432
Beginning a line with ``.. exercise:: <exercise-name>`` embeds an exercise in a worksheet, like this:
 
433
 
 
434
.. exercise:: factorial
 
435
 
 
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');
425
437
 
426
438
 
427
439
ALTER TABLE worksheet ENABLE TRIGGER ALL;
432
444
 
433
445
ALTER TABLE worksheet_exercise DISABLE TRIGGER ALL;
434
446
 
 
447
INSERT INTO worksheet_exercise (ws_ex_id, worksheetid, exerciseid, seq_no, active, optional) VALUES (1, 1, 'factorial', 0, true, false);
435
448
 
436
449
 
437
450
ALTER TABLE worksheet_exercise ENABLE TRIGGER ALL;