2 # Table structure for table `exercise`
5 CREATE TABLE `prefix_exercise` (
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 `nelements` tinyint(3) unsigned NOT NULL default '1',
10 `phase` tinyint(3) unsigned NOT NULL default '0',
11 `gradingstrategy` tinyint(3) unsigned NOT NULL default '1',
12 `usemaximum` tinyint(3) unsigned NOT NULL default '0',
13 `assessmentcomps` tinyint(3) unsigned NOT NULL default '2',
14 `anonymous` tinyint(3) unsigned NOT NULL default '1',
15 `maxbytes` int(10) unsigned NOT NULL default '100000',
16 `deadline` int(10) unsigned NOT NULL default '0',
17 `timemodified` int(10) unsigned NOT NULL default '0',
18 `grade` tinyint(3) NOT NULL default '0',
19 `gradinggrade` tinyint(3) NOT NULL default '0',
20 `showleaguetable` tinyint(3) unsigned NOT NULL default '0',
21 `usepassword` tinyint(3) unsigned NOT NULL default '0',
22 `password` varchar(32) NOT NULL default '',
24 KEY `course` (`course`)
25 ) COMMENT='Defines exercise';
26 # --------------------------------------------------------
29 # Table structure for table `exercise_submissions`
32 CREATE TABLE `prefix_exercise_submissions` (
33 `id` int(10) unsigned NOT NULL auto_increment,
34 `exerciseid` int(10) unsigned NOT NULL default '0',
35 `userid` int(10) unsigned NOT NULL default '0',
36 `title` varchar(100) NOT NULL default '',
37 `timecreated` int(10) unsigned NOT NULL default '0',
38 `resubmit` tinyint(3) unsigned NOT NULL default '0',
39 `mailed` tinyint(3) unsigned NOT NULL default '0',
40 `isexercise` tinyint(3) unsigned NOT NULL default '0',
41 `late` tinyint(3) unsigned NOT NULL default '0',
43 INDEX `userid` (`userid`),
44 INDEX `exerciseid` (`exerciseid`)
45 ) COMMENT='Info about submitted work from teacher and students';
46 # --------------------------------------------------------
49 # Table structure for table `exercise_assessments`
52 CREATE TABLE `prefix_exercise_assessments` (
53 `id` int(10) unsigned NOT NULL auto_increment,
54 `exerciseid` int(10) unsigned NOT NULL default '0',
55 `submissionid` int(10) unsigned NOT NULL default '0',
56 `userid` int(10) unsigned NOT NULL default '0',
57 `timecreated` int(10) unsigned NOT NULL default '0',
58 `timegraded` int(10) unsigned NOT NULL default '0',
59 `grade` float NOT NULL default '0',
60 `gradinggrade` int(3) NOT NULL default '0',
61 `mailed` tinyint(2) unsigned NOT NULL default '0',
62 `generalcomment` text NOT NULL default '',
63 `teachercomment` text NOT NULL default '',
65 INDEX (`submissionid`),
68 ) COMMENT='Info about assessments by teacher and students';
69 # --------------------------------------------------------
72 # Table structure for table `exercise_elements`
75 CREATE TABLE `prefix_exercise_elements` (
76 `id` int(10) unsigned NOT NULL auto_increment,
77 `exerciseid` int(10) unsigned NOT NULL default '0',
78 `elementno` tinyint(3) unsigned NOT NULL default '0',
79 `description` text NOT NULL,
80 `scale` tinyint(3) unsigned NOT NULL default '0',
81 `maxscore` tinyint(3) unsigned NOT NULL default '1',
82 `weight` tinyint(3) unsigned NOT NULL default '11',
84 KEY `exerciseid` (`exerciseid`)
85 ) COMMENT='Info about marking scheme of assignment';
86 # --------------------------------------------------------
90 # Table structure for table `exercise_rubrics`
93 CREATE TABLE `prefix_exercise_rubrics` (
94 `id` int(10) unsigned NOT NULL auto_increment,
95 `exerciseid` int(10) unsigned NOT NULL default '0',
96 `elementno` int(10) unsigned NOT NULL default '0',
97 `rubricno` tinyint(3) unsigned NOT NULL default '0',
98 `description` text NOT NULL,
100 KEY `exerciseid` (`exerciseid`)
101 ) COMMENT='Info about the rubrics marking scheme';
102 # --------------------------------------------------------
105 # Table structure for table `exercise_grades`
108 CREATE TABLE `prefix_exercise_grades` (
109 `id` int(10) unsigned NOT NULL auto_increment,
110 `exerciseid` int(10) unsigned NOT NULL default '0',
111 `assessmentid` int(10) unsigned NOT NULL default '0',
112 `elementno` int(10) unsigned NOT NULL default '0',
113 `feedback` text NOT NULL default '',
114 `grade` tinyint(3) NOT NULL default '0',
116 INDEX (`assessmentid`),
117 INDEX `exerciseid` (`exerciseid`)
118 ) COMMENT='Info about individual grades given to each element';
119 # --------------------------------------------------------
123 INSERT INTO `prefix_log_display` VALUES ('exercise', 'close', 'exercise', 'name');
124 INSERT INTO `prefix_log_display` VALUES ('exercise', 'open', 'exercise', 'name');
125 INSERT INTO `prefix_log_display` VALUES ('exercise', 'submit', 'exercise', 'name');
126 INSERT INTO `prefix_log_display` VALUES ('exercise', 'view', 'exercise', 'name');
127 INSERT INTO `prefix_log_display` VALUES ('exercise', 'update', 'exercise', 'name');