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

Error importing grades from a CSV file when the first row (colum names) character count exceeds 999 characters.



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.9.2
    • Fix Version/s: 1.9.4
    • Component/s: Gradebook
    • Labels:
    • Environment:
      Windows XP Professional (SP3).
      Microsoft Office 2007.
    • Affected Branches:
    • Fixed Branches:


      One of the professors at ISU had a problem importing a CSV file into the gradebook when the first row (column names) character count exceeded 999 characters (not including spaces).

      We reproduced the problem by exporting an existing gradebook into Excel, adding a new column to it, and added words to the first cell of the new column until the character count in the first row was 999 characters (without spaces). Then a CSV file was created with Excel and imported into the gradebook. The new column was added as a new gradeitem (although adding it or not adding it does not make any difference) and it worked just fine. Then more words were added to the first cell of the new column in the CSV file until the character count was more than 999 characters. While importing that file, Moodle gave an error and would not let the grades be imported. For the same file, once again, decreasing the word count fixed the problem. A sample CSV file in which the aforementioned character count is more than 999, is included with this bug report. A print screen of error message is also attached.

      This is how the professor described the problem to us (for reference):

      "The record length cannot exceed 999 characters. This may be an issue with MS Excel writing to the CSV format. What it does is wrap the long record into another "new" record. My Column Headings were too long and when it wrapped the record, the "new record" was treated as invalid data rather than an extension of the column labels."


        1. longimport.csv
          5 kB
        2. MoodleErrorReport.png
          56 kB
        3. sampleCSV_file.csv
          2 kB

          Issue Links



              • Votes:
                3 Vote for this issue
                1 Start watching this issue


                • Created:
                  Fix Release Date: