QuizSubmissionQuestion

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.

Members

(private) _client :Client

The client that instantiated this object.

Type:
  • 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.

Type:
  • String

current_attempt :Number|null

The current at the question.

Type:
  • Number | null

description :String

The description of the question.

Type:
  • String

id :String

The ID of the question.

Type:
  • String

image :String

The image URL of the question.

Type:
  • String

options :Array.<String>

The different options to choose from.

Type:
  • Array.<String>

quiz_question_id :Number

The ID of the question.

Type:
  • Number

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.

Returns:
Type
Promise.<QuizSubmissionQuestion>

getQuestion() → {Promise.<QuizQuestion>}

Get the question on the quiz.

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.