2 # Table structure for table `assignment`
5 CREATE TABLE `prefix_assignment` (
6 `id` int(10) unsigned NOT NULL auto_increment,
7 `course` int(10) unsigned NOT NULL default '0',
8 `name` varchar(255) NOT NULL default '',
9 `description` text NOT NULL default '',
10 `format` tinyint(4) unsigned NOT NULL default '0',
11 `assignmenttype` varchar(50) NOT NULL default '',
12 `resubmit` tinyint(2) unsigned NOT NULL default '0',
13 `preventlate` tinyint(2) unsigned NOT NULL default '0',
14 `emailteachers` tinyint(2) unsigned NOT NULL default '0',
15 `var1` int(10) default '0',
16 `var2` int(10) default '0',
17 `var3` int(10) default '0',
18 `var4` int(10) default '0',
19 `var5` int(10) default '0',
20 `maxbytes` int(10) unsigned NOT NULL default '100000',
21 `timedue` int(10) unsigned NOT NULL default '0',
22 `timeavailable` int(10) unsigned NOT NULL default '0',
23 `grade` int(10) NOT NULL default '0',
24 `timemodified` int(10) unsigned NOT NULL default '0',
26 KEY `course` (`course`)
27 ) COMMENT='Defines assignments';
28 # --------------------------------------------------------
31 # Table structure for table `assignment_submissions`
34 CREATE TABLE `prefix_assignment_submissions` (
35 `id` int(10) unsigned NOT NULL auto_increment,
36 `assignment` int(10) unsigned NOT NULL default '0',
37 `userid` int(10) unsigned NOT NULL default '0',
38 `timecreated` int(10) unsigned NOT NULL default '0',
39 `timemodified` int(10) unsigned NOT NULL default '0',
40 `numfiles` int(10) unsigned NOT NULL default '0',
41 `data1` text NOT NULL default '',
42 `data2` text NOT NULL default '',
43 `grade` int(11) NOT NULL default '0',
44 `submissioncomment` text NOT NULL default '',
45 `format` tinyint(4) unsigned NOT NULL default '0',
46 `teacher` int(10) unsigned NOT NULL default '0',
47 `timemarked` int(10) unsigned NOT NULL default '0',
48 `mailed` tinyint(1) unsigned NOT NULL default '0',
50 KEY `assignment` (`assignment`),
51 KEY `userid` (`userid`),
52 KEY `mailed` (`mailed`),
53 KEY `timemarked` (`timemarked`)
54 ) COMMENT='Info about submitted assignments';
55 # --------------------------------------------------------
58 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view', 'assignment', 'name');
59 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'add', 'assignment', 'name');
60 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'update', 'assignment', 'name');
61 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'view submission', 'assignment', 'name');
62 INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('assignment', 'upload', 'assignment', 'name');