diff --git a/src/transformer/events/mod_quiz/question_answered/essay.php b/src/transformer/events/mod_quiz/question_answered/essay.php index 2b4bafa4d..42f581d11 100644 --- a/src/transformer/events/mod_quiz/question_answered/essay.php +++ b/src/transformer/events/mod_quiz/question_answered/essay.php @@ -42,7 +42,7 @@ function essay(array $config, \stdClass $event, \stdClass $questionattempt, \std 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'long-fill-in', ] diff --git a/src/transformer/events/mod_quiz/question_answered/gapselect.php b/src/transformer/events/mod_quiz/question_answered/gapselect.php index 4617ba4aa..d2164e90f 100644 --- a/src/transformer/events/mod_quiz/question_answered/gapselect.php +++ b/src/transformer/events/mod_quiz/question_answered/gapselect.php @@ -43,7 +43,7 @@ function gapselect(array $config, \stdClass $event, \stdClass $questionattempt, 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'sequencing', ] diff --git a/src/transformer/events/mod_quiz/question_answered/match.php b/src/transformer/events/mod_quiz/question_answered/match.php index c8d7cca79..4db425ebb 100644 --- a/src/transformer/events/mod_quiz/question_answered/match.php +++ b/src/transformer/events/mod_quiz/question_answered/match.php @@ -53,7 +53,7 @@ function ($reduction, $selection) { 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'matching', ] diff --git a/src/transformer/events/mod_quiz/question_answered/numerical.php b/src/transformer/events/mod_quiz/question_answered/numerical.php index 94e9d98da..93dc47d22 100644 --- a/src/transformer/events/mod_quiz/question_answered/numerical.php +++ b/src/transformer/events/mod_quiz/question_answered/numerical.php @@ -42,7 +42,7 @@ function numerical(array $config, \stdClass $event, \stdClass $questionattempt, 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'numeric', ] diff --git a/src/transformer/events/mod_quiz/question_answered/randomsamatch.php b/src/transformer/events/mod_quiz/question_answered/randomsamatch.php index e3c2d1bb5..df14dbd5a 100644 --- a/src/transformer/events/mod_quiz/question_answered/randomsamatch.php +++ b/src/transformer/events/mod_quiz/question_answered/randomsamatch.php @@ -53,7 +53,7 @@ function ($reduction, $selection) { 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'matching', ] diff --git a/src/transformer/events/mod_quiz/question_answered/shortanswer.php b/src/transformer/events/mod_quiz/question_answered/shortanswer.php index 15d6cc81f..f7024e212 100644 --- a/src/transformer/events/mod_quiz/question_answered/shortanswer.php +++ b/src/transformer/events/mod_quiz/question_answered/shortanswer.php @@ -42,7 +42,7 @@ function shortanswer(array $config, \stdClass $event, \stdClass $questionattempt 'definition' => [ 'type' => 'http://adlnet.gov/expapi/activities/cmi.interaction', 'name' => [ - $lang => $question->questiontext, + $lang => utils\get_string_html_removed($question->questiontext) ], 'interactionType' => 'fill-in', ] diff --git a/tests/mod_quiz/attempt_submitted/gapselect/statements.json b/tests/mod_quiz/attempt_submitted/gapselect/statements.json index f9c2283ce..d340379fb 100644 --- a/tests/mod_quiz/attempt_submitted/gapselect/statements.json +++ b/tests/mod_quiz/attempt_submitted/gapselect/statements.json @@ -110,7 +110,7 @@ "definition": { "type": "http:\/\/adlnet.gov\/expapi\/activities\/cmi.interaction", "name": { - "en": "

Example [[1]] missing [[2]] words [[3]]<\/p>" + "en": "Example [[1]] missing [[2]] words [[3]]" }, "interactionType": "sequencing" } diff --git a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json index 78b07fce9..e379d395a 100644 --- a/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json +++ b/tests/mod_quiz/attempt_submitted/randomsamatch/statements.json @@ -110,7 +110,7 @@ "definition": { "type": "http:\/\/adlnet.gov\/expapi\/activities\/cmi.interaction", "name": { - "en": "

Example Random short-answer matching question
<\/p>" + "en": "Example Random short-answer matching question" }, "interactionType": "matching" }