canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

Quiz report should use user's preference of CSV

Open Gao-Jun opened this issue 1 year ago • 2 comments

While generating quiz report, the generated CSV file doesn't use the user's preference of CSV. This patch fix this issue.

Test plan

  • Update user preference of CSV, use semicolon(;) as separator.
  • Create a new quiz, and have a submission. (quiz with no submission can not be exported)
  • Export 'Student Analysis' or 'Item Analysis' of this quiz.

Expected The exported CSV file should use semicolon(;) as separator

Actual result The exported CSV file still use comma(,) as separator

Gao-Jun avatar Jun 15 '24 08:06 Gao-Jun

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: app/models/quizzes/quiz_statistics.rb

Function Unhandled Issue
generate_csv InstFS::ServiceError: received code "502" from service, with message " Quizzes::Quiz...
Event Count: 2
generate_csv InstFS::BadRequestError: received code "400" from service, with message ""The service received no request body and has tim... ...
Event Count: 1

Did you find this useful? React with a 👍 or 👎

How to view the detail of these 'Unhandled Issue'?

Gao-Jun avatar Jun 15 '24 08:06 Gao-Jun

Hey @Gao-Jun Thanks for the contribution! This PR looks good to me but before I pull it into our review process I think it needs some specs. Take a look at these two files and see if you can add some specs to ensure the options are accepted and used properly. spec/models/quizzes/quiz_statistics/student_analysis_spec.rb spec/models/quizzes/quiz_statistics_spec.rb

dustin-cowles avatar Jul 24 '25 20:07 dustin-cowles