Description

In tests/quizzes tool, when you export the assessment whose question or answer text body contains the control characters, such as ctrl-K, ctrl-M, ctrl-A etc(the ascii code of those characters <32 or =127), or "]]>" you will see the XML not well formatted - parse error. And the action of exporting assessment will fail.

The way to recreate the problem is tricky, you somehow has to insert those control characters in your question or answer or description of the assessment. Then you will see the problem.

The problem is that you cannot enclose those special chars in <![CDATA[...]]> . The solution is that you need to manually translate them to XML codes, and break one <![CDATA[....ctrl-k..]]> into
<![CDATA[..]]>&#(int)char("K")<![CDATA[...]]>