MDL-76849 qtype_ddwtos: Include question number in answer fields

* Plus include the item number so users will have an idea which blank
numbers they are currently on.
This commit is contained in:
Jun Pataleta
2023-03-09 08:57:47 +08:00
parent 5847b0026e
commit 2ad0871a82
2 changed files with 3 additions and 2 deletions
@@ -25,6 +25,7 @@
$string['addmorechoiceblanks'] = 'Blanks for {no} more choices';
$string['answer'] = 'Answer';
$string['blank'] = 'blank';
$string['blanknumber'] = 'Blank {$a}';
$string['correctansweris'] = 'The correct answer is: {$a}';
$string['errorlimitedchoice'] = 'Choice [[{$a}]] has been used more than once without being set to "Unlimited". Please recheck this question.';
$string['infinite'] = 'Unlimited';
+2 -2
View File
@@ -76,8 +76,8 @@ class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_ren
question_display_options $options) {
$question = $qa->get_question();
$group = $question->places[$place];
$boxcontents = ' ' . html_writer::tag('span',
get_string('blank', 'qtype_ddwtos'), array('class' => 'accesshide'));
$label = $options->add_question_identifier_to_label(get_string('blanknumber', 'qtype_ddwtos', $place));
$boxcontents = ' ' . html_writer::tag('span', $label, array('class' => 'accesshide'));
$value = $qa->get_last_qt_var($question->field($place));