Weird bug in numerical question within Cloze question import

Weird bug in numerical question within Cloze question import

by Joseph Rézeau -
Number of replies: 0
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I've just noticed this weird bug (in 1.7) and posted bug report MDL-8553.

If anyone can confirm it, please vote for the bug. Using Moodle 1.7+

Create a Cloze type question with one numerical sub-question in it, like this:

Moodle has a large and diverse user community with over 100,000 registered users on this site alone, speaking over {1:NUMERICAL:~%100%70:10#OK} languages.

Save and put this Cloze question into a Quiz called e.g. my_quiz.

Do a course backup, backing-up only my_quiz.

Do a course restore.

Course backup goes OK.

Preview quiz my_quiz or go to Admin/Questions and try to preview or edit the cloze question and you get this error message:

Error: Missing question answer!
Unable to get options for questiontype numerical (id=15)

However, if you go into Edit question mode for that faulty question, its full code is still there, just save the question and ... all goes well!

NOTE.- If, instead of doing a course backup and restore operation with my_quiz you simply do an export as file (Moodle XML) followed by a file import, all goes well, no problem.

Weird, ain't it? thoughtful Not that is bothers me much, as I rarely use numerical questions myself, but I know others do.

Joseph

Average of ratings: -