Introduction
The Learn365 API enables you to retrieve and download learners' quiz answers in the QuizAttempts section. The State string in the Response body of the requests made in the QuizAttempts section contains certain data about the quiz questions and a learner's answers on each attempt they have to complete a quiz. The data is stated in .JSON format, the explanation of which can be found in the Quiz Attempt State section of the API documentation page and in this article.
In this article, we'll show you how to read the State string in the Response body of the requests made in the QuizAttempts section of the Learn365 API.
The State string explanation
The State string in the Response body contains the following information:
- Each quiz question starts with the quiz question ID, as shown in the following image.
For information about how to get a question ID in the Quizzes section, see this article.
- The percentage obtained by the learner for an answer in this attempt is displayed in the Percent property, as shown in the following image.
- The question type is stated in the QuestionType property and can be identified by a number, the definition of which can be found in the Quiz Attempt State > QuestionType section of the API documentation page.
- The AnswerResult shows a learner's answers and answers IDs, depending on the question type:
-
- The learner's answer ID is stated for the Multiple choice and Multiple answers question types. For information about quiz question answers and their IDs, see this article.
-
- For the Ordering question type, the answer IDs are stated in the order selected by the learner. For information about quiz question answers and their IDs, see this article.
-
- The learner's answers to a True or false question type are displayed as the true or false answer given by the learner. No answer ID is presented.
-
- A learner's answers to Free answer, Short answer, and Gap fill question types can be tracked.
-
- For answers to a Matching question type, you find the IDs of the answers that the learner selected as a match within its square brackets. Each matching pair in the answer is separated by a comma. For information about quiz question answers and their IDs, see this article.
-
- The answers to Hot spot questions contain the Position X and Y data of the learner's answer spot on the image. No answer ID is presented. For information about quiz question answers, see this article.
Comments
Article is closed for comments.