Skip to content

Commit

Permalink
Two new fields added to extend choice capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Jul 1, 2004
1 parent b9080b7 commit 283009c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mod/choice/db/mysql.php
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions mod/choice/db/mysql.sql
Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions mod/choice/db/postgres7.php
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions mod/choice/db/postgres7.sql
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion mod/choice/version.php
Expand Up @@ -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;

Expand Down

0 comments on commit 283009c

Please sign in to comment.