Joseph
Joseph Rézeau
Posts made by Joseph Rézeau
Joseph
If you would be more specific and provide concrete examples of the kind of questions and answers you need, we might be able to help you.
Joseph
Hi Thomas,
First of all let me wish you pleasant Xmas holidays (you do deserve them).
In fact, the "registering" of question types in questionlib.php is not a very good idea, especially as it makes even more complicated the creation of new question types. The Moodle XML import/export format no longer relies on registered question types, and I would advise to do the same for the GIFT import/export format, i.e. simply using my proposed solution, which works fine and does not entail any modification of questionlib.php. I expect Tim would agree on this.
As for A.T. Wyatt's problems with backup/restore of a course including the new "order" question type, I expect it is due to your not having (yet) included that new question type in the XML import/export format.
All the best,
Joseph
Unfortunately, when creating new question types in current versions of Moodle there is still the unsolved problem of export/import core files. Tim Hunt is well aware of this fact and is working on improving things in future versions of Moodle. See MDL-2727.
In the meantime, ...
- Thomas has not provided an XML export/import format for his new "order" question type, only a GIFT format.
- The error you are getting "No handler for qtype order for GIFT export" is due to the fact that, with GIFT format, all question types have to be "registered" by Moodle, which of course excludes new question types. Until a better solution is found I have tried and tested successfully the following hack.
In Thomas's \question\format\gift\format.php file, change ORDER to "order" everywhere:
line 221
$question->qtype = "order";
line 312
case "order":
line 637
case "order":
Hope that helps,
Joseph
I am looking forward to this. Thanks in advance,
Joseph