The Moodle XML import (1.6.1+) for multichoice questions does not take into account if
<shuffleanswers>1</shuffleanswers>
exists in XML file. The problem is in function import_multichoice in format/xml/format.php.
I took the code from import_matching function in that file. The diff is shown below and resolves the problem.
— format.php 2006-09-07 14:12:24.124627200 +0200
+++ format.php.2 2006-08-27 14:15:39.515446400 +0200
@@ -120,15 +120,10 @@
// 'header' parts particular to multichoice
$qo->qtype = MULTICHOICE;
$single = $question'#'['single'][0]'#';
$qo->single = $this->trans_single( $single );
- if (!empty($question'#'['shuffleanswers']))
{
- $qo->shuffleanswers = $question['#']['shuffleanswers'][0]['#'];
- }
else
{ - $qo->shuffleanswers = false; - }
// run through the answers
$answers = $question'#'['answer'];
$a_count = 0;
foreach ($answers as $answer) {