Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.1, 2.2
-
MOODLE_21_STABLE, MOODLE_22_STABLE
-
-
Description
See this discussion : http://moodle.org/mod/forum/discuss.php?d=193138
In Moddle version >= 2.1 (Question engine 2) when a question type not compatible with QE2 is installed when happend is :
- question creation page is broken
- admin question type management is broken
As I said in the forum discussion :
If debugging messages are not enabled you don't get any clue of what the problem is.
Discussing with Moodle administrators, I also understood that for quite a lot of them they are aware of the "big gap" between Moodle 1.9 and 2.0;, but they don"t realize there is another "big gap" for the quiz module between Moodle 2.0 and 2.1 ! Of course, this should not happend if anybody did read Moodle release notes carefully but ...
I have studied the problem and in fact the same thing is happening on both pages (admin/qtypes.php and question/edit.php?courseid=x)
in both cases question_bank::get_all_qtypes call question_bank::get_qtype for the non compatible question type, wich result in including the question\type\xxxxxx\questiontype.php file (this file DO exist for old questions types so no error at that step) wich result in a fatal error :
Fatal error: Class 'default_questiontype' not found on line xx
This is because all questiontype.php files from old question types include a line like
class xxxxx_qtype extends default_questiontype {
and of course in QE2 there is no default_questiontype class defined !
So I think it would be good to avoid this situation in throwing a coding exception.
We should also verify that in that case a clean uninstall of the incompatible question type is possible.