Skip to content

Commit

Permalink
Correct match question id relation
Browse files Browse the repository at this point in the history
  • Loading branch information
milt committed Nov 21, 2024
1 parent 22a56ae commit a592ef4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/transformer/utils/get_activity/definition/question.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function($answer) {
function get_match_definition(array $config, \stdClass $question, string $lang) {
$repo = $config['repo'];
$subqs = $repo->read_records('qtype_match_subquestions', [
'question' => $question->id
'questionid' => $question->id
]);

$source = [];
Expand Down
6 changes: 3 additions & 3 deletions tests/mod_quiz/attempt_submitted/match/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
"qtype_match_subquestions": [
{
"id": 1,
"question": 1,
"questionid": 1,
"questiontext": "<p>Red</bar>",
"answertext": "Green"
},
{
"id": 2,
"question": 1,
"questionid": 1,
"questiontext": "<p>Blue</bar>",
"answertext": "Orange"
},
{
"id": 3,
"question": 1,
"questionid": 1,
"questiontext": "<p>Black</bar>",
"answertext": "White"
}
Expand Down
4 changes: 2 additions & 2 deletions tests/mod_quiz/attempt_submitted/randomsamatch/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
"qtype_match_subquestions": [
{
"id": 1,
"question": 1,
"questionid": 1,
"questiontext": "<p>Example short answer question</bar>",
"answertext": "orange"
},
{
"id": 2,
"question": 1,
"questionid": 1,
"questiontext": "<p>Testing testing</bar>",
"answertext": "Purple"
}
Expand Down

0 comments on commit a592ef4

Please sign in to comment.