@ -22,7 +22,7 @@ ALTER TABLE session_rel_user ADD COLUMN relation_type int NOT NULL default 0;
ALTER TABLE course_rel_user ADD COLUMN relation_type int NOT NULL default 0 ;
ALTER TABLE course_rel_user ADD COLUMN relation_type int NOT NULL default 0 ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url , access_url_changeable ) VALUES ( ' course_create_active_tools ' , ' notebook ' , ' checkbox ' , ' Tools ' , ' true ' , ' CourseCreateActiveToolsTitle ' , ' CourseCreateActiveToolsComment ' , NULL , ' Notebook ' , 1 , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url , access_url_changeable ) VALUES ( ' course_create_active_tools ' , ' notebook ' , ' checkbox ' , ' Tools ' , ' true ' , ' CourseCreateActiveToolsTitle ' , ' CourseCreateActiveToolsComment ' , NULL , ' Notebook ' , 1 , 0 ) ;
ALTER TABLE course DROP PRIMARY KEY , ADD UNIQUE KEY code ( code ) ;
ALTER TABLE course DROP PRIMARY KEY , ADD UNIQUE KEY code ( code ) ;
ALTER TABLE course ADD id int NOT NULL auto_increment PRIMARY KEY FIRST ;
ALTER TABLE course ADD id int NOT NULL auto_increment PRIMARY KEY FIRST ;
CREATE TABLE block ( id INT NOT NULL auto_increment , name VARCHAR ( 255 ) NULL , description TEXT NULL , path VARCHAR ( 255 ) NOT NULL , controller VARCHAR ( 100 ) NOT NULL , active TINYINT NOT NULL default 1 , PRIMARY KEY ( id ) ) ;
CREATE TABLE block ( id INT NOT NULL auto_increment , name VARCHAR ( 255 ) NULL , description TEXT NULL , path VARCHAR ( 255 ) NOT NULL , controller VARCHAR ( 100 ) NOT NULL , active TINYINT NOT NULL default 1 , PRIMARY KEY ( id ) ) ;
ALTER TABLE block ADD UNIQUE ( path ) ;
ALTER TABLE block ADD UNIQUE ( path ) ;
@ -88,16 +88,84 @@ INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_user
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' show_link_bug_notification ' , NULL , ' radio ' , ' Platform ' , ' true ' , ' ShowLinkBugNotificationTitle ' , ' ShowLinkBugNotificationComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' show_link_bug_notification ' , NULL , ' radio ' , ' Platform ' , ' true ' , ' ShowLinkBugNotificationTitle ' , ' ShowLinkBugNotificationComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' show_link_bug_notification ' , ' true ' , ' Yes ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' show_link_bug_notification ' , ' true ' , ' Yes ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' show_link_bug_notification ' , ' false ' , ' No ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' show_link_bug_notification ' , ' false ' , ' No ' ) ;
-- CAS
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_activate ' , NULL , ' radio ' , ' CAS ' , ' false ' , ' CasMainActivateTitle ' , ' CasMainActivateComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_activate ' , ' true ' , ' Yes ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_activate ' , ' false ' , ' No ' ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_server ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasMainServerTitle ' , ' CasMainServerComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_server_uri ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasMainServerURITitle ' , ' CasMainServerURIComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_port ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasMainPortTitle ' , ' CasMainPortComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_protocol ' , NULL , ' radio ' , ' CAS ' , ' ' , ' CasMainProtocolTitle ' , ' CasMainProtocolComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_protocol ' , ' CAS1 ' , ' CAS1Text ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_protocol ' , ' CAS2 ' , ' CAS2Text ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_protocol ' , ' SAML ' , ' SAMLText ' ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_add_user_activate ' , NULL , ' radio ' , ' CAS ' , ' ' , ' CasUserAddActivateTitle ' , ' CasUserAddActivateComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_add_user_activate ' , ' true ' , ' Yes ' ) ;
INSERT INTO settings_options ( variable , value , display_text ) values ( ' cas_add_user_activate ' , ' false ' , ' No ' ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_add_user_login_attr ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasUserAddLoginAttributeTitle ' , ' CasUserAddLoginAttributeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_add_user_email_attr ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasUserAddEmailAttributeTitle ' , ' CasUserAddEmailAttributeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_add_user_firstname_attr ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasUserAddFirstnameAttributeTitle ' , ' CasUserAddFirstnameAttributeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' cas_add_user_lastname_attr ' , NULL , ' textfield ' , ' CAS ' , ' ' , ' CasUserAddLastnameAttributeTitle ' , ' CasUserAddLastnameAttributeComment ' , NULL , NULL , 0 ) ;
-- Custom Pages
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' use_custom_pages ' , ' true ' , ' Yes ' ) , ( ' use_custom_pages ' , ' false ' , ' No ' ) ;
INSERT INTO settings_current ( variable , type , category , selected_value , title , comment , scope ) VALUES ( ' use_custom_pages ' , ' radio ' , ' Platform ' , ' false ' , ' UseCustomPages ' , ' UseCustomPagesComment ' , ' platform ' ) ;
ALTER TABLE gradebook_score_display ADD category_id int NOT NULL DEFAULT 0 ;
ALTER TABLE gradebook_score_display ADD category_id int NOT NULL DEFAULT 0 ;
ALTER TABLE gradebook_score_display ADD INDEX ( category_id ) ;
ALTER TABLE gradebook_score_display ADD INDEX ( category_id ) ;
ALTER TABLE gradebook_score_display ADD score_color_percent float unsigned NOT NULL DEFAULT 0 ;
ALTER TABLE gradebook_score_display ADD score_color_percent float unsigned NOT NULL DEFAULT 0 ;
-- CBlue custom
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' student_page_after_login ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' StudentPageAfterLoginTitle ' , ' StudentPageAfterLoginComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' teacher_page_after_login ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' TeacherPageAfterLoginTitle ' , ' TeacherPageAfterLoginComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' DRH_page_after_login ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' DRHPageAfterLoginTitle ' , ' DRHPageAfterLoginComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' sessionadmin_page_after_login ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' SessionAdminPageAfterLoginTitle ' , ' SessionAdminPageAfterLoginComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' student_autosubscribe ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' StudentAutosubscribeTitle ' , ' StudentAutosubscribeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' teacher_autosubscribe ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' TeacherAutosubscribeTitle ' , ' TeacherAutosubscribeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' DRH_autosubscribe ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' DRHAutosubscribeTitle ' , ' DRHAutosubscribeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' sessionadmin_autosubscribe ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' SessionadminAutosubscribeTitle ' , ' SessionadminAutosubscribeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' show_tabs ' , ' custom_tab_1 ' , ' checkbox ' , ' Platform ' , ' true ' , ' ShowTabsTitle ' , ' ShowTabsComment ' , NULL , ' TabsCustom1 ' , 1 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' show_tabs ' , ' custom_tab_2 ' , ' checkbox ' , ' Platform ' , ' false ' , ' ShowTabsTitle ' , ' ShowTabsComment ' , NULL , ' TabsCustom2 ' , 1 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' show_tabs ' , ' custom_tab_3 ' , ' checkbox ' , ' Platform ' , ' false ' , ' ShowTabsTitle ' , ' ShowTabsComment ' , NULL , ' TabsCustom3 ' , 1 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_1_name ' , NULL , ' textfield ' , ' Platform ' , ' Reports ' , ' CustomTab1NameTitle ' , ' CustomTab1NameComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_1_url ' , NULL , ' textfield ' , ' Platform ' , ' /main/reports/ ' , ' CustomTab1URLTitle ' , ' CustomTab1URLComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_2_name ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' CustomTab2NameTitle ' , ' CustomTab2NameComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_2_url ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' CustomTab2URLTitle ' , ' CustomTab2URLComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_3_name ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' CustomTab3NameTitle ' , ' CustomTab3NameComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' custom_tab_3_url ' , NULL , ' textfield ' , ' Platform ' , ' ' , ' CustomTab3URLTitle ' , ' CustomTab3URLComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' scorm_cumulative_session_time ' , NULL , ' radio ' , ' Course ' , ' true ' , ' ScormCumulativeSessionTimeTitle ' , ' ScormCumulativeSessionTimeComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' scorm_cumulative_session_time ' , ' true ' , ' Yes ' ) , ( ' scorm_cumulative_session_time ' , ' false ' , ' No ' ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' activate_send_event_by_mail ' , NULL , ' radio ' , ' Platform ' , ' false ' , ' ActivateSendEventByMailTitle ' , ' ActivateSendEventByMailComment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' activate_send_event_by_mail ' , ' true ' , ' Yes ' ) , ( ' activate_send_event_by_mail ' , ' false ' , ' No ' ) ;
CREATE TABLE ` event_type ` ( ` id ` int ( 11 ) NOT NULL AUTO_INCREMENT , ` name ` varchar ( 50 ) NOT NULL , ` name_lang_var ` varchar ( 40 ) NOT NULL , ` desc_lang_var ` varchar ( 50 ) NOT NULL , PRIMARY KEY ( ` id ` ) ) ;
CREATE TABLE ` event_type_message ` ( ` id ` int ( 11 ) NOT NULL AUTO_INCREMENT , ` event_type_id ` int ( 11 ) NOT NULL , ` language_id ` int ( 11 ) NOT NULL , ` message ` varchar ( 200 ) NOT NULL , ` subject ` varchar ( 60 ) NOT NULL , PRIMARY KEY ( ` id ` ) ) ;
CREATE TABLE ` user_rel_event_type ` ( ` id ` int ( 11 ) NOT NULL AUTO_INCREMENT , ` user_id ` int ( 11 ) NOT NULL , ` event_type_id ` int ( 11 ) NOT NULL , PRIMARY KEY ( ` id ` ) ) ;
INSERT INTO ` event_type ` VALUES ( 1 , ' course_deleted ' , ' courseDeletedTitle ' , ' courseDeletedComment ' ) , ( 2 , ' course_created ' , ' courseCreatedTitle ' , ' courseCreatedComment ' ) , ( 3 , ' user_deleted ' , ' userDeletedTitle ' , ' userDeletedComment ' ) , ( 4 , ' user_created ' , ' userCreatedTitle ' , ' userCreatedComment ' ) , ( 5 , ' session_created ' , ' sessionCreatedTitle ' , ' sessionCreatedComment ' ) , ( 6 , ' session_deleted ' , ' sessionDeletedTitle ' , ' sessionDeletedComment ' ) , ( 7 , ' session_category_created ' , ' sessionCategoryCreatedTitle ' , ' sessionCategoryCreatedComment ' ) , ( 8 , ' session_category_deleted ' , ' sessionCategoryDeletedTitle ' , ' sessionCategoryDeletedComment ' ) , ( 9 , ' settings_changed ' , ' settingsChangedTitle ' , ' settingsChangedComment ' ) , ( 10 , ' user_subscribed ' , ' userSubscribedTitle ' , ' userSubscribedComment ' ) , ( 11 , ' user_unsubscribed ' , ' userUnsubscribedTitle ' , ' userUnsubscribedComment ' ) ;
INSERT INTO ` event_type_message ` ( ` id ` , ` event_type_id ` , ` language_id ` , ` message ` , ` subject ` ) VALUES ( 1 , 4 , 10 , ' Bonjour, \r\n\r\nL\ ' utilisateur % username % ( % firstname % % lastname % ) a é té créé . \ r \ nEmail : % mail % \ r \ n \ r \ nBien à vous . ' , '' ),(2,1,10, ' Delete formation ' , '' ),(3,2,10, ' Create formation ' , '' ),(4,3,10, ' Bonjour , \ r \ n \ r \ nL \ ' utilisateur %username% (%firstname% %lastname%) a été supprimé.\r\n\r\nBien à vous. ' , ' ' ) , ( 6 , 5 , 10 , ' Create session test ' , ' ' ) , ( 7 , 6 , 10 , ' Delete session ' , ' ' ) , ( 8 , 7 , 10 , ' Create category session ' , ' ' ) , ( 9 , 8 , 10 , ' Delete category session ' , ' ' ) , ( 10 , 9 , 10 , ' Change setting ' , ' ' ) , ( 11 , 10 , 10 , ' Subscribe ' , ' ' ) , ( 12 , 11 , 10 , ' Unsubscribe ' , ' ' ) ;
INSERT INTO user_field ( field_type , field_variable , field_display_text , field_visible , field_changeable ) values ( 1 , ' already_logged_in ' , ' Already logged in ' , 0 , 0 ) ;
CREATE TABLE announcement_rel_group ( group_id int NOT NULL , announcement_id int NOT NULL , PRIMARY KEY ( group_id , announcement_id ) ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' languagePriority1 ' , NULL , ' radio ' , ' Languages ' , ' course_lang ' , ' LanguagePriority1Title ' , ' LanguagePriority1Comment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' languagePriority2 ' , NULL , ' radio ' , ' Languages ' , ' user_profil_lang ' , ' LanguagePriority2Title ' , ' LanguagePriority2Comment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' languagePriority3 ' , NULL , ' radio ' , ' Languages ' , ' user_selected_lang ' , ' LanguagePriority3Title ' , ' LanguagePriority3Comment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_current ( variable , subkey , type , category , selected_value , title , comment , scope , subkeytext , access_url_changeable ) VALUES ( ' languagePriority4 ' , NULL , ' radio ' , ' Languages ' , ' platform_lang ' , ' LanguagePriority4Title ' , ' LanguagePriority4Comment ' , NULL , NULL , 0 ) ;
INSERT INTO settings_options ( variable , value , display_text ) VALUES ( ' languagePriority1 ' , ' platform_lang ' , ' PlatformLanguage ' ) , ( ' languagePriority1 ' , ' user_profil_lang ' , ' UserLanguage ' ) , ( ' languagePriority1 ' , ' user_selected_lang ' , ' UserSelectedLanguage ' ) , ( ' languagePriority1 ' , ' course_lang ' , ' CourseLanguage ' ) , ( ' languagePriority2 ' , ' platform_lang ' , ' PlatformLanguage ' ) , ( ' languagePriority2 ' , ' user_profil_lang ' , ' UserLanguage ' ) , ( ' languagePriority2 ' , ' user_selected_lang ' , ' UserSelectedLanguage ' ) , ( ' languagePriority2 ' , ' course_lang ' , ' CourseLanguage ' ) , ( ' languagePriority3 ' , ' platform_lang ' , ' PlatformLanguage ' ) , ( ' languagePriority3 ' , ' user_profil_lang ' , ' UserLanguage ' ) , ( ' languagePriority3 ' , ' user_selected_lang ' , ' UserSelectedLanguage ' ) , ( ' languagePriority3 ' , ' course_lang ' , ' CourseLanguage ' ) , ( ' languagePriority4 ' , ' platform_lang ' , ' PlatformLanguage ' ) , ( ' languagePriority4 ' , ' user_profil_lang ' , ' UserLanguage ' ) , ( ' languagePriority4 ' , ' user_selected_lang ' , ' UserSelectedLanguage ' ) , ( ' languagePriority4 ' , ' course_lang ' , ' CourseLanguage ' ) ;
--
-- Table structure for LP custom storage API
- -
CREATE TABLE stored_values ( user_id INT NOT NULL , sco_id INT NOT NULL , course_id CHAR ( 40 ) NOT NULL , sv_key CHAR ( 64 ) NOT NULL , sv_value TEXT NOT NULL ) ;
ALTER TABLE stored_values ADD KEY ( user_id , sco_id , course_id , sv_key ) ;
ALTER TABLE stored_values ADD UNIQUE ( user_id , sco_id , course_id , sv_key ) ;
CREATE TABLE stored_values_stack ( user_id INT NOT NULL , sco_id INT NOT NULL , stack_order INT NOT NULL , course_id CHAR ( 40 ) NOT NULL , sv_key CHAR ( 64 ) NOT NULL , sv_value TEXT NOT NULL ) ;
ALTER TABLE stored_values_stack ADD KEY ( user_id , sco_id , course_id , sv_key , stack_order ) ;
ALTER TABLE stored_values_stack ADD UNIQUE ( user_id , sco_id , course_id , sv_key , stack_order ) ;
-- xxSTATSxx
-- xxSTATSxx
CREATE TABLE track_e_item_property ( id int NOT NULL auto_increment PRIMARY KEY , course_id int NOT NULL , item_property_id int NOT NULL , title varchar ( 255 ) , content text , progress int NOT NULL default 0 , lastedit_date datetime NOT NULL default ' 0000-00-00 00:00:00 ' , lastedit_user_id int NOT NULL , session_id int NOT NULL default 0 ) ;
CREATE TABLE track_e_item_property ( id int NOT NULL auto_increment PRIMARY KEY , course_id int NOT NULL , item_property_id int NOT NULL , title varchar ( 255 ) , content text , progress int NOT NULL default 0 , lastedit_date datetime NOT NULL default ' 0000-00-00 00:00:00 ' , lastedit_user_id int NOT NULL , session_id int NOT NULL default 0 ) ;
ALTER TABLE track_e_item_property ADD INDEX ( course_id , item_property_id , session_id ) ;
ALTER TABLE track_e_item_property ADD INDEX ( course_id , item_property_id , session_id ) ;
ALTER TABLE track_e_access ADD access_session_id INT NOT NULL DEFAULT 0 ;
ALTER TABLE track_e_access ADD access_session_id INT NOT NULL DEFAULT 0 ;
ALTER TABLE track_e_access ADD INDEX ( access_session_id ) ;
ALTER TABLE track_e_access ADD INDEX ( access_session_id ) ;
ALTER TABLE track_e_course_access ADD session_id INT NOT NULL DEFAULT 0 ;
ALTER TABLE track_e_course_access ADD session_id INT NOT NULL DEFAULT 0 ;
ALTER TABLE track_e_course_access ADD INDEX ( session_id ) ;
ALTER TABLE track_e_course_access ADD INDEX ( session_id ) ;
ALTER TABLE track_e_downloads ADD down_session_id INT NOT NULL DEFAULT 0 ;
ALTER TABLE track_e_downloads ADD down_session_id INT NOT NULL DEFAULT 0 ;
@ -114,6 +182,11 @@ ALTER TABLE track_e_attempt_recording ADD session_id INT NOT NULL DEFAULT 0;
ALTER TABLE track_e_attempt_recording ADD INDEX ( question_id ) ;
ALTER TABLE track_e_attempt_recording ADD INDEX ( question_id ) ;
ALTER TABLE track_e_attempt_recording ADD INDEX ( session_id ) ;
ALTER TABLE track_e_attempt_recording ADD INDEX ( session_id ) ;
ALTER TABLE track_e_online ADD COLUMN access_url_id INT NOT NULL DEFAULT 1 ;
ALTER TABLE track_e_online ADD COLUMN access_url_id INT NOT NULL DEFAULT 1 ;
-- Groups can have subgroups
CREATE TABLE group_rel_group ( id int NOT NULL AUTO_INCREMENT , group_id int NOT NULL , subgroup_id int NOT NULL , relation_type int NOT NULL , PRIMARY KEY ( id ) ) ;
ALTER TABLE group_rel_group ADD INDEX ( group_id ) ;
ALTER TABLE group_rel_group ADD INDEX ( subgroup_id ) ;
ALTER TABLE group_rel_group ADD INDEX ( relation_type ) ;
-- xxUSERxx
-- xxUSERxx
@ -137,9 +210,9 @@ ALTER TABLE lp_view ADD INDEX(session_id);
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' allow_user_view_user_list ' , 1 , ' user ' ) ;
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' allow_user_view_user_list ' , 1 , ' user ' ) ;
ALTER TABLE tool_intro ADD COLUMN session_id INT NOT NULL DEFAULT 0 AFTER intro_text , DROP PRIMARY KEY , ADD PRIMARY KEY USING BTREE ( id , session_id ) ;
ALTER TABLE tool_intro ADD COLUMN session_id INT NOT NULL DEFAULT 0 AFTER intro_text , DROP PRIMARY KEY , ADD PRIMARY KEY USING BTREE ( id , session_id ) ;
CREATE TABLE thematic ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , title VARCHAR ( 255 ) NOT NULL , content TEXT NULL , display_order int unsigned not null default 0 , active TINYINT NOT NULL default 0 , session_id INT NOT NULL DEFAULT 0 ) ;
CREATE TABLE thematic ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , title VARCHAR ( 255 ) NOT NULL , content TEXT NULL , display_order int unsigned not null default 0 , active TINYINT NOT NULL default 0 , session_id INT NOT NULL DEFAULT 0 ) ;
ALTER TABLE thematic ADD INDEX ( active , session_id ) ;
ALTER TABLE thematic ADD INDEX ( active , session_id ) ;
CREATE TABLE thematic_plan ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , thematic_id INT NOT NULL , title VARCHAR ( 255 ) NOT NULL , description TEXT NULL , description_type INT NOT NULL ) ;
CREATE TABLE thematic_plan ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , thematic_id INT NOT NULL , title VARCHAR ( 255 ) NOT NULL , description TEXT NULL , description_type INT NOT NULL ) ;
ALTER TABLE thematic_plan ADD INDEX ( thematic_id , description_type ) ;
ALTER TABLE thematic_plan ADD INDEX ( thematic_id , description_type ) ;
CREATE TABLE thematic_advance ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , thematic_id INT NOT NULL , attendance_id INT NOT NULL DEFAULT 0 , content TEXT NOT NULL , start_date DATETIME NOT NULL DEFAULT ' 0000-00-00 00:00:00 ' , duration INT NOT NULL DEFAULT 0 , done_advance tinyint NOT NULL DEFAULT 0 ) ;
CREATE TABLE thematic_advance ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , thematic_id INT NOT NULL , attendance_id INT NOT NULL DEFAULT 0 , content TEXT NOT NULL , start_date DATETIME NOT NULL DEFAULT ' 0000-00-00 00:00:00 ' , duration INT NOT NULL DEFAULT 0 , done_advance tinyint NOT NULL DEFAULT 0 ) ;
ALTER TABLE thematic_advance ADD INDEX ( thematic_id ) ;
ALTER TABLE thematic_advance ADD INDEX ( thematic_id ) ;
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' display_info_advance_inside_homecourse ' , 1 , ' thematic_advance ' ) ;
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' display_info_advance_inside_homecourse ' , 1 , ' thematic_advance ' ) ;
@ -149,3 +222,8 @@ ALTER TABLE student_publication MODIFY COLUMN description TEXT DEFAULT NULL;
ALTER TABLE student_publication ADD COLUMN user_id INTEGER NOT NULL AFTER session_id ;
ALTER TABLE student_publication ADD COLUMN user_id INTEGER NOT NULL AFTER session_id ;
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' email_alert_students_on_new_homework ' , 0 , ' work ' ) ;
INSERT INTO course_setting ( variable , value , category ) VALUES ( ' email_alert_students_on_new_homework ' , 0 , ' work ' ) ;
ALTER TABLE course_setting DROP INDEX unique_setting ;
ALTER TABLE course_setting DROP INDEX unique_setting ;
-- CBlue custom
ALTER TABLE lp ADD COLUMN hide_toc_frame TINYINT NOT NULL DEFAULT 0 ;
ALTER TABLE lp ADD COLUMN seriousgame_mode TINYINT NOT NULL DEFAULT 0 ;
alter table lp_item_view modify column suspend_data longtext ;