Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quiz strip html #446

Merged
merged 9 commits into from
Feb 21, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Expand Down
2 changes: 1 addition & 1 deletion tests/mod_quiz/attempt_submitted/gapselect/statements.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"definition": {
"type": "http:\/\/adlnet.gov\/expapi\/activities\/cmi.interaction",
"name": {
"en": "<p>Example [[1]] missing [[2]] words [[3]]<\/p>"
"en": "Example [[1]] missing [[2]] words [[3]]"
},
"interactionType": "sequencing"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"definition": {
"type": "http:\/\/adlnet.gov\/expapi\/activities\/cmi.interaction",
"name": {
"en": "<p>Example Random short-answer matching question<br><\/p>"
"en": "Example Random short-answer matching question"
},
"interactionType": "matching"
}
Expand Down