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

Export to XLS should be within constraints

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.17, 3.8.8, 3.9.5, 3.10.2
    • Fix Version/s: None
    • Component/s: Libraries, Quiz
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_35_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE

      Description

      When exporting to xls, specially in report section in moodle quiz, and if the answer is too big (beyond MS excel limits: https://support.office.com/en-us/article/Excel-specifications-and-limits-16c69c74-3d6a-4aaf-ba35-e6eb276e8eaa) the Excel file gets damaged. 

       

      An Example of huge data in one specific cell: a drawing dataURI. when its too big (and usually it is!) then the export to xls feature should strip (substr) to max limit Excel accepts. The data (answer) is not human readable anyway, so it should not have a negative effect on the human reading ability and this missing piece of data (out of substr) is pretty useless for a human to worry about 'missing' it.

       

      How to Reproduce:

      1. Create a quiz with drawing question type or any other question type where you can enter 'massive' amount of text in it
      2. Attempt the quiz and fill it with too much text, or draw a complex object.
      3. Go to Quiz -> Results -> Statistics
      4. Select Download full report as 'Microsoft Excel'
      5. Open the Excel file, an Error pops: 'The file is damaged, try to recover it'?
      6. Click yes, the report opens but missing the answers if they are bigger than the limit of MS Excel (limits: https://support.office.com/en-us/article/Excel-specifications-and-limits-16c69c74-3d6a-4aaf-ba35-e6eb276e8eaa)
      7. The underlying technical error is, for example: Exception - Trying to add a value that exceeds the maximum number of characters allowed in a cell (32,767).
      8. Note: as export to MS Excel is across moodle, the same issue could be produced in other components across moodle when/if underlying cell data is huge (beyond excel cell limit)
      • Directly affected: PHPExcel
      • Indirectly affected: Quiz module

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            amr Amr
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            14 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: