mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-61715 question: qbank_chooser is not intelligent about headings
This commit is contained in:
parent
6d4bc5bd34
commit
8e0bebd1cd
1 changed files with 4 additions and 2 deletions
|
@ -57,10 +57,12 @@ class qbank_chooser extends \core\output\chooser {
|
||||||
return new qbank_chooser_item($qtype, $context);
|
return new qbank_chooser_item($qtype, $context);
|
||||||
}, $real));
|
}, $real));
|
||||||
|
|
||||||
$sections[] = new chooser_section('other', new lang_string('other'),
|
if (!empty($fake)) {
|
||||||
array_map(function($qtype) use ($context) {
|
$sections[] = new chooser_section('other', new lang_string('other'),
|
||||||
|
array_map(function ($qtype) use ($context) {
|
||||||
return new qbank_chooser_item($qtype, $context);
|
return new qbank_chooser_item($qtype, $context);
|
||||||
}, $fake));
|
}, $fake));
|
||||||
|
}
|
||||||
|
|
||||||
parent::__construct(new moodle_url('/question/question.php'),
|
parent::__construct(new moodle_url('/question/question.php'),
|
||||||
new lang_string('chooseqtypetoadd', 'question'), $sections, 'qtype');
|
new lang_string('chooseqtypetoadd', 'question'), $sections, 'qtype');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue