MDL-80489 qtype_ddtos: Help Text for Choices section

This commit is contained in:
Hieu Nguyen Dang 2024-05-10 12:27:27 +07:00
parent 462d5f04a8
commit a15c17cc0e
3 changed files with 9 additions and 0 deletions

View File

@ -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');
}
}

View File

@ -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. <br/>
Accepted text formatting: &lt;sub&gt;, &lt;sup&gt;, &lt;b&gt;, &lt;i&gt;, &lt;em&gt;, &lt;strong&gt;. 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.';

View File

@ -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"