Skip to content

Commit

Permalink
Merge branch 'MDL-77666' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Mar 23, 2023
2 parents 5ccb47e + f631024 commit 70bcda2
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions contentbank/classes/output/bankcontent.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,20 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* core_contentbank specific renderers
*
* @package core_contentbank
* @copyright 2020 Ferran Recio <[email protected]>
* @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 <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand Down Expand Up @@ -138,7 +132,8 @@ public function export_for_template(renderer_base $output): stdClass {
}
$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];
Expand Down

0 comments on commit 70bcda2

Please sign in to comment.