diff --git a/question/type/ordering/tests/fixtures/testexport.moodle.xml b/question/type/ordering/tests/fixtures/testexport.moodle.xml
index 8a35b313307..7e0fa9839c0 100644
--- a/question/type/ordering/tests/fixtures/testexport.moodle.xml
+++ b/question/type/ordering/tests/fixtures/testexport.moodle.xml
@@ -29,37 +29,37 @@
That is not right at all.
1
-
+
Modular
Modular is correct.
-
+
Object
Object is correct.
-
+
Oriented
Oriented is correct.
-
+
Dynamic
Dynamic is correct.
-
+
Learning
Learning is correct.
-
+
Environment
Environment is correct.
diff --git a/question/type/ordering/tests/output/feedback_test.php b/question/type/ordering/tests/output/feedback_test.php
index f59f7e025b1..62c2ec540e4 100644
--- a/question/type/ordering/tests/output/feedback_test.php
+++ b/question/type/ordering/tests/output/feedback_test.php
@@ -98,7 +98,8 @@ final class feedback_test extends qbehaviour_walkthrough_test_base {
$attempt = $qa;
} else {
$this->start_attempt_at_question($question, 'interactive');
- $this->process_submission(array_merge(['-submit' => 1], ['answers' => array_values($answeritems)]));
+ $response = qtype_ordering_test_helper::get_response($question, array_values($answeritems));
+ $this->process_submission(array_merge(['-submit' => 1], $response));
$attempt = $this->get_question_attempt();
// Omit the numparts as we are not testing it here, and it can be a bit flaky when manually processing an attempt.
$this->displayoptions->numpartscorrect = false;
diff --git a/question/type/ordering/tests/output/specific_grade_detail_feedback_test.php b/question/type/ordering/tests/output/specific_grade_detail_feedback_test.php
index dfb094e9233..4ae392e0038 100644
--- a/question/type/ordering/tests/output/specific_grade_detail_feedback_test.php
+++ b/question/type/ordering/tests/output/specific_grade_detail_feedback_test.php
@@ -197,7 +197,7 @@ final class specific_grade_detail_feedback_test extends advanced_testcase {
qtype_ordering_question::SELECT_ALL,
],
'Incorrect question attempt (SELECT_RANDOM). Grading type: GRADING_ABSOLUTE_POSITION' => [
- [14 => 'Object', 16 => 'Dynamic', 13 => 'Modular', 17 => 'Learning', 18 => 'Environment', 15 => 'Oriented'],
+ [16 => 'Dynamic', 14 => 'Object', 13 => 'Modular', 17 => 'Learning', 18 => 'Environment', 15 => 'Oriented'],
qtype_ordering_question::GRADING_ABSOLUTE_POSITION,
'vertical',
[
diff --git a/question/type/ordering/tests/questionhint_test.php b/question/type/ordering/tests/questionhint_test.php
index 46eaf40562d..ed75bbee411 100644
--- a/question/type/ordering/tests/questionhint_test.php
+++ b/question/type/ordering/tests/questionhint_test.php
@@ -24,6 +24,7 @@ defined('MOODLE_INTERNAL') || die();
global $CFG;
require_once($CFG->dirroot . '/question/engine/tests/helpers.php');
+require_once($CFG->dirroot . '/question/type/ordering/questiontype.php');
/**
* A test class used to test question_hint_ordering.
diff --git a/question/type/ordering/tests/questiontype_test.php b/question/type/ordering/tests/questiontype_test.php
index b574e732b25..e9b98b3795f 100644
--- a/question/type/ordering/tests/questiontype_test.php
+++ b/question/type/ordering/tests/questiontype_test.php
@@ -39,7 +39,7 @@ require_once($CFG->dirroot . '/question/type/ordering/edit_ordering_form.php');
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->dirroot . '/question/format.php');
require_once($CFG->dirroot . '/question/format/gift/format.php');
-require_once($CFG->dirroot . '/question/engine/tests/helpers.php');
+require_once($CFG->dirroot . '/question/format/xml/format.php');
/**
* Unit tests for the ordering question type class.