diff --git a/contentbank/classes/output/bankcontent.php b/contentbank/classes/output/bankcontent.php
index a2dfb0e0d20..c0826adc967 100644
--- a/contentbank/classes/output/bankcontent.php
+++ b/contentbank/classes/output/bankcontent.php
@@ -14,26 +14,20 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * core_contentbank specific renderers
- *
- * @package core_contentbank
- * @copyright 2020 Ferran Recio
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
namespace core_contentbank\output;
+use context_coursecat;
+use core_contentbank\content;
use core_contentbank\contentbank;
use renderable;
use templatable;
use renderer_base;
use stdClass;
-use core_contentbank\content;
/**
* Class containing data for bank content
*
+ * @package core_contentbank
* @copyright 2020 Ferran Recio
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -138,7 +132,8 @@ class bankcontent implements renderable, templatable {
}
$options = [];
foreach ($this->allowedcategories as $allowedcategory) {
- $options[$allowedcategory->ctxid] = $allowedcategory->name;
+ $options[$allowedcategory->ctxid] = format_string($allowedcategory->name, true,
+ context_coursecat::instance($allowedcategory->ctxinstance));
}
if (!empty($options)) {
$allowedcontexts['categories'] = [get_string('coursecategories') => $options];