Merge branch 'MDL-45763-master' of git://github.com/merrill-oakland/moodle

This commit is contained in:
Marina Glancy 2014-06-10 20:08:06 +08:00
commit 5adb8d86bd

View File

@ -151,12 +151,13 @@ class qtype_random extends question_type {
public function save_question($question, $form) {
$form->name = '';
if ($form->questiontext) {
$form->questiontext = '1';
// In case someone set the question text to true/false in the old style, set it properly.
if ($form->questiontext['text']) {
$form->questiontext['text'] = '1';
} else {
$form->questiontext = '0';
$form->questiontext['text'] = '0';
}
$form->questiontextformat = FORMAT_MOODLE;
$form->tags = array();
// Name is not a required field for random questions, but