Quizzes
A Quiz object looks like:
A QuizPermissions object looks like:
Quizzes::QuizzesApiController#index
GET /api/v1/courses/:course_id/quizzes
GET /api/v1/courses/:course_id/quizzes
Scope: url:GET|/api/v1/courses/:course_id/quizzes
Returns the paginated list of Quizzes in this course.
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| The partial title of the quizzes to match and return. |
Example Request:
Returns a list of Quiz objects.
Quizzes::QuizzesApiController#show
GET /api/v1/courses/:course_id/quizzes/:id
GET /api/v1/courses/:course_id/quizzes/:id
Scope: url:GET|/api/v1/courses/:course_id/quizzes/:id
Returns the quiz with the given id.
Returns a Quiz object.
Quizzes::QuizzesApiController#create
POST /api/v1/courses/:course_id/quizzes
POST /api/v1/courses/:course_id/quizzes
Scope: url:POST|/api/v1/courses/:course_id/quizzes
Create a new quiz for this course.
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The quiz title. |
|
| A description of the quiz. |
|
| The type of quiz. Allowed values: |
|
| The assignment group id to put the assignment in. Defaults to the top assignment group in the course. Only valid if the quiz is graded, i.e. if quiz_type is “assignment” or “graded_survey”. |
|
| Time limit to take this quiz, in minutes. Set to null for no time limit. Defaults to null. |
|
| If true, quiz answers for multiple choice questions will be randomized for each student. Defaults to false. |
|
| Dictates whether or not quiz results are hidden from students. If null, students can see their results after any attempt. If “always”, students can never see their results. If “until_after_last_attempt”, students can only see results after their last attempt. (Only valid if allowed_attempts > 1). Defaults to null. Allowed values: |
|
| Only valid if hide_results=null If false, hides correct answers from students when quiz results are viewed. Defaults to true. |
|
| Only valid if show_correct_answers=true and allowed_attempts > 1 If true, hides correct answers from students when quiz results are viewed until they submit the last attempt for the quiz. Defaults to false. |
|
| Only valid if show_correct_answers=true If set, the correct answers will be visible by students only after this date, otherwise the correct answers are visible once the student hands in their quiz submission. |
|
| Only valid if show_correct_answers=true If set, the correct answers will stop being visible once this date has passed. Otherwise, the correct answers will be visible indefinitely. |
|
| Number of times a student is allowed to take a quiz. Set to -1 for unlimited attempts. Defaults to 1. |
|
| Required and only valid if allowed_attempts > 1. Scoring policy for a quiz that students can take multiple times. Defaults to “keep_highest”. Allowed values: |
|
| If true, shows quiz to student one question at a time. Defaults to false. |
|
| Only valid if one_question_at_a_time=true If true, questions are locked after answering. Defaults to false. |
|
| Restricts access to the quiz with a password. For no access code restriction, set to null. Defaults to null. |
|
| Restricts access to the quiz to computers in a specified IP range. Filters can be a comma-separated list of addresses, or an address followed by a mask
Examples:
For no IP filter restriction, set to null. Defaults to null. |
|
| The day/time the quiz is due. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. |
|
| The day/time the quiz is locked for students. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. |
|
| The day/time the quiz is unlocked for students. Accepts times in ISO 8601 format, e.g. 2011-10-21T18:48Z. |
|
| Whether the quiz should have a draft state of published or unpublished. NOTE: If students have started taking the quiz, or there are any submissions for the quiz, you may not unpublish a quiz and will recieve an error. |
|
| Whether students should be prevented from viewing their quiz results past the first time (right after they turn the quiz in.) Only valid if “hide_results” is not set to “always”. Defaults to false. |
|
| Whether this quiz is only visible to overrides (Only useful if ‘differentiated assignments’ account setting is on) Defaults to false. |
Returns a Quiz object.
Quizzes::QuizzesApiController#update
PUT /api/v1/courses/:course_id/quizzes/:id
PUT /api/v1/courses/:course_id/quizzes/:id
Scope: url:PUT|/api/v1/courses/:course_id/quizzes/:id
Modify an existing quiz. See the documentation for quiz creation.
Additional arguments:
Request Parameters:
Parameter | Type | Description |
---|---|---|
|
| If true, notifies users that the quiz has changed. Defaults to true |
Returns a Quiz object.
Quizzes::QuizzesApiController#destroy
DELETE /api/v1/courses/:course_id/quizzes/:id
DELETE /api/v1/courses/:course_id/quizzes/:id
Scope: url:DELETE|/api/v1/courses/:course_id/quizzes/:id
Quizzes::QuizzesApiController#reorder
POST /api/v1/courses/:course_id/quizzes/:id/reorder
POST /api/v1/courses/:course_id/quizzes/:id/reorder
Scope: url:POST|/api/v1/courses/:course_id/quizzes/:id/reorder
Change order of the quiz questions or groups within the quiz
204 No Content response code is returned if the reorder was successful.
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The associated item’s unique identifier |
|
| The type of item is either ‘question’ or ‘group’ Allowed values: |
Quizzes::QuizzesApiController#validate_access_code
POST /api/v1/courses/:course_id/quizzes/:id/validate_access_code
POST /api/v1/courses/:course_id/quizzes/:id/validate_access_code
Scope: url:POST|/api/v1/courses/:course_id/quizzes/:id/validate_access_code
Accepts an access code and returns a boolean indicating whether that access code is correct
Request Parameters:
Parameter | Type | Description |
---|---|---|
| Required | The access code being validated |
© Instructure, Inc. Generated on Wed Nov 6 14:20:09 2024 This documentation is generated directly from the Canvas LMS source code, available on Github.
Last updated