}
if ($oldversion < 2006032100) {
+ // change from the old questiontype numbers to using the questiontype names
table_column('question', 'qtype', 'qtype', 'varchar', 20, '', '', 'not null');
set_field('question', 'qtype', 'shortanswer', 'qtype', 1);
set_field('question', 'qtype', 'truefalse', 'qtype', 2);
set_field('question', 'qtype', 'essay', 'qtype', 12);
}
+ if ($oldversion < 2006032200) {
+ // set version for all questiontypes that already have their tables installed
+ set_config('qtype_calculated_version', 2006032100);
+ set_config('qtype_essay_version', 2006032100);
+ set_config('qtype_match_version', 2006032100);
+ set_config('qtype_multianswer_version', 2006032100);
+ set_config('qtype_multichoice_version', 2006032100);
+ set_config('qtype_numerical_version', 2006032100);
+ set_config('qtype_randomsamatch_version', 2006032100);
+ set_config('qtype_rqp_version', 2006032100);
+ set_config('qtype_shortanswer_version', 2006032100);
+ set_config('qtype_truefalse_version', 2006032100);
+ }
+
return true;
}
}
if ($oldversion < 2006032100) {
+ // change from the old questiontype numbers to using the questiontype names
table_column('question', 'qtype', 'qtype', 'varchar', 20, '', '', 'not null');
set_field('question', 'qtype', 'shortanswer', 'qtype', 1);
set_field('question', 'qtype', 'truefalse', 'qtype', 2);
set_field('question', 'qtype', 'essay', 'qtype', 12);
}
+ if ($oldversion < 2006032200) {
+ // set version for all questiontypes that already have their tables installed
+ set_config('qtype_calculated_version', 2006032100);
+ set_config('qtype_essay_version', 2006032100);
+ set_config('qtype_match_version', 2006032100);
+ set_config('qtype_multianswer_version', 2006032100);
+ set_config('qtype_multichoice_version', 2006032100);
+ set_config('qtype_numerical_version', 2006032100);
+ set_config('qtype_randomsamatch_version', 2006032100);
+ set_config('qtype_rqp_version', 2006032100);
+ set_config('qtype_shortanswer_version', 2006032100);
+ set_config('qtype_truefalse_version', 2006032100);
+ }
+
return true;
}
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2006032100; // The (date) version of this module
+$module->version = 2006032200; // The (date) version of this module
$module->requires = 2006022400; // Requires this Moodle version
$module->cron = 0; // How often should cron check this module (seconds)?