mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'wip-MDL-59136-master' of git://github.com/marinaglancy/moodle
This commit is contained in:
commit
d4bd3dbb69
@ -101,7 +101,8 @@ if ($switchrole > 0 && has_capability('moodle/role:switchroles', $context)) {
|
||||
|
||||
foreach ($roles as $key => $role) {
|
||||
$url = new moodle_url('/course/switchrole.php', array('id' => $id, 'switchrole' => $key, 'returnurl' => $returnurl));
|
||||
echo $OUTPUT->container($OUTPUT->single_button($url, $role), 'm-x-3 m-b-1');
|
||||
// Button encodes special characters, apply htmlspecialchars_decode() to avoid double escaping.
|
||||
echo $OUTPUT->container($OUTPUT->single_button($url, htmlspecialchars_decode($role)), 'm-x-3 m-b-1');
|
||||
}
|
||||
|
||||
$url = new moodle_url($returnurl);
|
||||
|
Loading…
x
Reference in New Issue
Block a user