diff --git a/question/type/ddwtos/edit_ddwtos_form.php b/question/type/ddwtos/edit_ddwtos_form.php index f61c2a42ef4..357e8c0a977 100644 --- a/question/type/ddwtos/edit_ddwtos_form.php +++ b/question/type/ddwtos/edit_ddwtos_form.php @@ -66,4 +66,10 @@ class qtype_ddwtos_edit_form extends qtype_gapselect_edit_form_base { } return null; } + + protected function definition_inner($mform): void { + parent::definition_inner($mform); + $mform->insertElementBefore($mform->createElement('static', 'previewarea', '', + get_string('choicesacceptedtext', 'qtype_ddwtos')), 'shuffleanswers'); + } } diff --git a/question/type/ddwtos/lang/en/qtype_ddwtos.php b/question/type/ddwtos/lang/en/qtype_ddwtos.php index ed3d40e14b9..6ab1e157265 100644 --- a/question/type/ddwtos/lang/en/qtype_ddwtos.php +++ b/question/type/ddwtos/lang/en/qtype_ddwtos.php @@ -27,6 +27,8 @@ $string['answer'] = 'Answer'; $string['blank'] = 'blank'; $string['blanknumber'] = 'Blank {$a}'; $string['correctansweris'] = 'The correct answer is: {$a}'; +$string['choicesacceptedtext'] = 'Write the answer to be dragged into each gap. You can include extra answers to increase difficulty.
+Accepted text formatting: <sub>, <sup>, <b>, <i>, <em>, <strong>. TeX is also accepted, using $$ at the start and at the end.'; $string['errorlimitedchoice'] = 'Choice [[{$a}]] has been used more than once without being set to "Unlimited". Please recheck this question.'; $string['infinite'] = 'Unlimited'; $string['pleaseputananswerineachbox'] = 'Please put an answer in each box.'; diff --git a/question/type/ddwtos/tests/behat/edit.feature b/question/type/ddwtos/tests/behat/edit.feature index fd531d49d93..4e9b9f0da7e 100644 --- a/question/type/ddwtos/tests/behat/edit.feature +++ b/question/type/ddwtos/tests/behat/edit.feature @@ -27,6 +27,7 @@ Feature: Test editing a drag and drop into text questions And I should see "Choice [[1]]" And I should see "Choice [[2]]" And I should see "Choice [[3]]" + And I should see "Write the answer to be dragged into each gap. You can include extra answers to increase difficulty." in the "Choices" "fieldset" And I set the following fields to these values: | Question name | Edited question name | And I press "id_submitbutton"