Constructor
new QuizSubmissionQuestion(client, response)
Instantiate a QuizSubmissionQuestion object.
Name | Type | Description |
---|---|---|
client |
Client | The client that is instantiating this object. |
response |
Object | The data for the object. |
Members
(private) _client :Client
The client that instantiated this object.
- Client
attempt1 :QuizSubmissionQuestionAttempt
The first attempt at the question.
attempt2 :QuizSubmissionQuestionAttempt
The second attempt at the question.
attempt3 :QuizSubmissionQuestionAttempt
The second attempt at the question.
correct_answer :String
The correct answer to the question.
- String
current_attempt :Number|null
The current at the question.
- Number | null
description :String
The description of the question.
- String
id :String
The ID of the question.
- String
image :String
The image URL of the question.
- String
options :Array.<String>
The different options to choose from.
- Array.<String>
quiz_question_id :Number
The ID of the question.
- Number
Methods
beginAnswer(attempt, dateopt) → {Promise.<QuizSubmissionQuestion>}
Begin answering the question.
Name | Type | Attributes | Description |
---|---|---|---|
attempt |
Number | The attempt to begin. |
|
date |
Date |
<optional> |
The date of when to begin the question. |
- Type
- Promise.<QuizSubmissionQuestion>
getQuestion() → {Promise.<QuizQuestion>}
Get the question on the quiz.
- Type
- Promise.<QuizQuestion>
submitAnswer(attempt, answer)
Submit an answer to the question. Make sure to use .beginQuestion before this.
Name | Type | Description |
---|---|---|
attempt |
Number | The attempt to begin. |
answer |
String | Number | The answer to give to the question. |