forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MDL-77666' of https://github.com/paulholden/moodle
- Loading branch information
Showing
1 changed file
with
5 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
*/ | ||
|
@@ -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]; | ||
|