diff --git a/absentee.php b/absentee.php index 205a8a4540..41f3cc4a78 100644 --- a/absentee.php +++ b/absentee.php @@ -89,8 +89,10 @@ if (!empty($CFG->showuseridentity) && has_capability('moodle/site:viewuseridentity', $context)) { $extrafields = explode(',', $CFG->showuseridentity); foreach ($extrafields as $field) { - $columns[] = $field; - $headers[] = get_string($field); + if (strpos($field, 'profile_field') !== 0) { + $columns[] = $field; + $headers[] = get_string($field); + } } } $columns = array_merge($columns, ['numtakensessions', 'percent', 'timesent']); diff --git a/locallib.php b/locallib.php index 3e65a452a1..ac9e04af71 100644 --- a/locallib.php +++ b/locallib.php @@ -1109,8 +1109,10 @@ function attendance_get_users_to_notify($courseids = [], $orderby = '', $allforn if (!empty($CFG->showuseridentity)) { $extrafields = explode(',', $CFG->showuseridentity); foreach ($extrafields as $field) { - $unames .= $field . ', '; - $unames2 .= 'u.' . $field . ', '; + if (strpos($field, 'profile_field') !== 0) { + $unames .= $field . ', '; + $unames2 .= 'u.' . $field . ', '; + } } }