mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 12:40:01 +01:00
MDL-78211 contentbank: fix context option when formatting categories.
This commit is contained in:
parent
5d320dd7d1
commit
69a3863ce3
@ -132,8 +132,9 @@ class bankcontent implements renderable, templatable {
|
||||
}
|
||||
$options = [];
|
||||
foreach ($this->allowedcategories as $allowedcategory) {
|
||||
$options[$allowedcategory->ctxid] = format_string($allowedcategory->name, true,
|
||||
context_coursecat::instance($allowedcategory->ctxinstance));
|
||||
$options[$allowedcategory->ctxid] = format_string($allowedcategory->name, true, [
|
||||
'context' => context_coursecat::instance($allowedcategory->ctxinstance),
|
||||
]);
|
||||
}
|
||||
if (!empty($options)) {
|
||||
$allowedcontexts['categories'] = [get_string('coursecategories') => $options];
|
||||
|
Loading…
x
Reference in New Issue
Block a user