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

Spaces in menu user profile field options break CSV user import.

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.9.8
    • None
    • User management
    • MOODLE_39_STABLE

    Description

      There is a problem that does not let you upload users with a CSV file if there is a menu user profile field with spaces in the end/beginning of the menu options.

      There is 'first option ' option in menu field and the same value in CSV.

      username,profile_field_Dropdown
      tttt,first option 

      upload test.csv

      When you try to add users with a CSV file you get an error 'Invalid user field: {fieldname}' even if you have the same spaces in the values of the menu field in your CSV.

      If the system trims field values when you upload CSV it should also trim values when you create the list of allowed values.

      It is clear that there should be no spaces at all before or after options in menu profile field. In CSV should be no extra spaces as well. CSV values get trimmed though while menu options keep spaces in their options.

      Attachments

        Activity

          People

            Unassigned Unassigned
            андрейусков Андрей Усков
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: