From 7b6ff446f4a2a99104b3c651309498cb248c19a3 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Fri, 17 Feb 2023 15:31:13 +0800 Subject: [PATCH] MDL-76849 qtype_match: Include question number in answer fields --- question/type/match/renderer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/type/match/renderer.php b/question/type/match/renderer.php index e8e452b53180a..6fb35a086ef5b 100644 --- a/question/type/match/renderer.php +++ b/question/type/match/renderer.php @@ -77,8 +77,9 @@ public function formulation_and_controls(question_attempt $qa, $feedbackimage = $this->feedback_image($fraction); } + $labeltext = $options->add_question_identifier_to_label(get_string('answer', 'qtype_match', $i)); $result .= html_writer::tag('td', - html_writer::label(get_string('answer', 'qtype_match', $i), + html_writer::label($labeltext, 'menu' . $qa->get_qt_field_name('sub' . $key), false, array('class' => 'accesshide')) . html_writer::select($choices, $qa->get_qt_field_name('sub' . $key), $selected,