Undefined Question Type

Undefined Question Type

by Glenn Black -
Number of replies: 3
Upgraded to 1.9+, backup failed for 1 course. Did manual course backup with debug and found it hung at quizzes. Opened up quizzes and all looked OK (see attached screen shot) until I tried editing quiz, then I found questions with undefined question type "Editing Quiz --> EditingMissingType".

It doesn't say which question type it is trying to use that is missing. How do I find which type is missing? Message received is:

This question is of a type that has not been installed on your Moodle yet.
Please alert your Moodle administrator.

This course and its questions was originally 1.6 or earlier when imported many moons ago.
Attachment MissingQuestionType.gif
Average of ratings: -
In reply to Glenn Black

Re: Undefined Question Type

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Did everything work during the upgrade? (Look in moodledata/upgradelogs) Which version did you upgrade from anyway?

Then check in the mld_question table, if you have access to the database. Something like

SELECT DISTINCT qtype FROM mdl_question;

You should only have qtypes that match the name of a folder in qestion/type.
In reply to Glenn Black

Re: Undefined Question Type

by Sibel Kuzgun -
I have just solved this problem. I manually upgraded my database from Moodle 1.4x to 1.9+. In old records of mdl_quiz_questions.qtype is set to 3 for multiple choice questions. In the new moodle the table name is changed to mdl_question and 3 should be replaced with the name of the question type. The name should be identical to the directory name at /moodle/question/type directory.

My sql is:

update `mdl_question` set qtype='multichoice' where qtype='3'
In reply to Sibel Kuzgun

Re: Undefined Question Type

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is the right way to fix this manually.

Of course, this should be dealt with automatically by the upgrade.