Bladeren bron

Adding Db change for the iframe inclusion see #2159

Julio Montoya 12 jaren geleden
bovenliggende
commit
a68fb555be
2 gewijzigde bestanden met toevoegingen van 17 en 10 verwijderingen
  1. 11 8
      main/install/db_main.sql
  2. 6 2
      main/install/migrate-db-1.8.8-1.9.0-pre.sql

+ 11 - 8
main/install/db_main.sql

@@ -499,7 +499,7 @@ CREATE TABLE IF NOT EXISTS session_rel_course_rel_user (
   id_user int unsigned NOT NULL default '0',
   id_user int unsigned NOT NULL default '0',
   visibility int NOT NULL default 1,
   visibility int NOT NULL default 1,
   status int NOT NULL default 0,
   status int NOT NULL default 0,
-  legal_agreement INTEGER DEFAULT 0, 
+  legal_agreement INTEGER DEFAULT 0,
   PRIMARY KEY  (id_session,course_code,id_user),
   PRIMARY KEY  (id_session,course_code,id_user),
   KEY id_user (id_user),
   KEY id_user (id_user),
   KEY course_code (course_code)
   KEY course_code (course_code)
@@ -867,7 +867,8 @@ VALUES
 ('enable_enable_webcam_clip',NULL,'radio','Tools','false','EnableWebCamClipTitle','EnableWebCamClipComment',NULL,NULL, 0),
 ('enable_enable_webcam_clip',NULL,'radio','Tools','false','EnableWebCamClipTitle','EnableWebCamClipComment',NULL,NULL, 0),
 ('platform_unsubscribe_allowed', NULL, 'radio', 'Platform', 'false', 'PlatformUnsubscribeTitle', 'PlatformUnsubscribeComment', NULL, NULL, 1),
 ('platform_unsubscribe_allowed', NULL, 'radio', 'Platform', 'false', 'PlatformUnsubscribeTitle', 'PlatformUnsubscribeComment', NULL, NULL, 1),
 ('activate_email_template', NULL, 'radio', 'Platform', 'false', 'ActivateEmailTemplateTitle', 'ActivateEmailTemplateComment', NULL, NULL, 0),
 ('activate_email_template', NULL, 'radio', 'Platform', 'false', 'ActivateEmailTemplateTitle', 'ActivateEmailTemplateComment', NULL, NULL, 0),
-('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.18142','DatabaseVersion','', NULL, NULL, 0);
+('enable_iframe_inclusion', NULL, 'radio', 'Editor', 'false', 'EnableIframeInclusionTitle', 'EnableIframeInclusionComment', NULL, NULL, 1),
+('chamilo_database_version',NULL,'textfield',NULL, '1.9.0.18149','DatabaseVersion','', NULL, NULL, 0);
 
 
 
 
 /*
 /*
@@ -1167,7 +1168,7 @@ VALUES
 ('allow_users_to_change_email_with_no_password', 'true', 'Yes'),
 ('allow_users_to_change_email_with_no_password', 'true', 'Yes'),
 ('allow_users_to_change_email_with_no_password', 'false', 'No'),
 ('allow_users_to_change_email_with_no_password', 'false', 'No'),
 ('show_admin_toolbar', 'do_not_show', 'DoNotShow'),
 ('show_admin_toolbar', 'do_not_show', 'DoNotShow'),
-('show_admin_toolbar', 'show_to_admin', 'ShowToAdminsOnly'), 
+('show_admin_toolbar', 'show_to_admin', 'ShowToAdminsOnly'),
 ('show_admin_toolbar', 'show_to_admin_and_teachers', 'ShowToAdminsAndTeachers'),
 ('show_admin_toolbar', 'show_to_admin_and_teachers', 'ShowToAdminsAndTeachers'),
 ('show_admin_toolbar', 'show_to_all', 'ShowToAllUsers'),
 ('show_admin_toolbar', 'show_to_all', 'ShowToAllUsers'),
 ('use_custom_pages','true','Yes'),
 ('use_custom_pages','true','Yes'),
@@ -1219,7 +1220,9 @@ VALUES
 ('platform_unsubscribe_allowed', 'true', 'Yes'),
 ('platform_unsubscribe_allowed', 'true', 'Yes'),
 ('platform_unsubscribe_allowed', 'false', 'No'),
 ('platform_unsubscribe_allowed', 'false', 'No'),
 ('activate_email_template', 'true', 'Yes'),
 ('activate_email_template', 'true', 'Yes'),
-('activate_email_template', 'false', 'No');
+('activate_email_template', 'false', 'No'),
+ ('enable_iframe_inclusion', 'true', 'Yes'),
+('enable_iframe_inclusion', 'false', 'No');
 
 
 UNLOCK TABLES;
 UNLOCK TABLES;
 
 
@@ -2874,7 +2877,7 @@ CREATE TABLE IF NOT EXISTS skill_rel_user (
   user_id int NOT NULL,
   user_id int NOT NULL,
   skill_id int NOT NULL,
   skill_id int NOT NULL,
   acquired_skill_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
   acquired_skill_at datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
-  assigned_by int NOT NULL, 
+  assigned_by int NOT NULL,
   PRIMARY KEY (id)
   PRIMARY KEY (id)
 );
 );
 
 
@@ -2962,7 +2965,7 @@ CREATE TABLE IF NOT EXISTS track_course_ranking (
  id   int unsigned not null PRIMARY KEY AUTO_INCREMENT,
  id   int unsigned not null PRIMARY KEY AUTO_INCREMENT,
  c_id  int unsigned not null,
  c_id  int unsigned not null,
  session_id  int unsigned not null default 0,
  session_id  int unsigned not null default 0,
- url_id  int unsigned not null default 0, 
+ url_id  int unsigned not null default 0,
  accesses int unsigned not null default 0,
  accesses int unsigned not null default 0,
  total_score int unsigned not null default 0,
  total_score int unsigned not null default 0,
  users int unsigned not null default 0,
  users int unsigned not null default 0,
@@ -2978,7 +2981,7 @@ DROP TABLE IF EXISTS user_rel_course_vote;
 CREATE TABLE IF NOT EXISTS user_rel_course_vote (
 CREATE TABLE IF NOT EXISTS user_rel_course_vote (
   id int unsigned not null AUTO_INCREMENT PRIMARY KEY,
   id int unsigned not null AUTO_INCREMENT PRIMARY KEY,
   c_id int unsigned not null,
   c_id int unsigned not null,
-  user_id int unsigned not null,  
+  user_id int unsigned not null,
   session_id int unsigned not null default 0,
   session_id int unsigned not null default 0,
   url_id int unsigned not null default 0,
   url_id int unsigned not null default 0,
   vote int unsigned not null default 0
   vote int unsigned not null default 0
@@ -2997,7 +3000,7 @@ CREATE TABLE IF NOT EXISTS chat (
 	message		TEXT NOT NULL,
 	message		TEXT NOT NULL,
 	sent		DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
 	sent		DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
 	recd		INTEGER UNSIGNED NOT NULL DEFAULT 0,
 	recd		INTEGER UNSIGNED NOT NULL DEFAULT 0,
-	PRIMARY KEY (id)	
+	PRIMARY KEY (id)
 );
 );
 
 
 ALTER TABLE chat ADD INDEX idx_chat_to_user (to_user);
 ALTER TABLE chat ADD INDEX idx_chat_to_user (to_user);

+ 6 - 2
main/install/migrate-db-1.8.8-1.9.0-pre.sql

@@ -73,7 +73,7 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
 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('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_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');
 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');
--- Email is login 
+-- Email is login
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('login_is_email', NULL, 'radio', 'Platform', 'false', 'LoginIsEmailTitle', 'LoginIsEmailComment', NULL, NULL, 0);
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('login_is_email', NULL, 'radio', 'Platform', 'false', 'LoginIsEmailTitle', 'LoginIsEmailComment', NULL, NULL, 0);
 INSERT INTO settings_options (variable, value, display_text) VALUES ('login_is_email','true','Yes'),('login_is_email','false','No') ;
 INSERT INTO settings_options (variable, value, display_text) VALUES ('login_is_email','true','Yes'),('login_is_email','false','No') ;
 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_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);
@@ -167,6 +167,10 @@ INSERT INTO settings_current (variable, subkey, type, category, selected_value,
 INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_public_certificates', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_public_certificates', 'true', 'Yes');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_public_certificates', 'false', 'No');
 INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_public_certificates', 'false', 'No');
 
 
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('enable_iframe_inclusion', NULL, 'radio', 'Editor', 'false', 'EnableIframeInclusionTitle', 'EnableIframeInclusionComment', NULL, NULL, 1);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_iframe_inclusion', 'true', 'Yes');
+INSERT INTO settings_options (variable, value, display_text) VALUES ('enable_iframe_inclusion', 'false', 'No');
+
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('gradebook_default_weight', NULL, 'textfield', 'Gradebook', '100', 'GradebookDefaultWeightTitle', 'GradebookDefaultWeightComment', NULL, NULL, 1);
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('gradebook_default_weight', NULL, 'textfield', 'Gradebook', '100', 'GradebookDefaultWeightTitle', 'GradebookDefaultWeightComment', NULL, NULL, 1);
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('gradebook_default_grade_model_id', NULL, 'select', 'Gradebook', '', 'GradebookDefaultGradeModelTitle', 'GradebookDefaultGradeModelComment', NULL, NULL, 1);
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable) VALUES ('gradebook_default_grade_model_id', NULL, 'select', 'Gradebook', '', 'GradebookDefaultGradeModelTitle', 'GradebookDefaultGradeModelComment', NULL, NULL, 1);
 
 
@@ -251,7 +255,7 @@ INSERT INTO settings_options (variable, value, display_text) values ('platform_u
 
 
 
 
 -- Do not move this query
 -- Do not move this query
-UPDATE settings_current SET selected_value = '1.9.0.18142' WHERE variable = 'chamilo_database_version';
+UPDATE settings_current SET selected_value = '1.9.0.18149' WHERE variable = 'chamilo_database_version';
 
 
 -- xxSTATSxx
 -- xxSTATSxx
 ALTER TABLE track_e_exercices ADD COLUMN questions_to_check TEXT NOT NULL DEFAULT '';
 ALTER TABLE track_e_exercices ADD COLUMN questions_to_check TEXT NOT NULL DEFAULT '';