I do not know if this would be in any way beneficial to anyone, but I was running into a problem with restoring courses from Moodle 2.6 to Moodle 2.6. Two different server locations. I had imported most of the questions from Moodle 1.9.7 using the Moodle XML format. It allowed me to export the questions and import the questions. It allowed me to create the courses through copy and paste since 1.9.7 and 2.6 were not compatible with each other. I only had 200 ish different courses to copy, so it was not all bad.
However, (back to the topic) the 2.6 allowed me to backup the course from 2.6, but it would not allow me to restore that course anywhere, not even on the same server. SO, I exported the questions from a course in Moodle XML format and opened it with PSPAD and noticed that not all the questions were coded the same way.
Some questions were coded:
<!-- question: 4806 -->
<question type="multichoice">
<name>
<text>A review of several studies found that ...</text>
</name>
<questiontext format="moodle_auto_format">
<text><![CDATA[A review of several studies found that ________ increased the likelihood of developing a more severe depression.]]></text>
</questiontext>
<generalfeedback format="moodle_auto_format">
<text></text>
</generalfeedback>
And some were not:
<!-- question: 4806 -->
<question type="multichoice">
<name>
<text>A review of several studies found that ...</text>
</name>
<questiontext format="moodle_auto_format">
<text>A review of several studies found that ________ increased the likelihood of developing a more severe depression.</text>
</questiontext>
<generalfeedback format="moodle_auto_format">
<text></text>
</generalfeedback>
I went through and using find and replace added the codes at the front and back of the question text. I saved the file. I deleted the question bank that I had exported in the first place, then imported the file that I had changed.
Afterwards I was able to backup and restore the course anywhere.
You do have to have a lot of patience to go through the process, but I could not lose the course.
Just a thought.