MDL-76849 qtype: Add a questionidentifier instance variable
commitb71d30097ee0b3097c9e1c7a74846d93b9853da2
authorJun Pataleta <jun@moodle.com>
Fri, 17 Feb 2023 03:56:26 +0000 (17 11:56 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 9 Mar 2023 00:58:52 +0000 (9 08:58 +0800)
tree144bd6bc85b0eadeff1279128c60a27f16583766
parent3ca56cb7f148e3c0d333cf9afaa19f4eb256029e
MDL-76849 qtype: Add a questionidentifier instance variable

* Add an instance variable to question_display_options to store the
identifier associated with the question being rendered.
* This information can be used by question type plugins to improve the
accessibility of the answer fields being rendered by adding the
question identifier to the answer fields' labels.
* Adding the question identifier to the label can be achieved by using
question_display_options::add_question_identifier_to_label().

Co-authored-by: Tim Hunt <t.j.hunt@open.ac.uk>
question/engine/lib.php
question/engine/renderer.php
question/engine/tests/question_display_options_test.php [new file with mode: 0644]
question/engine/upgrade.txt