instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.42k stars 2.42k forks source link

Classic quiz report export - multiline questions break csv format #2202

Open stelpstraATeur opened 1 year ago

stelpstraATeur commented 1 year ago

Summary:

When using multiple lines in the questions (as supported by the RCE), the question text in the csv export (Student Analysis and Item Analysis) also becomes multilined, causing the double quote indicating the text part to be on another line than the first line. When importing the csv in data applications, texts on new lines are not associated with the correct column and the rest of the data after the questions is interpreted as text and not as data, breaking the csv format.

Important: Student Analysis and Item Analysis reports are not available in New Quizzes

Steps to reproduce:

  1. Import attached quiz in a Canvas course
  2. Complete quiz using a student account
  3. Generate Student Analysis report csv and Item Analysis report csv
  4. Import csv's in a data application, e.g. Excel
  5. Recognize data structure is not recognized correctly in the data tool
  6. Analyse the csv files to see that the new lines in the questions become new lines in the csv, breaking the csv format.

Expected behavior:

Data tools interpret one line per row. Multiline question texts could either have \n newline indicators (\t for tabs) and have the complete question in one line, or the question is shortened in the csv file, making sure that questions texts stay unique.

Actual behavior:

Multiline questions cause corrupted data when importing into data tools.

Additional notes:

Samples attached: QTI sample quiz, Student Analysis report csv and Item Analysis report csv: Quiz reports csv bug QTI.zip Quiz reports csv bug Quiz Item Analysis Report.csv Quiz reports csv bug Quiz Student Analysis Report.csv