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

Chrome cannot download files when the filename in Content-Disposition contains a comma (e.g. quiz report download)

    XMLWordPrintable

Details

    • 0
    • Team Hedgehog 4.1 pre 1.1, Team Hedgehog Sprint 1.1

    Description

      If a quiz name contains commas, the attempts export (report/overview) fails for csv/xls format with an error ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION. Applies only to Chrome browser.

      Commas are not escaped properly within the quiz overview report, but it might actually concern the csv export tool.

      Test instructions:

      • Create a quiz that contains comma in the name
      • Submit an attempt
      • Visit Quiz report view
      • Click 'Download attempts as CSV'
      • Get the mentioned error

      Dirty fix:
      L74 mod/quiz/report/overview/report.php

      add str_replace to remove commas:

      $table->is_downloading($options->download, str_replace(',', '', $filename),
      $courseshortname . ' ' . format_string($quiz->name, true));

      Attachments

        Issue Links

          Activity

            People

              meirza.arson@moodle.com Meirza
              pavel.m.sokolov Pavel Sokolov
              David Woloszyn David Woloszyn
              Andrew Lyons Andrew Lyons
              John Edward Pedregosa John Edward Pedregosa
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              26 Vote for this issue
              Watchers:
              34 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Nov/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 53 minutes
                  5h 53m