mirror of
https://github.com/moodle/moodle.git
synced 2025-02-02 22:29:18 +01:00
59c005b76e
------------------------ Added a small new feature to the assignment module to alert teachers when new emails come in. This feature adds one new field (which is tested) but the operation of the new code has not been tested yet at all (apart from PHP syntax) and very likely has bugs in it. I'm checking this in so I can do tests on test.moodle.com which has email set up properly. I'm off to bed right now but if anyone else wants to test this feature before tomorrow please do! :-) While I'm rambling here in CVS, I need to have a good look soon at Pablo's work on Assignment and see if I can merge it all in...
54 lines
2.1 KiB
SQL
54 lines
2.1 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',
|
|
`emailteachers` 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`),
|
|
KEY `course` (`course`)
|
|
) 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`),
|
|
KEY `assignment` (`assignment`),
|
|
KEY `userid` (`userid`),
|
|
KEY `mailed` (`mailed`),
|
|
KEY `timemarked` (`timemarked`)
|
|
) 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 submission', 'assignment', 'name');
|
|
INSERT INTO prefix_log_display VALUES ('assignment', 'upload', 'assignment', 'name');
|
|
|