Kaynağa Gözat

[svn r16921] Added general option to prevent course creation

Isaac Flores 16 yıl önce
ebeveyn
işleme
d2d9d6b7bf
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      main/install/migrate-db-1.8.5-1.8.6-pre.sql

+ 6 - 2
main/install/migrate-db-1.8.5-1.8.6-pre.sql

@@ -39,7 +39,9 @@ CREATE TABLE gradebook_result_log (id int NOT NULL auto_increment,id_result int
 CREATE TABLE gradebook_linkeval_log (id int NOT NULL auto_increment,id_linkeval_log int NOT NULL,name text,description text,date_log datetime default '0000-00-00 00:00:00',weight smallint default NULL,visible tinyint default NULL,type varchar(20) NOT NULL,user_id_log int NOT NULL,PRIMARY KEY  (id));
 INSERT INTO course_module (name, link, image, `row`, `column`, position) VALUES ('glossary','glossary/index.php','file_txt.gif',2,1,'basic');
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url, access_url_changeable) VALUES ('course_create_active_tools','glossary','checkbox','Tools','true','CourseCreateActiveToolsTitle','CourseCreateActiveToolsComment',NULL,'Glossary',1,0);
-
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext) VALUES ('allow_users_to_create_courses',NULL,'radio','Course','true','AllowUsersToCreateCoursesTitle','AllowUsersToCreateCoursesComment',NULL,NULL);
+INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_users_to_create_courses','true','Yes'),('allow_users_to_create_courses','false','No');
+
 -- xxSTATSxx
 ALTER TABLE track_e_exercices ADD status varchar(20) NOT NULL default '';
 ALTER TABLE track_e_exercices ADD data_tracking text NOT NULL default '';
@@ -120,6 +122,8 @@ UPDATE forum_notification SET forum_id=NULL WHERE forum_id='';
 ALTER TABLE forum_notification CHANGE forum_id forum_id INT NULL;
 UPDATE forum_notification SET thread_id=NULL WHERE thread_id='';
 ALTER TABLE forum_notification CHANGE thread_id thread_id INT NULL;
-UPDATE forum_notification SET post_id=NULL WHERE post_id='';
+UPDATE forum_notification SET post_id=NULL WHERE post_id='';
+ALTER TABLE forum_notification CHANGE post_id post_id INT NULL;
+ALTER TABLE forum_thread ADD thread_weight smallint default 0;
 ALTER TABLE forum_notification CHANGE post_id post_id INT NULL;
 ALTER TABLE quiz_answer CHANGE hotspot_coordinates hotspot_coordinates text;