report-quiz-question-answer-distribution

Availability

Breeze 4

Description

Returns information about the number of users who chose a specific answer to a quiz question. The combination of one quiz question and all of one user’s answers to it is called an interaction. If the user answers the question more than once, all answers are part of the same interaction and have the same interaction-id.

Call report‑quiz‑interactions to determine an interaction-id to specify in the request. The interaction-id does not correspond to the question number in the quiz (for example, question 1, question 2, and so on).

Request URL

 http://server_name/api/xml 
     ?action=report-quiz-question-answer-distribution 
     &interaction-id=integer 
     &sco-id=integer 
     &filter-definition=value 
     &sort-definition=value 
     &session=BreezeSessionCookieValue

Parameters

Name

Type

Required

Description

interaction-id

BIGINT

N

The ID that describes all of one user’s responses to one quiz question.

sco-id

BIGINT

Y

The unique ID of a presentation or course that contains a quiz.

filter-definition

Filter definition

N

A filter to reduce the volume of the response.

sort-definition

Sort definition

N

A sort to return results in a certain sequence.

session

String

N

The value of the BREEZESESSION cookie. Use this parameter if you do not use a client-side cookie management library.

Filters

You can filter or sort the response on any element or attribute it contains.

Response structure

 <?xml version="1.0" encoding="utf-8" ?>  
 <results> 
     <status code=allowedValue />  
     <report-quiz-question-answer-distribution> 
         <row display-seq=integer interaction-id=integer score=integer  
                 asset-id=integer num-selected=integer> 
             <response>string</response>  
         </row> 
         ... 
     </report-quiz-question-answer-distribution> 
 </results>

Response values

Element

Attribute

Type

Description

results

Container

All results the action returns.

status

Empty, with attributes

The status of the response.

code

Allowed value

A code indicating the response status (see status).

report-quiz-question-answer-distribution

Container

The list of questions and answers.

row

Container

Information about one user, one question, and one answer.

display-seq

Integer

The sequence number of the question in the quiz.

interaction-id

BIGINT

The ID of all of one user’s responses to one quiz question. If the user answers the question multiple times, all answers have the same interaction-id.

score

Integer

The score the user earned on the question.

asset-id

BIGINT

The ID of the version of the quiz in which the user answered the question. The asset-id changes when you upload a new content version.

num-selected

Integer

In multiple choice or true/false quiz questions, the sequence number of the answer selected.

response

String

The response the user gave to the question.

Sample request

 https://example.com/api/xml 
     ?action=report-quiz-question-answer-distribution&sco-id=2006334909

Sample response

 <?xml version="1.0" encoding="utf-8" ?>  
 <results> 
     <status code="ok" />  
     <report-quiz-question-answer-distribution> 
         <row display-seq="1" interaction-id="2006334913" score="0"  
                 asset-id="2006334911" num-selected="1"> 
             <response>san francisco</response>  
         </row> 
         <row display-seq="1" interaction-id="2006334913" score="10"  
                 asset-id="2006334911" num-selected="2"> 
             <response>Sacramento</response>  
         </row> 
         <row display-seq="2" interaction-id="2006334914" score="0"  
                 asset-id="2006334911" num-selected="1"> 
             <response>false</response>  
         </row> 
         ... 
     </report-quiz-question-answer-distribution> 
 </results>

 Adobe

Get help faster and easier

New user?