Learner - Retain Quizzes API

Interfaces

Object Synopses

RetainQuiz

  • id Integer

    The retain quiz ID.

  • course_id Integer

    The ID of the course the retain quiz was generated from.

  • enrollment_id Integer

    The ID of the enrollment for the learner in the course.

  • state String

    The state of the retain quiz. Possible states are ‘scheduled’, ‘current’, and ‘complete’.

  • progress Float

    A number between 0 and 1 indicating how far though the retain quiz the learner has progressed.

  • score Integer

    An integer between 0 and 100 indicating the user’s score based on the number of retain questions answered correctly.

  • current_question_id String

    The ID of current retain question that the user has progressed to in the retain quiz.

  • started_at DateTime

    The time at which the learner started the retain quiz.

  • ended_at DateTime

    The time at which the learner finished the retain quiz.

Show retain quiz

GET /api/learner/retain_quizzes/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}

Update Quiz

PATCH /api/learner/retain_quizzes/:id
PUT /api/learner/retain_quizzes/:id

A POST action for updating a given retain quiz. Currently only updating the started_at attribute is supported

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}

Complete Quiz

POST /api/learner/retain_quizzes/:id/complete

A POST action for completing the given retain quiz

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. A retain quiz id.

Example Response

{
  "quizzes": [
    "{API::RetainQuiz}"
  ]
}