cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ear15002
Community Member

Get student question answers submitted via API

Jump to solution

How do I get the answers and scores for individual questions on a quiz submissions? The Quiz Submission Question category claims to do this, but all I get is a slight variation of the Quiz Question Object. I know that it is all still under beta, but is there another way to get the individual question answers?

Labels (1)
12 Replies
z_dusatko
Community Participant

After enabling Quiz Log Auditing I am finally getting quiz_submission_events and its quiz_data but unfortunately the answers field is just an empty array.

James
Community Champion

I haven't tried to put all the pieces together yet to see if it's usable, but when I was trying to download submission data to include with Starfish, I inadvertently found quiz submission data. I didn't want it, it really slows things down, but there doesn't appear to be a way to not get it with the call I'm using.

If you fetch the submissions for an assignment and include[]=submission_history, then there is a property called submission_data that is included for quizzes.

It is an array with one element for each question. Here's what it looks like for one of my recent quizzes with 4 questions composed of multiple-drop downs.

"submission_data": [{
    "correct": "partial",
    "points": 1.5,
    "question_id": 90432031,
    "text": "",
    "answer_for_tail": 25196,
    "answer_id_for_tail": 25196,
    "answer_for_distribution": 61563,
    "answer_id_for_distribution": 61563,
    "answer_for_method": 19986,
    "answer_id_for_method": 19986,
    "answer_for_conclusion": 10295,
    "answer_id_for_conclusion": 10295,
    "answer_for_claim": 13208,
    "answer_id_for_claim": 13208,
    "answer_for_groups": 28251,
    "answer_id_for_groups": 28251,
    "answer_for_type": 87115,
    "answer_id_for_type": 87115,
    "answer_for_ci": 15394,
    "answer_id_for_ci": 15394
  },
  {
    "correct": "partial",
    "points": 1.5,
    "question_id": 90432027,
    "text": "",
    "answer_for_evidence": 24718,
    "answer_id_for_evidence": 24718,
    "answer_for_groups": 4707,
    "answer_id_for_groups": 4707,
    "answer_for_action": 5303,
    "answer_id_for_action": 5303,
    "answer_for_method": 86834,
    "answer_id_for_method": 86834,
    "answer_for_mu": 44212,
    "answer_id_for_mu": 44212,
    "answer_for_distribution": 98118,
    "answer_id_for_distribution": 98118,
    "answer_for_result": 68307,
    "answer_id_for_result": 68307,
    "answer_for_pvalue": 64708,
    "answer_id_for_pvalue": 64708,
    "answer_for_type": 475,
    "answer_id_for_type": 475,
    "answer_for_tail": 5003,
    "answer_id_for_tail": 5003
  },
  {
    "correct": "partial",
    "points": 1.5,
    "question_id": 90432040,
    "text": "",
    "answer_for_groups": 55434,
    "answer_id_for_groups": 55434,
    "answer_for_method": 69146,
    "answer_id_for_method": 69146,
    "answer_for_mu": 29235,
    "answer_id_for_mu": 29235,
    "answer_for_distribution": 67257,
    "answer_id_for_distribution": 67257,
    "answer_for_conclusion": 99253,
    "answer_id_for_conclusion": 99253,
    "answer_for_pvalue": 55570,
    "answer_id_for_pvalue": 55570,
    "answer_for_tail": 36563,
    "answer_id_for_tail": 36563,
    "answer_for_type": 61334,
    "answer_id_for_type": 61334
  },
  {
    "correct": "partial",
    "points": 2.25,
    "question_id": 90432039,
    "text": "",
    "answer_for_method": 34332,
    "answer_id_for_method": 34332,
    "answer_for_type": 69963,
    "answer_id_for_type": 69963,
    "answer_for_conclusion": 43630,
    "answer_id_for_conclusion": 43630,
    "answer_for_alternative": 65351,
    "answer_id_for_alternative": 65351,
    "answer_for_tail": 69714,
    "answer_id_for_tail": 69714,
    "answer_for_df": 49660,
    "answer_id_for_df": 49660,
    "answer_for_groups": 74851,
    "answer_id_for_groups": 74851,
    "answer_for_distribution": 62939,
    "answer_id_for_distribution": 62939
  }
]
z_dusatko
Community Participant

This is awesome! Just tested and works for text entry quizzes. Thanks James for sharing this info.