Index: lams_common/db/model/lams_11.clay =================================================================== diff -u -rb780ccec06243ce51d0a001577ed601c92adc6be -r197c186ee89cbca891240c59437053e0d23524f5 --- lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision b780ccec06243ce51d0a001577ed601c92adc6be) +++ lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision 197c186ee89cbca891240c59437053e0d23524f5) @@ -1595,19 +1595,32 @@ - + - + + + + + + + + + + + + + + @@ -1636,6 +1649,13 @@ + + + + + + + @@ -1654,6 +1674,10 @@ + + + + @@ -4760,8 +4784,8 @@ - + @@ -4805,8 +4829,8 @@ - + @@ -4818,8 +4842,8 @@ - + @@ -4831,8 +4855,8 @@ - + @@ -4865,6 +4889,39 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Index: lams_common/db/sql/create_lams_11_tables.sql =================================================================== diff -u -rb780ccec06243ce51d0a001577ed601c92adc6be -r197c186ee89cbca891240c59437053e0d23524f5 --- lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision b780ccec06243ce51d0a001577ed601c92adc6be) +++ lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision 197c186ee89cbca891240c59437053e0d23524f5) @@ -131,6 +131,12 @@ )TYPE=InnoDB; CREATE UNIQUE INDEX IX_lams_privilege_code ON lams_privilege (code ASC); +CREATE TABLE lams_organisation_state ( + organisation_state_id INT(3) NOT NULL + , description VARCHAR(255) + , PRIMARY KEY (organisation_state_id) +)TYPE=InnoDB; + CREATE TABLE lams_authentication_method_type ( authentication_method_type_id INT(3) NOT NULL , description VARCHAR(64) NOT NULL @@ -191,6 +197,7 @@ , workspace_id BIGINT(20) , locale_language CHAR(2) , locale_country CHAR(2) + , organisation_state_id INT(3) NOT NULL , PRIMARY KEY (organisation_id) , INDEX (organisation_type_id) , CONSTRAINT FK_lams_organisation_1 FOREIGN KEY (organisation_type_id) @@ -201,6 +208,9 @@ , INDEX (parent_organisation_id) , CONSTRAINT FK_lams_organisation_3 FOREIGN KEY (parent_organisation_id) REFERENCES lams_organisation (organisation_id) ON DELETE NO ACTION ON UPDATE NO ACTION + , INDEX (organisation_state_id) + , CONSTRAINT FK_lams_organisation_4 FOREIGN KEY (organisation_state_id) + REFERENCES lams_organisation_state (organisation_state_id) ON DELETE NO ACTION ON UPDATE NO ACTION )TYPE=InnoDB; CREATE TABLE lams_css_theme_ve ( Index: lams_common/db/sql/insert_types_data.sql =================================================================== diff -u -r1454b2fd27486dd14b1ccf172b96df61a0b0d355 -r197c186ee89cbca891240c59437053e0d23524f5 --- lams_common/db/sql/insert_types_data.sql (.../insert_types_data.sql) (revision 1454b2fd27486dd14b1ccf172b96df61a0b0d355) +++ lams_common/db/sql/insert_types_data.sql (.../insert_types_data.sql) (revision 197c186ee89cbca891240c59437053e0d23524f5) @@ -15,6 +15,11 @@ INSERT INTO lams_organisation_type VALUES(2, 'COURSE ORGANISATION', 'main organisation level - equivalent to an entire course.'); INSERT INTO lams_organisation_type VALUES(3, 'CLASS', 'runtime organisation level - lessons are run for classes.'); +INSERT INTO lams_organisation_state VALUES (1, 'ACTIVE'); +INSERT INTO lams_organisation_state VALUES (2, 'HIDDEN'); +INSERT INTO lams_organisation_state VALUES (3, 'ARCHIVED'); +INSERT INTO lams_organisation_state VALUES (4, 'REMOVED'); + INSERT INTO lams_grouping_type VALUES (1, 'RANDOM_GROUPING'); INSERT INTO lams_grouping_type VALUES (2, 'CHOSEN_GROUPING'); INSERT INTO lams_grouping_type VALUES (3, 'CLASS_GROUPING'); Index: lams_common/db/sql/insert_users.sql =================================================================== diff -u -rb780ccec06243ce51d0a001577ed601c92adc6be -r197c186ee89cbca891240c59437053e0d23524f5 --- lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision b780ccec06243ce51d0a001577ed601c92adc6be) +++ lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision 197c186ee89cbca891240c59437053e0d23524f5) @@ -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, 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); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (1, 'Root', null, 'Root Organisation',null,1,NOW(),1,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (2, 'Playpen', 'PP101', 'Developers Playpen',1,2,NOW(),2,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (3, 'Everybody', null, 'All People In Course',2,3,NOW(),null,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (4, 'Mathematics 1', 'MATH111', 'Mathematics 1',1,2,NOW(),3,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (5, 'Tutorial Group A', 'TUTA', 'Tutorial Group A',4,3,NOW(),null,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, organisation_state_id) + VALUES (6, 'Tutorial Group B', 'TUTB', 'Tutorial Group B',4,3,NOW(),null,1); -- users INSERT INTO lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,