Moodle Plugins directory: Cross XML format | Moodle.org
Cross XML format
Question formats ::: qformat_crossxml
Maintained by
Daniel Thies
This input format plugin is a handy utility that converts questions from one question type to another.
Latest release:
124 sites
49 downloads
19 fans
This plugin enables users to change types of some questions in the Moodle question bank by exporting the questions as Moodle XML format and importing with this format.
- Short answer questions will be changed to single response multiple choice questions. The short answer questions should include alternate answers to serve as the distractors in the multiple choice questions.
- Multiple choice questions will be imported as short answer questions. The distractors of each multichoice question will serve as alternate (wrong) answers for the short answer question.
- Drag-and-drop into text questions will be conveted to Select missing words, and vice versa.
- If the Drag-and-Drop Matching question type is installed, those questions will be converted to the standard matching type, and standard matching will be converted to Drag and Drop. If it is not installed, thr regular matching questions will not be changed.
- If All-or-Nothing Multiple Choice is installed those questions will be converted to regular multichoice with more that one response. If it is not installed, they will be skipped. Each will be marked with percentage of possible correct responses checked or zero if an incorrect response is selected. You can create All-or-Nothing Multichoice questions from the standard ones using Import all or nothing format.
- If OU multiple response is installed those questions will be converted to regular multichoice with more that one response. If it is not installed, they will be skipped. The new standard multichoice questions will be marked the same as the original OU Multiresponse questions would be.
- Other types that support Moodle XML format should default to being imported without any changes.
Image files and feedback should be preserved by the transformations except where HTML question stems must be converted to plain text stems.
Useful links
Contributors
Daniel Thies (Lead maintainer)
Please login to view contributors details and/or to contact them
"If All-or-Nothing Multiple Choice is installed those questions will be converted to regular multichoice with more that one response. If it is not installed, they will be skipped. Each will be marked with percentage of possible correct responses checked or zero if an incorrect response is selected. You can create All-or-Nothing Multichoice questions from the standard ones using Import all or nothing format."
In other words, there's apparently only one-way traffic that your plugin provides: All-or-Nothing MC => MC , but not the other way round.
I'd like to achieve the same with Matching & Drag-and-Drop Matching - only from Drag-and-Drop to regular Matching, never the opposite.
I will try to see if I can adjust the code for myself, but maybe you will have some suggestions?
As a feature, in general, being able to control the conversions (which ones really apply and in which directions only) could be a valuable admin setting.
Many thanks for any help. Best regards, Przemek
public function import_match($question)
in /question/format/crossxml/format.php
?
I will give this a try.
HTH & kind regards,
Przemek
If you want to prevent converting the matching questions you can change import_match to return null or modify the switch statement in import_question to return null.
Daniel