Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-83256

When a teacher exports participants list, it doesn't include custom profile fields

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.3.7, 4.4.3
    • Course

      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

            pholden Paul Holden
            fox Séverin Terrier
            Rajneel Totaram Rajneel Totaram
            Votes:
            7 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.