Index: lams_common/db/model/lams_11.clay =================================================================== diff -u -r03392c988a23f5e9129967f8ae692488213632fe -rb780ccec06243ce51d0a001577ed601c92adc6be --- lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision 03392c988a23f5e9129967f8ae692488213632fe) +++ lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision b780ccec06243ce51d0a001577ed601c92adc6be) @@ -1,2549 +1,2572 @@ - - + + - - + + - - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - + When a lesson is started, the authored design is considered the orginial learning design - - + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + + + + + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - + - - - - + + + + - + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -2552,176 +2575,176 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -2730,228 +2753,228 @@
- - - +
+ + - - - - + + + + - - - + + + - + Unique signature for each version of a tool. <organisation><tool><version> - - - + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - + Unique identifier for the tool. This should remain the same for every version of the tool. It will be used for the IMS LD import/export. - - - + + + - + Version of tool. Expected to be in format [major version.minor version] eg 1.2 - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + @@ -2960,163 +2983,163 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + @@ -3125,53 +3148,53 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3180,53 +3203,53 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3235,86 +3258,86 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3323,78 +3346,78 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + @@ -3403,51 +3426,51 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3456,51 +3479,51 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3509,309 +3532,309 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- +
There will usually be 0 or 1 workspace for each tool in LAMS, so this should be a pretty small table. The main lookup is done on name, but given the small number of rows a complete table scan should be fine. A name index would probably be about the same size as the table anyway. - + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- +
Like lams_cr_workspace, there will usually be 0 or 1 workspace for each tool in LAMS, so this should be a pretty small table. The main lookup is done on name, but given the small number of rows a complete table scan should be fine. - + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + - - + + @@ -3820,67 +3843,67 @@
- +
Has a "dummy" id nv_id (node version id) which is unique for all node_id and version_id combinations. It is the node_id and version_id combination that is the "real" key for this table. - + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - + + - - + + @@ -3889,72 +3912,72 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - - + + @@ -3963,91 +3986,91 @@
- +
A node can only belong to one parent - so each time a new version of a package is created, all the nodes are recreated. - + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + @@ -4056,150 +4079,150 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + @@ -4208,170 +4231,170 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + @@ -4380,105 +4403,105 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - + +
- - - +
+ + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + @@ -4487,79 +4510,79 @@
- - - +
+ + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + - - - + + + - - - - + + + + - - + + - - + + @@ -4568,47 +4591,47 @@
- +
All the lams_css_property values matching this lams_css_style make up the CSSStyleDeclaration for this style. It may be a "base" style for a theme, or it may be for a named visual element. Each style may have a subset of properties, such as "_tf" - + - - - - + + + + - - - + + + - - - - + + + + - - - + + + - - + + - - + + @@ -4617,111 +4640,111 @@
- +
Url details for system tools such as gates and grouping - + - - - - + + + + - - - + + + - + Unique signature for each version of a tool. <organisation><tool><version> - - + + - - - + + + - - - - - + + + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - + + - - + + - - + + @@ -4730,6 +4753,118 @@
+ +Individual permissions, such as read access to a content folder. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Link table between lams_role and lams_privilege. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index: lams_common/db/sql/create_lams_11_tables.sql =================================================================== diff -u -r03392c988a23f5e9129967f8ae692488213632fe -rb780ccec06243ce51d0a001577ed601c92adc6be --- lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision 03392c988a23f5e9129967f8ae692488213632fe) +++ lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision b780ccec06243ce51d0a001577ed601c92adc6be) @@ -123,6 +123,14 @@ , PRIMARY KEY (content_type_id) )TYPE=InnoDB; +CREATE TABLE lams_privilege ( + privilege_id BIGINT(20) NOT NULL AUTO_INCREMENT + , code VARCHAR(10) NOT NULL + , description VARCHAR(255) + , PRIMARY KEY (privilege_id) +)TYPE=InnoDB; +CREATE UNIQUE INDEX IX_lams_privilege_code ON lams_privilege (code ASC); + CREATE TABLE lams_authentication_method_type ( authentication_method_type_id INT(3) NOT NULL , description VARCHAR(64) NOT NULL @@ -174,12 +182,15 @@ CREATE TABLE lams_organisation ( organisation_id BIGINT(20) NOT NULL AUTO_INCREMENT - , name VARCHAR(250) + , name VARCHAR(250) NOT NULL + , code VARCHAR(20) , description VARCHAR(250) , parent_organisation_id BIGINT(20) , organisation_type_id INT(3) NOT NULL DEFAULT 0 , create_date DATETIME NOT NULL , workspace_id BIGINT(20) + , locale_language CHAR(2) + , locale_country CHAR(2) , PRIMARY KEY (organisation_id) , INDEX (organisation_type_id) , CONSTRAINT FK_lams_organisation_1 FOREIGN KEY (organisation_type_id) @@ -782,3 +793,17 @@ REFERENCES lams_learning_design (learning_design_id) ON DELETE NO ACTION ON UPDATE NO ACTION )TYPE=InnoDB; +CREATE TABLE lams_role_privilege ( + rp_id BIGINT(20) NOT NULL AUTO_INCREMENT + , role_id INT(6) NOT NULL + , privilege_id BIGINT(20) NOT NULL + , PRIMARY KEY (rp_id) + , INDEX (privilege_id) + , CONSTRAINT FK_lams_role_privilege_1 FOREIGN KEY (privilege_id) + REFERENCES lams_privilege (privilege_id) + , INDEX (role_id) + , CONSTRAINT FK_lams_role_privilege_2 FOREIGN KEY (role_id) + REFERENCES lams_role (role_id) +)TYPE=InnoDB; + + Index: lams_common/db/sql/insert_users.sql =================================================================== diff -u -ra761ddcc6e754099b48ae04022f9d9202d38b514 -rb780ccec06243ce51d0a001577ed601c92adc6be --- lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision a761ddcc6e754099b48ae04022f9d9202d38b514) +++ lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision b780ccec06243ce51d0a001577ed601c92adc6be) @@ -56,18 +56,18 @@ insert into lams_workspace_folder (workspace_folder_id,parent_folder_id,name,workspace_id,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) values(8,null,'Four Test Workspace',8,8,'20041223','20041223',1); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (1, 'Root', 'Root Organisation',null,1,NOW(),1); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (2, 'Playpen', 'Developers Playpen',1,2,NOW(),2); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (3, 'Everybody', 'All People In Course',2,3,NOW(),null); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (4, 'MATH111', 'Mathematics 1',1,2,NOW(),3); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (5, 'TUTA', 'Tutorial Group A',4,3,NOW(),null); -INSERT INTO lams_organisation (organisation_id, name, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) - VALUES (6, 'TUTB', 'Tutorial Group B',4,3,NOW(),null); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (1, 'Root', null, 'Root Organisation',null,1,NOW(),1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (2, 'Playpen', 'PP101', 'Developers Playpen',1,2,NOW(),2); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (3, 'Everybody', null, 'All People In Course',2,3,NOW(),null); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (4, 'Mathematics 1', 'MATH111', 'Mathematics 1',1,2,NOW(),3); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (5, 'Tutorial Group A', 'TUTA', 'Tutorial Group A',4,3,NOW(),null); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id) + VALUES (6, 'Tutorial Group B', 'TUTB', 'Tutorial Group B',4,3,NOW(),null); -- users INSERT INTO lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,