Added field to versioning table needed by new versioning table (to be committed later)
This commit is contained in:
@@ -890,6 +890,11 @@ function quiz_upgrade($oldversion) {
|
||||
table_column('quiz_randomsamatch', '', 'shuffleanswers', 'tinyint', '4', 'unsigned', '1', 'not null', 'choose');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006021104) {
|
||||
// add originalversion field for the new versioning mechanism
|
||||
table_column('quiz_question_versions', '', 'originalquestion', 'int', '10', 'unsigned', '0', 'not null', 'newquestion');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -368,6 +368,7 @@ CREATE TABLE prefix_quiz_question_versions (
|
||||
quiz int(10) unsigned NOT NULL default '0',
|
||||
oldquestion int(10) unsigned NOT NULL default '0',
|
||||
newquestion int(10) unsigned NOT NULL default '0',
|
||||
originalquestion int(10) unsigned NOT NULL default '0',
|
||||
userid int(10) unsigned NOT NULL default '0',
|
||||
timestamp int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (id)
|
||||
|
||||
@@ -986,6 +986,11 @@ function quiz_upgrade($oldversion) {
|
||||
table_column('quiz_randomsamatch', '', 'shuffleanswers', 'tinyint', '4', 'unsigned', '1', 'not null', 'choose');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006021104) {
|
||||
// add originalversion field for the new versioning mechanism
|
||||
table_column('quiz_question_versions', '', 'originalquestion', 'int', '10', 'unsigned', '0', 'not null', 'newquestion');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -334,6 +334,7 @@ CREATE TABLE prefix_quiz_question_versions (
|
||||
quiz integer NOT NULL default '0',
|
||||
oldquestion integer NOT NULL default '0',
|
||||
newquestion integer NOT NULL default '0',
|
||||
originalquestion integer NOT NULL default '0',
|
||||
userid integer NOT NULL default '0',
|
||||
timestamp integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2006021103; // The (date) version of this module
|
||||
$module->version = 2006021104; // The (date) version of this module
|
||||
$module->requires = 2005021600; // Requires this Moodle version
|
||||
$module->cron = 0; // How often should cron check this module (seconds)?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user