Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgSaveAction.java =================================================================== diff -u -r5a7d8461a9600bdf21caa29b8a3253e013fec8cb -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgSaveAction.java (.../OrgSaveAction.java) (revision 5a7d8461a9600bdf21caa29b8a3253e013fec8cb) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgSaveAction.java (.../OrgSaveAction.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -106,18 +106,16 @@ if(orgId!=0){ org = (Organisation)getService().findById(Organisation.class,orgId); BeanUtils.copyProperties(org,orgForm); - org.setLocaleCountry(locale.getCountryIsoCode()); - org.setLocaleLanguage(locale.getLanguageIsoCode()); + org.setLocale(locale); }else{ org = new Organisation(); BeanUtils.copyProperties(org,orgForm); - org.setLocaleCountry(locale.getCountryIsoCode()); - org.setLocaleLanguage(locale.getLanguageIsoCode()); + org.setLocale(locale); org.setParentOrganisation((Organisation)getService().findById(Organisation.class,(Integer)orgForm.get("parentId"))); org.setOrganisationType((OrganisationType)getService().findById(OrganisationType.class,(Integer)orgForm.get("typeId"))); } - log.debug("orgId:"+org.getOrganisationId()+" language:"+org.getLocaleLanguage()+" Country:"+org.getLocaleCountry()+" create date:"+org.getCreateDate()); + log.debug("orgId:"+org.getOrganisationId()+" locale:"+org.getLocale()+" create date:"+org.getCreateDate()); org.setOrganisationState((OrganisationState)getService().findById(OrganisationState.class,(Integer)orgForm.get("stateId"))); org = getService().saveOrganisation(org, user.getUserID()); Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java =================================================================== diff -u -r19db8dd30b8d7f8625070b3674d4e3c77992ce7c -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java (.../OrganisationAction.java) (revision 19db8dd30b8d7f8625070b3674d4e3c77992ce7c) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrganisationAction.java (.../OrganisationAction.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -78,13 +78,8 @@ orgForm.set("parentName",org.getParentOrganisation().getName()); orgForm.set("typeId",org.getOrganisationType().getOrganisationTypeId()); orgForm.set("stateId",org.getOrganisationState().getOrganisationStateId()); - Map properties = new HashMap(); - properties.put("languageIsoCode",org.getLocaleLanguage()); - if(org.getLocaleCountry()!=null){ - properties.put("countryIsoCode",org.getLocaleCountry()); - } - SupportedLocale locale = (SupportedLocale)getService().findByProperties(SupportedLocale.class,properties).get(0); - orgForm.set("localeId",locale.getLocaleId()); + SupportedLocale locale = org.getLocale(); + orgForm.set("localeId",locale != null ? locale.getLocaleId() : null); } request.getSession().setAttribute("locales",locales); request.getSession().setAttribute("status",status); Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java =================================================================== diff -u -rc54e2d8059c82541dca6f511b733f18f4bd7e87d -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java (.../UserAction.java) (revision c54e2d8059c82541dca6f511b733f18f4bd7e87d) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserAction.java (.../UserAction.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -111,7 +111,7 @@ i++; } userForm.set("roles",roles); - SupportedLocale locale = getService().getSupportedLocale(user.getLocaleLanguage(),user.getLocaleCountry()); + SupportedLocale locale = user.getLocale(); userForm.set("localeId",locale.getLocaleId()); }else{ Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java =================================================================== diff -u -rc54e2d8059c82541dca6f511b733f18f4bd7e87d -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java (.../UserSaveAction.java) (revision c54e2d8059c82541dca6f511b733f18f4bd7e87d) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/UserSaveAction.java (.../UserSaveAction.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -131,10 +131,8 @@ userForm.set("password", user.getPassword()); } BeanUtils.copyProperties(user, userForm); - user.setLocaleCountry(locale.getCountryIsoCode()); - user.setLocaleLanguage(locale.getLanguageIsoCode()); - log.debug("country: " + user.getLocaleCountry()); - log.debug("language: " + user.getLocaleLanguage()); + user.setLocale(locale); + log.debug("locale: " + locale); List rolesList = Arrays.asList(roles); List rolesCopy = new ArrayList(); rolesCopy.addAll(rolesList); @@ -176,8 +174,7 @@ user.setAuthenticationMethod((AuthenticationMethod) getService().findByProperty(AuthenticationMethod.class, "authenticationMethodName","LAMS-Database").get(0)); user.setUserId(null); - user.setLocaleCountry(locale.getCountryIsoCode()); - user.setLocaleLanguage(locale.getLanguageIsoCode()); + user.setLocale(locale); getService().save(user); log.debug("user: " + user.toString()); List orgs = new ArrayList(); Index: lams_build/lib/lams/lams.jar =================================================================== diff -u -rf576e6b48e7c95c5760f4cb7dfcb48c66f8193bb -rc21c3386cec2ee819ba267d84d532676d2f4990d Binary files differ Index: lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java =================================================================== diff -u -ra909454acb3505c97f39fbf6d0e2776ea8ffa3c4 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java (.../ProfileAction.java) (revision a909454acb3505c97f39fbf6d0e2776ea8ffa3c4) +++ lams_central/src/java/org/lamsfoundation/lams/web/ProfileAction.java (.../ProfileAction.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -91,7 +91,7 @@ log.debug("editing profile of userId: "+requestor.getUserId()); DynaActionForm userForm = (DynaActionForm)form; BeanUtils.copyProperties(userForm, requestor); - SupportedLocale locale = getService().getSupportedLocale(requestor.getLocaleLanguage(),requestor.getLocaleCountry()); + SupportedLocale locale = requestor.getLocale(); userForm.set("localeId",locale.getLocaleId()); request.setAttribute("locales", locales); return mapping.findForward("edit"); Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/Country.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/Language.hbm.xml'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/Organisation.hbm.xml =================================================================== diff -u -rd65ab06923c55ee76432bad9507f933ec442a671 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/Organisation.hbm.xml (.../Organisation.hbm.xml) (revision d65ab06923c55ee76432bad9507f933ec442a671) +++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/Organisation.hbm.xml (.../Organisation.hbm.xml) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -89,30 +89,6 @@ not-null="true" - - - @hibernate.property - column="locale_language" - length="2" - - - - - @hibernate.property - column="locale_country" - length="2" - - - + + + + @hibernate.many-to-one + not-null="true" + lazy="false" + @hibernate.column name="locale_id" + + + Index: lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/User.hbm.xml =================================================================== diff -u -r6633f5d5c7844c27582a9b323fead87fac99dfd5 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/User.hbm.xml (.../User.hbm.xml) (revision 6633f5d5c7844c27582a9b323fead87fac99dfd5) +++ lams_common/conf/hibernate/mappings/org/lamsfoundation/lams/usermanagement/User.hbm.xml (.../User.hbm.xml) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -264,33 +264,8 @@ not-null="true" - - - @hibernate.property - column="locale_language" - length="2" - - - - @hibernate.property - column="locale_country" - length="2" - - - - + + + + @hibernate.many-to-one + not-null="true" + lazy="false" + @hibernate.column name="locale_id" + + + Index: lams_common/db/model/lams_11.clay =================================================================== diff -u -r28143b7c8f1bf58ef463c6ddc7ab2c41c6df030f -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision 28143b7c8f1bf58ef463c6ddc7ab2c41c6df030f) +++ lams_common/db/model/lams_11.clay (.../lams_11.clay) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -1566,22 +1566,6 @@ - - - - - - - - - - - - - - - - @@ -1647,6 +1631,19 @@ + + + + + + + + + + + + + @@ -1682,6 +1679,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -1983,22 +2001,6 @@ - - - - - - - - - - - - - - - - @@ -2032,6 +2034,19 @@ + + + + + + + + + + + + + @@ -2067,6 +2082,13 @@ + + + + + + + @@ -5035,7 +5057,7 @@ - + @@ -5071,6 +5093,19 @@ + + + + + + + + + + + + + Index: lams_common/db/sql/create_lams_11_tables.sql =================================================================== diff -u -r28143b7c8f1bf58ef463c6ddc7ab2c41c6df030f -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision 28143b7c8f1bf58ef463c6ddc7ab2c41c6df030f) +++ lams_common/db/sql/create_lams_11_tables.sql (.../create_lams_11_tables.sql) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -221,13 +221,12 @@ , 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) , organisation_state_id INT(3) NOT NULL , admin_add_new_users TINYINT(1) NOT NULL DEFAULT 0 , admin_browse_all_users TINYINT(1) NOT NULL DEFAULT 0 , admin_change_status TINYINT(1) NOT NULL DEFAULT 0 , admin_create_guest TINYINT(1) NOT NULL DEFAULT 0 + , locale_id TINYINT(4) , PRIMARY KEY (organisation_id) , INDEX (organisation_type_id) , CONSTRAINT FK_lams_organisation_1 FOREIGN KEY (organisation_type_id) @@ -241,6 +240,15 @@ , 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 + , INDEX (locale_id) + , CONSTRAINT FK_lams_organisation_5 FOREIGN KEY (locale_id) + REFERENCES lams_supported_locale (locale_id) + , INDEX (organisation_id) + , CONSTRAINT FK_lams_organisation_6 FOREIGN KEY (organisation_id) + REFERENCES lams_organisation (organisation_id) + , INDEX (organisation_id) + , CONSTRAINT FK_lams_organisation_7 FOREIGN KEY (organisation_id) + REFERENCES lams_organisation (organisation_id) )TYPE=InnoDB; CREATE TABLE lams_css_theme_ve ( @@ -301,11 +309,10 @@ , create_date DATETIME NOT NULL , authentication_method_id BIGINT(20) NOT NULL DEFAULT 0 , workspace_id BIGINT(20) - , locale_language CHAR(2) NOT NULL DEFAULT 'en' - , locale_country CHAR(2) , flash_theme_id BIGINT(20) , html_theme_id BIGINT(20) , chat_id VARCHAR(255) + , locale_id BIGINT(20) , PRIMARY KEY (user_id) , INDEX (authentication_method_id) , CONSTRAINT FK_lams_user_1 FOREIGN KEY (authentication_method_id) @@ -320,10 +327,6 @@ , CONSTRAINT FK_lams_user_5 FOREIGN KEY (html_theme_id) REFERENCES lams_css_theme_ve (theme_ve_id) ON DELETE NO ACTION ON UPDATE NO ACTION )TYPE=InnoDB; -ALTER TABLE lams_user MODIFY COLUMN locale_language CHAR(2) NOT NULL DEFAULT 'en' - COMMENT 'ISO 639-1 Language Code (2 letter version) Java only supports 2 letter properly, not the 3 letter codes.'; -ALTER TABLE lams_user MODIFY COLUMN locale_country CHAR(2) - COMMENT 'ISO 3166 Country Code'; CREATE UNIQUE INDEX UQ_lams_user_login ON lams_user (login ASC); CREATE INDEX login ON lams_user (login ASC); @@ -848,18 +851,6 @@ REFERENCES lams_role (role_id) )TYPE=InnoDB; -CREATE TABLE lams_language ( - language_id TINYINT(4) NOT NULL AUTO_INCREMENT - , iso_code VARCHAR(2) NOT NULL UNIQUE - , PRIMARY KEY (language_id) -)TYPE=InnoDB; - -CREATE TABLE lams_country ( - country_id TINYINT(4) NOT NULL AUTO_INCREMENT - , iso_code VARCHAR(2) NOT NULL UNIQUE - , PRIMARY KEY (country_id) - )TYPE=InnoDB; - CREATE TABLE lams_tool_import_support ( id BIGINT(20) NOT NULL AUTO_INCREMENT , installed_tool_signature VARCHAR(15) NOT NULL Index: lams_common/db/sql/insert_types_data.sql =================================================================== diff -u -rba6298f6ab71443dba6f800d01316590d88da547 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/db/sql/insert_types_data.sql (.../insert_types_data.sql) (revision ba6298f6ab71443dba6f800d01316590d88da547) +++ lams_common/db/sql/insert_types_data.sql (.../insert_types_data.sql) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -199,14 +199,6 @@ INSERT INTO lams_supported_locale (locale_id, language_iso_code, country_iso_code, description) VALUES (18, 'nl', null, 'Dutch'); --- to be removed when the admin converted over to use lams_supported_locale -INSERT INTO lams_country VALUES (1, 'AU'); -INSERT INTO lams_country VALUES (2, 'US'); -INSERT INTO lams_country VALUES (3, 'CN'); - -INSERT INTO lams_language VALUES (1, 'en'); -INSERT INTO lams_language VALUES (2, 'zh'); - -- which current tool supports the old 1.0.x tools? INSERT INTO lams_tool_import_support VALUES (1, 'lafrum11', 'messageboard'); INSERT INTO lams_tool_import_support VALUES (2, 'lamc11', 'simpleassessment'); Index: lams_common/db/sql/insert_users.sql =================================================================== diff -u -ra07f122478a2eb187e7448fbfe41a738504e3f26 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision a07f122478a2eb187e7448fbfe41a738504e3f26) +++ lams_common/db/sql/insert_users.sql (.../insert_users.sql) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -67,46 +67,46 @@ insert into lams_workspace_workspace_folder (id, workspace_id, workspace_folder_id) values (9, 7,7); insert into lams_workspace_workspace_folder (id, workspace_id, workspace_folder_id) values (10, 8,8); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (1, 'Root', null, 'Root Organisation',null,1,NOW(),1,'en','AU',1); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (2, 'Playpen', 'PP101', 'Developers Playpen',1,2,NOW(),2,'en','AU',1); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (3, 'Everybody', null, 'All People In Course',2,3,NOW(),null,'en','AU',1); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (4, 'Mathematics 1', 'MATH111', 'Mathematics 1',1,2,NOW(),3,'zh',null,1); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (5, 'Tutorial Group A', 'TUTA', 'Tutorial Group A',4,3,NOW(),null,'zh',null,1); -INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_language, locale_country, organisation_state_id) - VALUES (6, 'Tutorial Group B', 'TUTB', 'Tutorial Group B',4,3,NOW(),null,'zh',null,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (1, 'Root', null, 'Root Organisation',null,1,NOW(),1,1,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (2, 'Playpen', 'PP101', 'Developers Playpen',1,2,NOW(),2,1,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (3, 'Everybody', null, 'All People In Course',2,3,NOW(),null,1,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (4, 'Mathematics 1', 'MATH111', 'Mathematics 1',1,2,NOW(),3,2,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (5, 'Tutorial Group A', 'TUTA', 'Tutorial Group A',4,3,NOW(),null,2,1); +INSERT INTO lams_organisation (organisation_id, name, code, description, parent_organisation_id, organisation_type_id, create_date, workspace_id, locale_id, organisation_state_id) + VALUES (6, 'Tutorial Group B', 'TUTB', 'Tutorial Group B',4,3,NOW(),null,2,1); -- users INSERT INTO lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3, city,state,country,day_phone,evening_phone,mobile_phone,fax,email, disabled_flag,create_date,authentication_method_id,workspace_id, -locale_language, locale_country, flash_theme_id, html_theme_id) +locale_id, flash_theme_id, html_theme_id) VALUES(1, 'sysadmin',SHA1('sysadmin'),'Mr','Fei','Yang',null,null,null, 'Sydney','NSW','Australia',null,null,null,null,'fyang@melcoe.mq.edu.au', 0,NOW(),1,null, -'en','au',1,3); +1,1,3); INSERT INTO lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3, city,state,country,day_phone,evening_phone,mobile_phone,fax,email, disabled_flag,create_date,authentication_method_id,workspace_id, -locale_language, locale_country, flash_theme_id, html_theme_id) +locale_id, flash_theme_id, html_theme_id) VALUES(2, 'test',SHA1('test'),'Dr','Testing','LDAP',null,null,null, 'Sydney','NSW','Australia',null,null,null,null,'test@xx.xx.xx', 0,NOW(),3,null, -'mi','nz',1,3); +3,1,3); INSERT INTO lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3, city,state,country,day_phone,evening_phone,mobile_phone,fax,email, disabled_flag,create_date,authentication_method_id,workspace_id, -locale_language, locale_country, flash_theme_id, html_theme_id) +locale_id, flash_theme_id, html_theme_id) VALUES(3, 'lamskh01',SHA1('dummy'),'Mr','Jacky','Fang',null,null,null, 'Sydney','NSW','Australia',null,null,null,null,'jfang@melcoe.mq.edu.au', 0,NOW(),2,null, -'en','au',1,3); +1,1,3); insert into lams_user (user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3, city,state,country,day_phone,evening_phone,mobile_phone, Index: lams_common/db/sql/shaun/all.sql =================================================================== diff -u --- lams_common/db/sql/shaun/all.sql (revision 0) +++ lams_common/db/sql/shaun/all.sql (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -0,0 +1,433 @@ +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(11,null,'Bulgarian Workspace',11,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (11,11,'Bulgarian Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (11,11); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(11,'bulgarian','bulgarian','Dr','Bulgarian','Test','11','Bulgarian Ave',null,'Sofia',null,'Bulgaria','0211111111','0211111112','0411111111','0211111113','bulgarian@xx.os',0,'20041223',1,11,1,3,14); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (34, 2, 11); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (35, 3, 11); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (82,34,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (83,34,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (84,34,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (142,35,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (85,35,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (86,35,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(12,null,'Chinese Workspace',12,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (12,12,'Chinese Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (12,12); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(12,'chinese','chinese','Dr','Chinese','Test','12','Chinese Ave',null,'Beijing',null,'China','0211111111','0211111112','0411111111','0211111113','chinese@xx.os',0,'20041223',1,12,1,3,5); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (36, 2, 12); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (37, 3, 12); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (87,36,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (88,36,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (89,36,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (143,37,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (90,37,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (91,37,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(10,null,'French Workspace',10,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (10,10,'French Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (10,10); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(10,'french','french','Dr','French','Test','10','French Ave',null,'Paris',null,'France','0211111111','0211111112','0411111111','0211111113','french@xx.os',0,'20041223',1,10,1,3,6); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (32, 2, 10); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (33, 3, 10); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (77,32,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (78,32,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (79,32,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (144,33,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (80,33,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (81,33,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(13,null,'German Workspace',13,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (13,13,'German Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (13,13); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(13,'german','german','Dr','German','Test','13', 'German Ave',null,'Berlin',null,'Germany','0211111111','0211111112','0411111111','0211111113','german@xx.os',0,'20041223',1,13,1,3,4); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (38, 2, 13); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (39, 3, 13); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (92,38,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (93,38,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (94,38,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (145,39,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (95,39,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (96,39,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(21,null,'Hungarian Workspace',21,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (21,21,'Hungarian Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (21,21); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(21,'hungarian','hungarian','Dr','Hungarian','Test','21', 'Hungarian Ave',null,'Bukarest',null,'Hungry','0211111111','0211111112','0411111111','0211111113','hungarian@xx.os',0,'20041223',1,21,1,3,13); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (54, 2, 21); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (55, 3, 21); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (132,54,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (133,54,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (134,54,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (146,55,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (135,55,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (136,55,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(16,null,'Italian Workspace',16,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (16,16,'Italian Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (16,16); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(16,'italian','italian','Dr','Italian','Test','16', 'Italian Ave',null,'Rome',null,'Italy','0211111111','0211111112','0411111111','0211111113','italian@xx.os',0,'20041223',1,16,1,3,7); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (44, 2, 16); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (45, 3, 16); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (107,44,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (108,44,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (109,44,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (147,45,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (110,45,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (111,45,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(18,null,'Korean Workspace',18, now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (18,18,'Korean Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (18,18); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(18,'korean','korean','Dr','Korean','Test','18', 'Korean Ave',null,'Seoul',null,'Korea','0211111111','0211111112','0411111111','0211111113','korean@xx.os',0,'20041223',1,18,1,3,10); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (48, 2, 18); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (49, 3, 18); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (117,48,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (118,48,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (119,48,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (148,49,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (120,49,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (121,49,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(20,null,'Maori Workspace',20,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (20,20,'Maori Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (20,20); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(20,'maori','maori','Dr','Maori','Test','20', 'Maori Ave',null,'Auckland',null,'New Zealand','0211111111','0211111112','0411111111','0211111113','maori@xx.os',0,'20041223',1,20,1,3,3); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (52, 2, 20); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (53, 3, 20); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (127,52,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (128,52,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (129,52,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (149,53,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (130,53,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (131,53,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(14,null,'Norwegian Workspace',14,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (14,14,'Norwegian Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (14,14); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(14,'norwegian','norwegian','Dr','Norwegian','Test','14', 'Norwegian Ave',null,'Oslo',null,'Norway','0211111111','0211111112','0411111111','0211111113','norwegian@xx.os',0,'20041223',1,14,1,3,8); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (40, 2, 14); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (41, 3, 14); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (97,40,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (98,40,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (99,40,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (150,41,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (100,41,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (101,41,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(17,null,'Polish Workspace',17,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (17,17,'Polish Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (17,17); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(17,'polish','polish','Dr','Polish','Test','17', 'Polish Ave',null,'Warsaw',null,'Poland','0211111111','0211111112','0411111111','0211111113','polish@xx.os',0,'20041223',1,17,1,3,11); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (46, 2, 17); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (47, 3, 17); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (112,46,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (113,46,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (114,46,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (151,47,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (115,47,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (116,47,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(15,null,'Portuguese Workspace',15,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (15,15,'Portuguese Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (15,15); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(15,'portuguese','portuguese','Dr','Portuguese','Test','15', 'Portuguese Ave',null,'Brasilia',null,'Brazil','0211111111','0211111112','0411111111','0211111113','portuguese@xx.os',0,'20041223',1,15,1,3,12); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (42, 5, 15); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (43, 5, 15); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,4,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (102,42,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (103,42,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (104,42,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (152,43,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (105,43,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (106,43,6); + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(19,null,'Spanish Workspace',19,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (19,19,'Spanish Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (19,19); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(19,'spanish','spanish','Dr','Spanish','Test','19', 'Spanish Ave',null,'Madrid',null,'Spain','0211111111','0211111112','0411111111','0211111113','spanish@xx.os',0,'20041223',1,19,1,3,2); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (50, 2, 19); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (51, 3, 19); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (122,50,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (123,50,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (124,50,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (153,51,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (125,51,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (126,51,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(9,null,'Swedish Workspace',9,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (9,9,'Swedish Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (9,9); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(9,'swedish','swedish','Dr','Sweden','Test','9','Swedish Ave',null,'Stockholm',null,'Sweden','0211111111','0211111112','0411111111','0211111113','swedish@xx.os',0,'20041223',1,9,1,3,9); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (30, 2, 9); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (31, 3, 9); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (72,30,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (73,30,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (74,30,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (154,31,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (75,31,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (76,31,6); + + +SET FOREIGN_KEY_CHECKS=1; +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(24,null,'Thai Workspace',24,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (24,24,'Thai Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (24,24); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(24,'thai','thai','Dr','Thai','Test','24', 'Thai Ave',null,'Bangkok',null,'Thailand','0211111111','0211111112','0411111111','0211111113','thai@xx.os',0,'20041223',1,24,1,3,16); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (56, 2, 24); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (57, 3, 24); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (137,56,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (138,56,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (139,56,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (155,57,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (140,57,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (141,57,6); + +SET FOREIGN_KEY_CHECKS=1; + +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(25,null,'Greek Workspace',25,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (25,25,'Greek Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (11,11); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(25,'greek','greek','Dr','Greek','Test','25','Greek Ave',null,'Athens',null,'Greece','0211111111','0211111112','0411111111','0211111113','greek@xx.os',0,'20041223',1,25,1,3,17); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (58, 2, 25); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (59, 3, 25); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (156,58,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (157,58,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (158,58,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (159,59,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (160,59,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (161,59,6); + +SET FOREIGN_KEY_CHECKS=1; + +SET FOREIGN_KEY_CHECKS=0; + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(26,null,'Welsh Workspace',26,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (26,26,'Welsh Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (11,11); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(26,'welsh','welsh','Dr','Welsh','Test','26','Welsh Ave',null,'Cardiff',null,'Wales','0211111111','0211111112','0411111111','0211111113','welsh@xx.os',0,'20041223',1,26,1,3,15); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (60, 2, 26); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (61, 3, 26); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (162,60,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (163,60,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (164,60,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (165,61,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (166,61,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (167,61,6); + +-- need a new workspace_id and the name changes for each user. +insert into lams_workspace_folder(workspace_folder_id,parent_folder_id,name,user_id,create_date_time,last_modified_date_time,lams_workspace_folder_type_id) +values(27,null,'Dutch Workspace',27,now(),now(),1); +insert into lams_workspace (workspace_id, default_fld_id, name) values (27,27,'Dutch Test'); +--insert into lams_workspace_folder (workspace_id, workspace_folder_id) values (11,11); + +insert into lams_user(user_id,login,password,title,first_name,last_name,address_line_1,address_line_2,address_line_3,city,state,country,day_phone,evening_phone,mobile_phone,fax,email,disabled_flag,create_date,authentication_method_id,workspace_id, flash_theme_id,html_theme_id,locale_id) +values(27,'dutch','dutch','Dr','Dutch','Test','26','Dutch Ave',null,'Amsterdam',null,'Netherlands','0211111111','0211111112','0411111111','0211111113','dutch@xx.os',0,'20041223',1,27,1,3,18); + +-- need a new user_organisation_id for each row, user_id must match user_id created in the lams_user +-- belongs to course Playpen, Class Everybody +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (62, 2, 27); +INSERT INTO lams_user_organisation (user_organisation_id, organisation_id, user_id) VALUES (63, 3, 27); + +-- need a new user_organisation_role_id for each row, use the same role_ids (3,5,6) for author, learner, teacher +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (168,62,3); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (169,62,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (170,62,6); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (171,63,4); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (172,63,5); +INSERT INTO lams_user_organisation_role (user_organisation_role_id, user_organisation_id, role_id) VALUES (173,63,6); + +SET FOREIGN_KEY_CHECKS=1; + + +update lams_user set password=SHA1(password) where user_id>8; Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_bulgarian.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_chinese.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_french.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_german.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_hungarian.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_italian.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_korean.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_maori.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_norwegian.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_polish.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_portbr.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_spanish.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_swedish.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/lams_user_thai.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/db/sql/shaun/sha1_shaun_user_password.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/commonContext.xml =================================================================== diff -u -ra07f122478a2eb187e7448fbfe41a738504e3f26 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/src/java/org/lamsfoundation/lams/commonContext.xml (.../commonContext.xml) (revision a07f122478a2eb187e7448fbfe41a738504e3f26) +++ lams_common/src/java/org/lamsfoundation/lams/commonContext.xml (.../commonContext.xml) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -32,8 +32,6 @@ org/lamsfoundation/lams/usermanagement/Organisation.hbm.xml org/lamsfoundation/lams/usermanagement/OrganisationState.hbm.xml org/lamsfoundation/lams/usermanagement/OrganisationType.hbm.xml - org/lamsfoundation/lams/usermanagement/Country.hbm.xml - org/lamsfoundation/lams/usermanagement/Language.hbm.xml org/lamsfoundation/lams/usermanagement/Role.hbm.xml org/lamsfoundation/lams/usermanagement/Privilege.hbm.xml org/lamsfoundation/lams/usermanagement/RolePrivilege.hbm.xml Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/usermanagement/Country.java'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c21c3386cec2ee819ba267d84d532676d2f4990d refers to a dead (removed) revision in file `lams_common/src/java/org/lamsfoundation/lams/usermanagement/Language.java'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_common/src/java/org/lamsfoundation/lams/usermanagement/Organisation.java =================================================================== diff -u -rd65ab06923c55ee76432bad9507f933ec442a671 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/src/java/org/lamsfoundation/lams/usermanagement/Organisation.java (.../Organisation.java) (revision d65ab06923c55ee76432bad9507f933ec442a671) +++ lams_common/src/java/org/lamsfoundation/lams/usermanagement/Organisation.java (.../Organisation.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -76,10 +76,8 @@ private OrganisationState organisationState; - private String localeLanguage; + private SupportedLocale locale; - private String localeCountry; - /** persistent field */ private Boolean courseAdminCanAddNewUsers; @@ -316,35 +314,7 @@ this.lessons = lessons; } - /** - * @hibernate.property - * column="locale_language" - * length="2" - * - */ - public String getLocaleLanguage() { - return this.localeLanguage; - } - - public void setLocaleLanguage(String localeLanguage) { - this.localeLanguage = localeLanguage; - } - - /** - * @hibernate.property - * column="locale_country" - * length="2" - * - */ - public String getLocaleCountry() { - return this.localeCountry; - } - - public void setLocaleCountry(String localeCountry) { - this.localeCountry = localeCountry; - } - - /** + /** * @hibernate.many-to-one * not-null="true" * @hibernate.column name="organisation_state_id" @@ -442,5 +412,19 @@ public OrganisationDTO getOrganisationDTO(){ return new OrganisationDTO(this); } + /** + * @hibernate.many-to-one + * not-null="true" + * lazy="false" + * @hibernate.column name="locale_id" + * @param localeCountry + */ + public SupportedLocale getLocale() { + return locale; + } + public void setLocale(SupportedLocale locale) { + this.locale = locale; + } + } Index: lams_common/src/java/org/lamsfoundation/lams/usermanagement/User.java =================================================================== diff -u -ra07f122478a2eb187e7448fbfe41a738504e3f26 -rc21c3386cec2ee819ba267d84d532676d2f4990d --- lams_common/src/java/org/lamsfoundation/lams/usermanagement/User.java (.../User.java) (revision a07f122478a2eb187e7448fbfe41a738504e3f26) +++ lams_common/src/java/org/lamsfoundation/lams/usermanagement/User.java (.../User.java) (revision c21c3386cec2ee819ba267d84d532676d2f4990d) @@ -100,9 +100,7 @@ private Boolean disabledFlag; /** persistent field */ - private String localeLanguage; - /** persistent field */ - private String localeCountry; + private SupportedLocale locale; /** persistent field */ private Date createDate; @@ -693,8 +691,8 @@ this.firstName, this.lastName, this.login, - this.localeLanguage, - this.localeCountry, + locale != null? locale.getLanguageIsoCode() : null, + locale != null? locale.getCountryIsoCode() : null, this.email, new CSSThemeBriefDTO(this.flashTheme), new CSSThemeBriefDTO(this.htmlTheme)); @@ -756,25 +754,17 @@ } /** - * @hibernate.property column="locale_country" length="2" + * @hibernate.many-to-one + * not-null="true" + * lazy="false" + * @hibernate.column name="locale_id" * @param localeCountry */ - public String getLocaleCountry() { - return localeCountry; + public SupportedLocale getLocale() { + return locale; } - public void setLocaleCountry(String localeCountry) { - this.localeCountry = localeCountry; + public void setLocale(SupportedLocale locale) { + this.locale = locale; } - /** - * @hibernate.property column="locale_language" length="2" - * @param localeCountry - */ - public String getLocaleLanguage() { - return localeLanguage; - } - - public void setLocaleLanguage(String localeLanguage) { - this.localeLanguage = localeLanguage; - } }