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

Quiz Submission Events doesn't seem to work

Open clrockwell opened this issue 4 years ago • 1 comments

Summary:

When POST'ing to /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id/events using something like this as the body

{
  "quiz_submission_events": [
    {
      "event_data": {
        "quiz_question_id": "278", // I've also tried "question_id" as the key
        "answer": "705"
      },
      "event_type": "question_answered",
      "client_timestamp": "2021-06-08T21:43:57.313208Z"
    }
  ]
}

I get a 204 No content response, as expected.

However, when I GET the same endpoint, the part of the response with question_answered never changes

{
            "id": "1193",
            "event_type": "question_answered",
            "event_data": [
                {
                    "quiz_question_id": "277",
                    "answer": null
                },
                {
                    "quiz_question_id": "278",
                    "answer": null
                },
                {
                    "quiz_question_id": "279",
                    "answer": []
                }
            ],
            "created_at": "2021-05-26T13:58:38Z"
        },

I've done this multiple times, on multiple quizzes, and the results are consistently not what I expect. Is this a bug or do I misunderstand what is supposed to happen here?

clrockwell avatar Jun 09 '21 13:06 clrockwell

Hello, I was wondering if you had figured out the issue. I am experiencing the same behavior and cannot figure out what I'm doing wrong, as I am following the API spec exactly like you did.

edisonooi avatar Nov 27 '23 04:11 edisonooi