diff --git a/question/type/ddimageortext/edit_ddimageortext_form.php b/question/type/ddimageortext/edit_ddimageortext_form.php index 21a2f46cb17..59b1d3b0b1d 100644 --- a/question/type/ddimageortext/edit_ddimageortext_form.php +++ b/question/type/ddimageortext/edit_ddimageortext_form.php @@ -197,7 +197,7 @@ class qtype_ddimageortext_edit_form extends qtype_ddtoimage_edit_form_base { // We do the necessary validation in the validation method. $repeatedoptions['drops[xleft]']['type'] = PARAM_RAW; $repeatedoptions['drops[ytop]']['type'] = PARAM_RAW; - $repeatedoptions['drops[droplabel]']['type'] = PARAM_RAW; + $repeatedoptions['drops[droplabel]']['type'] = PARAM_TEXT; $repeatedoptions['choice']['default'] = '0'; return $repeatedoptions; } diff --git a/question/type/ddimageortext/rendererbase.php b/question/type/ddimageortext/rendererbase.php index 3187b279318..b014dc61a55 100644 --- a/question/type/ddimageortext/rendererbase.php +++ b/question/type/ddimageortext/rendererbase.php @@ -109,6 +109,7 @@ class qtype_ddtoimage_renderer_base extends qtype_with_combined_feedback_rendere ['placeinput', 'place' . $placeno, 'group' . $place->group]); $output .= $html; $question->places[$placeno]->fieldname = $fieldname; + $question->places[$placeno]->text = format_string($place->text); } $output .= html_writer::end_div();