mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Added two fields for time restrictions on choices
This commit is contained in:
parent
40b4c871cf
commit
b9080b73c7
5 changed files with 14 additions and 1 deletions
|
@ -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', 'choice', 'name');");
|
||||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', '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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ CREATE TABLE prefix_choice (
|
||||||
answer6 varchar(255) default NULL,
|
answer6 varchar(255) default NULL,
|
||||||
publish tinyint(2) unsigned NOT NULL default '0',
|
publish tinyint(2) unsigned NOT NULL default '0',
|
||||||
showunanswered 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',
|
||||||
timemodified int(10) unsigned NOT NULL default '0',
|
timemodified int(10) unsigned NOT NULL default '0',
|
||||||
PRIMARY KEY (id),
|
PRIMARY KEY (id),
|
||||||
UNIQUE KEY id (id)
|
UNIQUE KEY id (id)
|
||||||
|
|
|
@ -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', 'choice', 'name');");
|
||||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('choice', 'choose again', '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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,8 @@ CREATE TABLE prefix_choice (
|
||||||
answer6 varchar(255) default NULL,
|
answer6 varchar(255) default NULL,
|
||||||
showunanswered integer NOT NULL default '0',
|
showunanswered integer NOT NULL default '0',
|
||||||
publish 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'
|
timemodified integer NOT NULL default '0'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
// This fragment is called by /admin/index.php
|
// This fragment is called by /admin/index.php
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
$module->version = 2004060400;
|
$module->version = 2004070100;
|
||||||
$module->requires = 2004052501; // Requires this Moodle version
|
$module->requires = 2004052501; // Requires this Moodle version
|
||||||
$module->cron = 0;
|
$module->cron = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue