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

Excel export of quiz results produces garbage, unreadable output



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.9.12
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
    • Environment:
      Linux servername 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:04:48 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
      PHP 5.1.6 (cli)
      Moodle 1.9.12+ (Build: 20110713)
      psql (PostgreSQL) 8.4.4 (UTF8 encoding set for the database)
    • Database:
    • Testing Instructions:

      Create a quiz. Attempt the quiz. Go to Results and choose "Export in Excel format." Save the file and try to open it in Excel.

      Create a quiz. Attempt the quiz. Go to Results and choose "Export in Excel format." Save the file and try to open it in Excel.
    • Affected Branches:


      After upgrading from 1.9.5+ to 1.9.12+ (which went flawlessly), we can no longer export quiz results to Excel format. Regardless of the portion (Overview, Item analysis or Detailed Reponses – an additional report added but has been tested with and without this additional report), the Download in Excel format produces a file that Excel can't understand.

      When trying to open the produced file, Excel complains that the file is in a different format than specified by the file extension (.xls). Choosing to open the file anyway displays garbage in the file. It appears like part of it is font specifications and sometimes part of the data is recognizable but buried amongst a lot of other characters. A screen shot is attached. BTW, this also appears to affect the ODS export. However, I can use the Export to Excel feature in the gradebook and that works as expected, in case that matters.

      This seems like it's similiar to other bugs that dealt with UTF8 encoding, but our database has been UTF8 the entire time and everything was working in 1.9.5+. And any of the solutions found for those other bugs were already incorporated into 1.9.12 so I'm stumped.

      Any help/advice would be appreciated.


          Issue Links



              • Assignee:
                timhunt Tim Hunt
                danbeach Daniel Beach
                Component watchers:
                Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: