]> git.mjollnir.org Git - moodle.git/commitdiff
Added two fields for time restrictions on choices
authormoodler <moodler>
Thu, 1 Jul 2004 07:01:26 +0000 (07:01 +0000)
committermoodler <moodler>
Thu, 1 Jul 2004 07:01:26 +0000 (07:01 +0000)
mod/choice/db/mysql.php
mod/choice/db/mysql.sql
mod/choice/db/postgres7.php
mod/choice/db/postgres7.sql
mod/choice/version.php

index f3313ed5fa2f1055be2d8db4b967ae18a1739649..bfb55165cef64f181279f87559c977002157c5f9 100644 (file)
@@ -29,6 +29,11 @@ function choice_upgrade($oldversion) {
         modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
         modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
     }
+    if ($oldversion < 2004070100) {
+        table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered");
+        table_column("choice", "", "timeopen", "integer", "10", "unsigned", "0", "", "showunanswered");
+    }
+
 
     return true;
 }
index c43cd39974e38dd59bd025cb27f218d0b9a7818b..a96a6f4547da906b4d8bf45282440c9e16e554af 100755 (executable)
@@ -28,6 +28,8 @@ CREATE TABLE prefix_choice (
   answer6 varchar(255) default NULL,\r
   publish tinyint(2) unsigned NOT NULL default '0',\r
   showunanswered tinyint(2) unsigned NOT NULL default '0',\r
+  timeopen int(10) unsigned NOT NULL default '0',\r
+  timeclose int(10) unsigned NOT NULL default '0',\r
   timemodified int(10) unsigned NOT NULL default '0',\r
   PRIMARY KEY  (id),\r
   UNIQUE KEY id (id)\r
index 04fc87a8d330aca8b7216416e4d092c712f25fb0..d5911bd5f7513238dff925972af36d2d7cc7605f 100644 (file)
@@ -15,6 +15,10 @@ function choice_upgrade($oldversion) {
         modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose', 'choice', 'name');");
         modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', 'choice', 'name');");
     }
+    if ($oldversion < 2004070100) {
+        table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered");
+        table_column("choice", "", "timeopen", "integer", "10", "unsigned", "0", "", "showunanswered");
+    }
 
     return true;
 }
index ec08c37e385e309d111f142eb93ffe7e05266db5..4e107bafee846e18c6b2ef1cf88ab41ee625ec71 100755 (executable)
@@ -28,6 +28,8 @@ CREATE TABLE prefix_choice (
   answer6 varchar(255) default NULL,
   showunanswered integer NOT NULL default '0',
   publish integer NOT NULL default '0',
+  timeopen integer NOT NULL default '0',
+  timeclose integer NOT NULL default '0',
   timemodified integer NOT NULL default '0'
 );
 
index f9049c7880e4d41b7a3f9a53d4b9c281340062b6..2d5a7710e1229e78cc261863173c08fb6b4c4e5e 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2004060400;
+$module->version  = 2004070100;
 $module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;