diff --git a/export.php b/export.php index 653c53d..24b7a7c 100644 --- a/export.php +++ b/export.php @@ -105,7 +105,7 @@ if ($formdata = $mform->get_data()) { } else if (in_array($opt, array_column($customfields, 'shortname'))) { foreach ($customfields as $customfield) { if ($opt == $customfield->shortname) { - $data->tabhead[] = $customfield->name; + $data->tabhead[] = format_string($customfield->name, true, array('context' => $context)); } } } else { @@ -169,7 +169,7 @@ if ($formdata = $mform->get_data()) { foreach (array_keys($formdata->ident) as $opt) { if (in_array($opt, array_column($customfields, 'shortname'))) { if (isset($user->profile[$opt])) { - $data->table[$i][] = $user->profile[$opt]; + $data->table[$i][] = format_string($user->profile[$opt], true, array('context' => $context)); } else { $data->table[$i][] = ''; } diff --git a/settings.php b/settings.php index eeb6342..9713075 100644 --- a/settings.php +++ b/settings.php @@ -109,7 +109,7 @@ if ($ADMIN->fulltree) { $fields = array('id' => get_string('studentid', 'attendance')); $customfields = profile_get_custom_fields(); foreach ($customfields as $field) { - $fields[$field->shortname] = $field->name; + $fields[$field->shortname] = format_string($field->name); } $settings->add(new admin_setting_configmultiselect('attendance/customexportfields',