b0f2597e17
============================ This new assignment module allows Plugin Assignment types. This should allow a whole lot of new stuff to easily be placed in Moodle without making the modules list longer for no good reason. This checkin is still a really rough version that needs work on it. Normally I would want it better than this to check in, but I need to collaborate with Shane on the remaining code and CVS is the best way. Give it a day or two to settle in. :-) This is the last thing I wanted to get into 1.5. Getting close now!! Cheers! Martin
58 lines
2.1 KiB
SQL
58 lines
2.1 KiB
SQL
#
|
|
# Table structure for table assignment
|
|
#
|
|
|
|
CREATE TABLE prefix_assignment (
|
|
id SERIAL PRIMARY KEY,
|
|
course integer NOT NULL default '0',
|
|
name varchar(255) NOT NULL default '',
|
|
description text NOT NULL default '',
|
|
format integer NOT NULL default '0',
|
|
assignmenttype varchar(50) NOT NULL default '',
|
|
resubmit integer NOT NULL default '0',
|
|
emailteachers integer NOT NULL default '0',
|
|
maxbytes integer NOT NULL default '100000',
|
|
timedue integer NOT NULL default '0',
|
|
timeavailable integer NOT NULL default '0',
|
|
grade integer NOT NULL default '0',
|
|
timemodified integer NOT NULL default '0'
|
|
);
|
|
|
|
CREATE INDEX prefix_assignment_course_idx ON prefix_assignment (course);
|
|
|
|
# --------------------------------------------------------
|
|
|
|
#
|
|
# Table structure for table assignment_submissions
|
|
#
|
|
|
|
CREATE TABLE prefix_assignment_submissions (
|
|
id SERIAL PRIMARY KEY,
|
|
assignment integer NOT NULL default '0',
|
|
userid integer NOT NULL default '0',
|
|
timecreated integer NOT NULL default '0',
|
|
timemodified integer NOT NULL default '0',
|
|
numfiles integer NOT NULL default '0',
|
|
grade integer NOT NULL default '0',
|
|
comment text NOT NULL default '',
|
|
teacher integer NOT NULL default '0',
|
|
timemarked integer NOT NULL default '0',
|
|
mailed integer NOT NULL default '0'
|
|
);
|
|
|
|
CREATE INDEX prefix_assignment_submissions_assignment_idx ON prefix_assignment_submissions (assignment);
|
|
CREATE INDEX prefix_assignment_submissions_userid_idx ON prefix_assignment_submissions (userid);
|
|
CREATE INDEX prefix_assignment_submissions_mailed_idx ON prefix_assignment_submissions (mailed);
|
|
CREATE INDEX prefix_assignment_submissions_timemarked_idx ON prefix_assignment_submissions (timemarked);
|
|
|
|
|
|
# --------------------------------------------------------
|
|
|
|
|
|
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');
|
|
|