MDL-58997 calendar: Group names passing multilang filters.

This commit is contained in:
Luca Bösch 2017-05-19 17:05:02 +02:00 committed by =
parent 9e7afbbc6c
commit 29b83cbb34

View File

@ -72,7 +72,8 @@ class event_form extends moodleform {
if (!empty($eventtypes->groups) && is_array($eventtypes->groups)) {
$groupoptions = array();
foreach ($eventtypes->groups as $group) {
$groupoptions[$group->id] = $group->name;
$groupoptions[$group->id] = format_string($group->name, true,
array('context' => context_course::instance($group->courseid)));
}
$mform->addElement('select', 'groupid', get_string('typegroup', 'calendar'), $groupoptions);
$mform->disabledIf('groupid', 'eventtype', 'noteq', 'group');