mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
Make sure all random questions have their parent field correctly set, just in case something went wrong here in the past. This may have been the cause of bug 5137
This commit is contained in:
parent
7a0b035bf9
commit
955567ad2f
@ -1007,6 +1007,10 @@ function quiz_upgrade($oldversion) {
|
||||
table_column('question_sessions', '', 'comment', 'text', '', '', '', 'not null', 'sumpenalty');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006040900) {
|
||||
modify_database('', "UPDATE prefix_question SET parent = id WHERE qtype ='random';");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1176,6 +1176,10 @@ function quiz_upgrade($oldversion) {
|
||||
table_column('question_sessions', '', 'comment', 'text', '', '', '', 'not null', 'sumpenalty');
|
||||
}
|
||||
|
||||
if ($oldversion < 2006040900) {
|
||||
modify_database('', "UPDATE prefix_question SET parent = id WHERE qtype ='random';");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2006040600; // The (date) version of this module
|
||||
$module->version = 2006040900; // The (date) version of this module
|
||||
$module->requires = 2006022400; // Requires this Moodle version
|
||||
$module->cron = 0; // How often should cron check this module (seconds)?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user