Skip to content

Commit

Permalink
MDL-76849 qtype_ddwtos: Include question number in answer fields
Browse files Browse the repository at this point in the history
* Plus include the item number so users will have an idea which blank
numbers they are currently on.
  • Loading branch information
junpataleta committed Mar 9, 2023
1 parent bad9e0a commit 2a5c62a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions question/type/ddwtos/lang/en/qtype_ddwtos.php
Expand Up @@ -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';
Expand Down
4 changes: 2 additions & 2 deletions question/type/ddwtos/renderer.php
Expand Up @@ -76,8 +76,8 @@ protected function embedded_element(question_attempt $qa, $place,
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));

Expand Down

0 comments on commit 2a5c62a

Please sign in to comment.