Module: playerapi/quiz/QuestionContext

This context provides methods for a quiz question.
A question is according to a page.

Methods

<inner> getAnswers() → {Array.<module:playerapi/quiz/AnswerContext>}

Gets an array with all quiz answers corresponding to the question.

Returns:

An array of all quiz objects. An empty array, if no quiz-object exists in the page.

Type
Array.<module:playerapi/quiz/AnswerContext>

<inner> getFeedback() → {boolean}

Returns:

The finalizing state

Type
boolean

<inner> getInstruction() → {boolean}

Returns:

The finalizing state

Type
boolean

<inner> getMaxScore() → {number}

Gets the maximum reachable score for the page.

Returns:

The maximum score

Type
number

<inner> getPageMetadata() → {module:playerapi/page/PageMetadata}

Gets the meta data for the page.

Returns:

The page according to the question.

Type
module:playerapi/page/PageMetadata

<inner> getScore() → {number}

Gets the user score for the page.

Returns:

The Score

Type
number

<inner> getStatus() → {string}

Gets the quiz status.

Returns:

Possible values are: "correct", "partially_correct", "failed" or "unknown"

Type
string

<inner> isFinalized() → {boolean}

Checks if a question is finalized. That means that the user is not allowed to make changes to affect the result.

Returns:

The finalizing state

Type
boolean