Merge branch 'MDL-71301-master' of https://github.com/junpataleta/moodle

This commit is contained in:
Jun Pataleta 2022-06-02 11:23:22 +08:00
commit 913db0ba05
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,7 @@
$string['addmorechoiceblanks'] = 'Blanks for {no} more choices';
$string['answer'] = 'Answer';
$string['blanknumber'] = 'Blank {$a}';
$string['choices'] = 'Choices';
$string['choicex'] = 'Choice [[{no}]]';
$string['combinedcontrolnamegapselect'] = 'drop-down menu';

View File

@ -72,7 +72,10 @@ class qtype_gapselect_renderer extends qtype_elements_embedded_in_question_text_
}
// Use non-breaking space instead of 'Choose...'.
$selecthtml = html_writer::select($selectoptions, $qa->get_qt_field_name($fieldname),
$selecthtml = html_writer::label(get_string('blanknumber', 'qtype_gapselect', $place),
$attributes['id'], false,
array('class' => 'sr-only'));
$selecthtml .= html_writer::select($selectoptions, $qa->get_qt_field_name($fieldname),
$value, ' ', $attributes) . ' ' . $feedbackimage;
return html_writer::tag('span', $selecthtml, array('class' => 'control '.$groupclass));
}