# QuizSubmissionQuestion

Represents a submission question on a quiz on SMHW.

## Constructor

#### new QuizSubmissionQuestion(client, response)

Instantiate a QuizSubmissionQuestion object.

Parameters:

Name | Type | Description
--- | --- | ---
`client` | Client | The client that is instantiating this object.
`response` | Object | The data for the object.

Source:
  - structures/QuizSubmissionQuestion.js, line 12

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/QuizSubmissionQuestion.js, line 18

#### attempt1 :QuizSubmissionQuestionAttempt

The first attempt at the question.

Type:

- QuizSubmissionQuestionAttempt

Source:
  - structures/QuizSubmissionQuestion.js, line 24

#### attempt2 :QuizSubmissionQuestionAttempt

The second attempt at the question.

Type:

- QuizSubmissionQuestionAttempt

Source:
  - structures/QuizSubmissionQuestion.js, line 30

#### attempt3 :QuizSubmissionQuestionAttempt

The second attempt at the question.

Type:

- QuizSubmissionQuestionAttempt

Source:
  - structures/QuizSubmissionQuestion.js, line 36

#### correct_answer :String

The correct answer to the question.

Type:

- String

Source:
  - structures/QuizSubmissionQuestion.js, line 42

#### current_attempt :Number|null

The current at the question.

Type:

- Number | null

Source:
  - structures/QuizSubmissionQuestion.js, line 48

#### description :String

The description of the question.

Type:

- String

Source:
  - structures/QuizSubmissionQuestion.js, line 53

#### id :String

The ID of the question.

Type:

- String

Source:
  - structures/QuizSubmissionQuestion.js, line 59

#### image :String

The image URL of the question.

Type:

- String

Source:
  - structures/QuizSubmissionQuestion.js, line 65

#### options :Array.<String>

The different options to choose from.

Type:

- Array.<String>

Source:
  - structures/QuizSubmissionQuestion.js, line 71

#### quiz_question_id :Number

The ID of the question.

Type:

- Number

Source:
  - structures/QuizSubmissionQuestion.js, line 77

### Methods

#### beginAnswer(attempt, dateopt) → {Promise.<QuizSubmissionQuestion>}

Begin answering the question.

Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`attempt` | Number |  | The attempt to begin.
`date` | Date | <optional> | The date of when to begin the question.

Source:
  - structures/QuizSubmissionQuestion.js, line 94

Returns:

Type
  Promise.<QuizSubmissionQuestion>

#### getQuestion() → {Promise.<QuizQuestion>}

Get the question on the quiz.

Source:
  - structures/QuizSubmissionQuestion.js, line 84

Returns:

Type
  Promise.<QuizQuestion>

#### submitAnswer(attempt, answer)

Submit an answer to the question. Make sure to use .beginQuestion before this.

Parameters:

Name | Type | Description
--- | --- | ---
`attempt` | Number | The attempt to begin.
`answer` | String | Number | The answer to give to the question.

Source:
  - structures/QuizSubmissionQuestion.js, line 145