diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php index db6b8294e5d..98ac5626f20 100644 --- a/mod/quiz/lib.php +++ b/mod/quiz/lib.php @@ -2405,6 +2405,9 @@ function mod_quiz_output_fragment_add_random_question_form($args) { 'questioncategoryoptions' => $catoptions, ]; + $helpicon = new \help_icon('parentcategory', 'question'); + $data['questioncategoryhelp'] = $helpicon->export_for_template($renderer); + $result = $OUTPUT->render_from_template('mod_quiz/add_random_question_form', $data); return $result; diff --git a/mod/quiz/templates/add_random_question_form.mustache b/mod/quiz/templates/add_random_question_form.mustache index 6a95c3c3f97..db175ae146f 100644 --- a/mod/quiz/templates/add_random_question_form.mustache +++ b/mod/quiz/templates/add_random_question_form.mustache @@ -33,6 +33,19 @@ {"name": "Category 3", "value": "2"} ] }, + "questioncategoryhelp": { + "title": "Help with something", + "text": "Help with something", + "url": "http://example.org/help", + "linktext": "", + "icon": { + "extraclasses": "iconhelp", + "attributes": [ + {"name": "src", "value": "../../../pix/help.svg"}, + {"name": "alt", "value": "Help icon"} + ] + } + }, "questionbank": "
Question bank HTML goes here" } }} @@ -70,6 +83,9 @@ + {{#questioncategoryhelp}} + {{>core/help_icon}} + {{/questioncategoryhelp}}