From 60a3ce512e03b6fb3d213429d722b33f0b6045da Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 7 May 2021 21:05:06 +1200 Subject: [PATCH] Fix #525 - correct check for visibility of custom user fields. --- classes/form/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/form/export.php b/classes/form/export.php index d3f51a0..b47d77a 100644 --- a/classes/form/export.php +++ b/classes/form/export.php @@ -122,7 +122,7 @@ class export extends \moodleform { $customfields = profile_get_custom_fields(); foreach ($customfields as $field) { - if ((is_siteadmin($USER) || $field->visible == PROFILE_VISIBLE_ALL) + if ((is_siteadmin($USER) || $field->visible == PROFILE_VISIBLE_ALL || $field->visible == PROFILE_VISIBLE_TEACHERS) && in_array($field->shortname, explode(',', $adminsetfields))) { $ident[] =& $mform->createElement('checkbox', $field->shortname, '', format_string($field->name, true, array('context' => $modcontext)));