Переглянути джерело

Create the settings_current teacher_can_select_course_template - refs #8134

Angel Fernando Quiroz Campos 9 роки тому
батько
коміт
d153b6fa7b

+ 48 - 0
app/Migrations/Schema/V111/Version20160331103600.php

@@ -0,0 +1,48 @@
+<?php
+/* For licensing terms, see /license.txt */
+
+namespace Application\Migrations\Schema\V111;
+
+use Application\Migrations\AbstractMigrationChamilo;
+use Doctrine\DBAL\Schema\Schema;
+
+/**
+ * Class Version20160331103600
+ */
+class Version20160331103600 extends AbstractMigrationChamilo
+{
+    /**
+     * @param Schema $schema
+     *
+     * @throws \Doctrine\DBAL\Schema\SchemaException
+     */
+    public function up(Schema $schema)
+    {
+        $this->addSettingCurrent(
+            'teacher_can_select_course_template',
+            null,
+            'radio',
+            'Course',
+            'true',
+            'TeacherCanSelectCourseTemplateTitle',
+            'TeacherCanSelectCourseTemplateComment',
+            null,
+            '',
+            1,
+            true,
+            false,
+            [
+                ['value' => 'true', 'text' => 'Yes'],
+                ['value' => 'false', 'text' => 'No'],
+            ]
+        );
+    }
+
+    /**
+     * @param Schema $schema
+     */
+    public function down(Schema $schema)
+    {
+        
+    }
+}

+ 13 - 2
main/install/data.sql

@@ -1802,7 +1802,7 @@ VALUES
 ('show_full_skill_name_on_skill_wheel', 'true', 'Yes'),
 ('show_full_skill_name_on_skill_wheel', 'false', 'No');
 
--- Version 1.10.0.52
+-- Version 1.11.0.1
 
 INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
 VALUES
@@ -1815,4 +1815,15 @@ VALUES
 ('messaging_allow_send_push_notification', 'true', 'Yes'),
 ('messaging_allow_send_push_notification', 'false', 'No');
 
-UPDATE settings_current SET selected_value = '1.10.0.52' WHERE variable = 'chamilo_database_version';
+-- Version 1.11.0.2
+
+INSERT INTO settings_current (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
+VALUES
+('teacher_can_select_course_template', NULL, 'radio', 'Course', 'false', 'TeacherCanSelectCourseTemplateTitle', 'TeacherCanSelectCourseTemplateComment', NULL, NULL, 0);
+
+INSERT INTO settings_options (variable, value, display_text)
+VALUES
+('teacher_can_select_course_template', 'true', 'Yes'),
+('teacher_can_select_course_template', 'false', 'No');
+
+UPDATE settings_current SET selected_value = '1.11.0.2' WHERE variable = 'chamilo_database_version';