mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
MDL-79863 qtype_ordering: qtype_ordering force standard settings for Ordering questions used by Reader quizzes
This commit is contained in:
parent
2d45d4ebf3
commit
2a42f03832
@ -185,7 +185,7 @@ function xmldb_qtype_ordering_upgrade($oldversion) {
|
||||
upgrade_plugin_savepoint(true, $newversion, 'qtype', 'ordering');
|
||||
}
|
||||
|
||||
$newversion = 2016032947;
|
||||
$newversion = 2016032949;
|
||||
if ($oldversion < $newversion) {
|
||||
if ($dbman->table_exists('reader_question_instances')) {
|
||||
$select = 'rqi.question, COUNT(*) AS countquestion';
|
||||
@ -202,8 +202,12 @@ function xmldb_qtype_ordering_upgrade($oldversion) {
|
||||
$DB->set_field_select($table, 'layouttype', 0, $select, $params); // VERTICAL
|
||||
$DB->set_field_select($table, 'selecttype', 1, $select, $params); // RANDOM
|
||||
$DB->set_field_select($table, 'gradingtype', 1, $select, $params); // RELATIVE
|
||||
// Note don't set selectcount to 6, because
|
||||
// Ordering questions for some low level books use 4
|
||||
|
||||
// for selectcount, we only fix the value, if it is zero (=ALL)
|
||||
// because Ordering questions for some low level books use 4
|
||||
$select .= ' AND selectcount = ?';
|
||||
$params[] = 0;
|
||||
$DB->set_field_select($table, 'selectcount', 6, $select, $params); // 6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,5 +31,5 @@ $plugin->cron = 0;
|
||||
$plugin->component = 'qtype_ordering';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->requires = 2010112400; // Moodle 2.0
|
||||
$plugin->version = 2016032948;
|
||||
$plugin->release = '2016-03-29 (48)';
|
||||
$plugin->version = 2016032949;
|
||||
$plugin->release = '2016-03-29 (49)';
|
||||
|
Loading…
x
Reference in New Issue
Block a user