-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.3.7, 4.4.3
If you have created custom user fields of type Text (255 char max), "Visible to user, teachers and admins" (visible=3 in table user_info_field) and you're in a course, and export participants list :
- if you are Administrator, user custom fields are well included in the Excel export
- but if you are Teacher, user custom fields are NOT included in the Excel export
This can be corrected by making a small change in /user/profile/lib.php file, in the function is_visible, under the "case PROFILE_VISIBLE_TEACHERS" part, by adding one more condition just before the "else" part :
}
else if (has_capability('moodle/site:viewuseridentity', $context)) {
return true;
Hope this can be corrected soon.
I don't do Moodle programmation and don't have Git repository, but it should be very simple to do.
For french speaking people (or see how code is included), see https://moodle.org/mod/forum/discuss.php?d=461746#p1856027
- has a non-specific relationship to
-
MDL-76873 Exceptions due to inconsistent profile field visibility checking in reports
-
- Closed
-
- is a regression caused by
-
MDL-71621 Parent role cannot edit custom fields in child profile
-
- Closed
-
- is duplicated by
-
MDL-76795 Custom profile field when set visibility to teacher is not visible
-
- Closed
-