We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7638f49 commit 46f11d3Copy full SHA for 46f11d3
main/inc/lib/exercise_show_functions.lib.php
@@ -221,13 +221,19 @@ public static function display_oral_expression_answer(
221
echo '<tr><td> </td></tr>';
222
}
223
} else {
224
- echo '<tr>';
225
- echo '<td>';
226
- if (!empty($answer)) {
227
- echo Security::remove_XSS($answer);
+ $text = '';
+
+ if (is_array($answer) && !empty($answer['answer'])) {
+ $text = $answer['answer'];
228
+ } elseif (!is_array($answer)) {
229
+ $text = $answer;
230
+ }
231
232
+ if (!empty($text)) {
233
+ echo '<tr><td>';
234
+ echo Security::remove_XSS($text);
235
+ echo '</td></tr>';
236
- echo '</td>';
- echo '</tr>';
237
238
239
0 commit comments