mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-81713 mod_quiz: Add random question 'Parent category' help icon.
This commit is contained in:
parent
67b2c43225
commit
697815159f
@ -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;
|
||||
|
@ -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": "<pre>Question bank HTML goes here</pre>"
|
||||
}
|
||||
}}
|
||||
@ -70,6 +83,9 @@
|
||||
|
||||
<!-- Select number of random question -->
|
||||
<label class="mr-md-2 mb-md-0" for="parentcategory">{{#str}} parentcategory, question {{/str}} </label>
|
||||
{{#questioncategoryhelp}}
|
||||
{{>core/help_icon}}
|
||||
{{/questioncategoryhelp}}
|
||||
<select id="parentcategory" name="parentcategory" class="form-control">
|
||||
{{#questioncategoryoptions}}
|
||||
<optgroup label="{{label}}">
|
||||
|
@ -98,6 +98,7 @@ Feature: Adding random questions to a quiz based on category and tags
|
||||
When I open the "last" add to quiz menu
|
||||
And I follow "a random question"
|
||||
And I follow "New category"
|
||||
And "Help with Parent category" "icon" should exist in the "id_newcategoryheader" "fieldset"
|
||||
And I set the following fields to these values:
|
||||
| Name | New Random category |
|
||||
| Parent category | Default for Quiz 1 |
|
||||
|
Loading…
x
Reference in New Issue
Block a user