Hi,
I have a custom user profile field, short name = UserType, which is a menu of choices. Each choice has been given the language <span> tag to translate it between english and chinese.
Eg
<span lang="en" class="multilang">Employee</span><span lang="zh_cn" class="multilang">员工</span>
<span lang="en" class="multilang">Customer</span><span lang="zh_cn" class="multilang">终端用户</span>
When I upload a new user via CSV file I have a column called 'profile_field_UserType' in my CSV which contains the value:
<span lang="en" class="multilang">Employee</span><span lang="zh_cn" class="multilang">员工</span>
When I upload the users preview page says 'Invalid user field: UserType'.
I debugged the code and found that the problem is happening in the function convert_external_data() in /user/profile/field/menu/field.class.php - it is returning each menu option by stripping out the <span> tags. This means that the upload routine
is comparing:
<span lang="en" class="multilang">Employee</span><span lang="zh_cn" class="multilang">员工</span>
with
Employee员工
so it's always returning false and not allowing the user to be added.
My question is, how do we get around uploading new users, with custom profile fields which contain multi-language span tags, into the LMS without doing some major re-coding?
My current Moodle version is 3.3.9 Build 20181112
I hope I have given enough information.
Thanks
Julie