Skip to main content

Get Course Quiz Question

This endpoint retrieves a specific question with id {question_id} for the course identified by {course_id}, under the section identified by {section_id} and written in the lesson identified by {lesson_id}.

The lesson must be of type quiz.

info

This operation requires the user joins the course; the user must also have access to the lesson.

Users with role creator or manager can always access a lesson while the other users should follow the rules setup by the managers.

Rules:

  1. lesson should be published;
  2. if the course type is scheduled the current datetime should be greater than or equal to dripped_at;
  3. if the course type is structured the current datetime should be greater than or equal to the joined_at datetime plus drip_delay days;
  4. if the course has enforce_lessons_order set to true then all the published lessons before the current one should be completed.

HTTP Request

GET /api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/question/{question_id}/

Parameters

NameInTypeRequiredDescription
course_idpathstringtrueA unique integer value identifying the course of the question
section_idpathstringtrueA unique integer value identifying the section of the question
lesson_idpathstringtrueA unique integer value identifying the lesson of the question
question_idpathstringtrueA unique integer value identifying the question

Example Request

const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/course/{course_id}/section/{section_id}/lesson/{lesson_id}/question/{question_id}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKResponse status codeCourse Quiz Question