Merge branch 'wip-MDL-59136-master' of git://github.com/marinaglancy/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2017-06-27 18:08:21 +02:00 committed by David Monllao
commit d4bd3dbb69

View File

@ -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);