2 # Table structure for table assignment
5 CREATE TABLE prefix_assignment (
7 course integer NOT NULL default '0',
8 name varchar(255) NOT NULL default '',
9 description text NOT NULL default '',
10 format integer NOT NULL default '0',
11 assignmenttype varchar(50) NOT NULL default '',
12 resubmit integer NOT NULL default '0',
13 preventlate integer NOT NULL default '0',
14 emailteachers integer NOT NULL default '0',
15 var1 integer default '0',
16 var2 integer default '0',
17 var3 integer default '0',
18 var4 integer default '0',
19 var5 integer default '0',
20 maxbytes integer NOT NULL default '100000',
21 timedue integer NOT NULL default '0',
22 timeavailable integer NOT NULL default '0',
23 grade integer NOT NULL default '0',
24 timemodified integer NOT NULL default '0'
27 CREATE INDEX prefix_assignment_course_idx ON prefix_assignment (course);
29 # --------------------------------------------------------
32 # Table structure for table assignment_submissions
35 CREATE TABLE prefix_assignment_submissions (
36 id SERIAL PRIMARY KEY,
37 assignment integer NOT NULL default '0',
38 userid integer NOT NULL default '0',
39 timecreated integer NOT NULL default '0',
40 timemodified integer NOT NULL default '0',
41 numfiles integer NOT NULL default '0',
42 data1 text NOT NULL default '',
43 data2 text NOT NULL default '',
44 grade integer NOT NULL default '0',
45 submissioncomment text NOT NULL default '',
46 format integer NOT NULL default '0',
47 teacher integer NOT NULL default '0',
48 timemarked integer NOT NULL default '0',
49 mailed integer NOT NULL default '0'
52 CREATE INDEX prefix_assignment_submissions_assignment_idx ON prefix_assignment_submissions (assignment);
53 CREATE INDEX prefix_assignment_submissions_userid_idx ON prefix_assignment_submissions (userid);
54 CREATE INDEX prefix_assignment_submissions_mailed_idx ON prefix_assignment_submissions (mailed);
55 CREATE INDEX prefix_assignment_submissions_timemarked_idx ON prefix_assignment_submissions (timemarked);
58 # --------------------------------------------------------
61 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view', 'assignment', 'name');
62 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'add', 'assignment', 'name');
63 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'update', 'assignment', 'name');
64 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view submission', 'assignment', 'name');
65 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'upload', 'assignment', 'name');