Module: playerapi/quiz/QuizContext

This context provides methods to handle a quiz.

Members

<inner> getQuestionById

Gets the current question.

Methods

<inner> getMasteryScore() → {number}

Gets the mastery score.

The mastery score represents the goal to pass the sco.
A student can pass the sco while getting a score equal or greater than the mastery score.

Returns:

The mastery score in percent.

Type
number

<inner> getQuestions() → {Array.<module:playerapi/quiz/QuestionContext>}

Gets an array with all questions.

Returns:

An array of questioncontexts. An empty array, if no quiz-object exists.

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

<inner> getScore() → {number}

Gets the current score.

The returned score depends on the learning mode.



  • learning:

    The score represents the current progress (percent) of the wbt.
    A student can get a 100% score by simply viewing all wbt pages.


  • assessment:

    The score represents the current assessment score (percent).
    A student can get a 100% score only by solving all interactions and tests correctly.

Returns:

The current score in percent.

Type
number

<inner> isCompleted() → {boolean}

Gets completed state for the quiz.

Returns:

true if the quiz is completed and a changing the result is not possible.

Type
boolean

<inner> isFailed() → {boolean}

Gets failed state for the quiz.

Returns:

true if the quiz is failed, false otherwise.

Type
boolean

<inner> isPassed() → {boolean}

Gets passed state for the quiz.

Returns:

true if the quiz is passed, false otherwise.

Type
boolean