moodle/mod/assignment/db/mysql.sql
moodler ebc3bd2b24 Changes throughout Moodle to remove any reserved words from the
Moodle tables.

ie user -> userid in many tables, plus in user_students
   start -> starttime and end -> endtime

I've just done all this as carefully as I could ... I don't think
I missed anything but it's pretty intensive work and I'd be fooling myself
if I didn't think I'd missed a couple.

Note that this version should pretty much be able to bootstrap itself
using PostgreSQL now ... but this is untested
2002-12-23 09:39:26 +00:00

47 lines
1.9 KiB
SQL

#
# Table structure for table `assignment`
#
CREATE TABLE `prefix_assignment` (
`id` int(10) unsigned NOT NULL auto_increment,
`course` int(10) unsigned NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`format` tinyint(2) unsigned NOT NULL default '0',
`resubmit` tinyint(2) unsigned NOT NULL default '0',
`type` int(10) unsigned NOT NULL default '1',
`maxbytes` int(10) unsigned NOT NULL default '100000',
`timedue` int(10) unsigned NOT NULL default '0',
`grade` int(10) NOT NULL default '0',
`timemodified` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) COMMENT='Defines assignments';
# --------------------------------------------------------
#
# Table structure for table `assignment_submissions`
#
CREATE TABLE `prefix_assignment_submissions` (
`id` int(10) unsigned NOT NULL auto_increment,
`assignment` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
`timecreated` int(10) unsigned NOT NULL default '0',
`timemodified` int(10) unsigned NOT NULL default '0',
`numfiles` int(10) unsigned NOT NULL default '0',
`grade` int(11) NOT NULL default '0',
`comment` text NOT NULL,
`teacher` int(10) unsigned NOT NULL default '0',
`timemarked` int(10) unsigned NOT NULL default '0',
`mailed` tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) COMMENT='Info about submitted assignments';
# --------------------------------------------------------
INSERT INTO prefix_log_display VALUES ('assignment', 'view', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'add', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'update', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'view submissions', 'assignment', 'name');
INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name');