From: moodler Date: Thu, 1 Jul 2004 07:41:36 +0000 (+0000) Subject: Two new fields added to extend choice capabilities X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=283009c259f08a5a3f3b74e8ef803c677753bfb4;p=moodle.git Two new fields added to extend choice capabilities --- diff --git a/mod/choice/db/mysql.php b/mod/choice/db/mysql.php index bfb55165ce..6dd3e21cf2 100644 --- a/mod/choice/db/mysql.php +++ b/mod/choice/db/mysql.php @@ -33,6 +33,10 @@ function choice_upgrade($oldversion) { table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered"); table_column("choice", "", "timeopen", "integer", "10", "unsigned", "0", "", "showunanswered"); } + if ($oldversion < 2004070101) { + table_column("choice", "", "release", "integer", "2", "unsigned", "0", "", "publish"); + table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release"); + } return true; diff --git a/mod/choice/db/mysql.sql b/mod/choice/db/mysql.sql index a96a6f4547..8c2cbea745 100755 --- a/mod/choice/db/mysql.sql +++ b/mod/choice/db/mysql.sql @@ -27,6 +27,8 @@ CREATE TABLE prefix_choice ( answer5 varchar(255) default NULL, answer6 varchar(255) default NULL, publish tinyint(2) unsigned NOT NULL default '0', + release tinyint(2) unsigned NOT NULL default '0', + allowupdate tinyint(2) unsigned NOT NULL default '0', showunanswered tinyint(2) unsigned NOT NULL default '0', timeopen int(10) unsigned NOT NULL default '0', timeclose int(10) unsigned NOT NULL default '0', diff --git a/mod/choice/db/postgres7.php b/mod/choice/db/postgres7.php index d5911bd5f7..d74a4a8c06 100644 --- a/mod/choice/db/postgres7.php +++ b/mod/choice/db/postgres7.php @@ -19,6 +19,10 @@ function choice_upgrade($oldversion) { table_column("choice", "", "timeclose", "integer", "10", "unsigned", "0", "", "showunanswered"); table_column("choice", "", "timeopen", "integer", "10", "unsigned", "0", "", "showunanswered"); } + if ($oldversion < 2004070101) { + table_column("choice", "", "release", "integer", "2", "unsigned", "0", "", "publish"); + table_column("choice", "", "allowupdate", "integer", "2", "unsigned", "0", "", "release"); + } return true; } diff --git a/mod/choice/db/postgres7.sql b/mod/choice/db/postgres7.sql index 4e107bafee..114425c294 100755 --- a/mod/choice/db/postgres7.sql +++ b/mod/choice/db/postgres7.sql @@ -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', + release integer NOT NULL default '0', + allowupdate integer NOT NULL default '0', timeopen integer NOT NULL default '0', timeclose integer NOT NULL default '0', timemodified integer NOT NULL default '0' diff --git a/mod/choice/version.php b/mod/choice/version.php index 2d5a7710e1..473bb17e32 100644 --- a/mod/choice/version.php +++ b/mod/choice/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2004070100; +$module->version = 2004070101; $module->requires = 2004052501; // Requires this Moodle version $module->cron = 0;