> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/canvas/resources/course_quiz_extensions.md).

# Course Quiz Extensions

API for setting extensions on student quiz submissions at the course level

#### A CourseQuizExtension object looks like: <a href="#coursequizextension" id="coursequizextension"></a>

```js
{
  // The ID of the Student that needs the quiz extension.
  "user_id": 3,
  // Number of times the student is allowed to re-take the quiz over the
  // multiple-attempt limit.
  "extra_attempts": 1,
  // Amount of extra time allowed for the quiz submission, in minutes.
  "extra_time": 60,
  // The student can take the quiz even if it's locked for everyone else
  "manually_unlocked": true,
  // The time at which the quiz submission will be overdue, and be flagged as a
  // late submission.
  "end_at": "2013-11-07T13:16:18Z"
}
```

## [Set extensions for student quiz submissions](#method.quizzes/course_quiz_extensions.create) <a href="#method.quizzes-course_quiz_extensions.create" id="method.quizzes-course_quiz_extensions.create"></a>

[Quizzes::CourseQuizExtensionsController#create](https://github.com/instructure/canvas-lms/blob/master/app/controllers/quizzes/course_quiz_extensions_controller.rb)

#### `POST /api/v1/courses/:course_id/quiz_extensions`

**Scope:** `url:POST|/api/v1/courses/:course_id/quiz_extensions`

\<b>Responses\</b>

* \<b>200 OK\</b> if the request was successful
* \<b>403 Forbidden\</b> if you are not allowed to extend quizzes for this course

#### Request Parameters:

| Parameter            | Type               | Description                                                                                                                                                                              |
| -------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `user_id`            | Required `integer` | The ID of the user we want to add quiz extensions for.                                                                                                                                   |
| `extra_attempts`     | `integer`          | <p>Number of times the student is allowed to re-take the quiz over the<br>multiple-attempt limit. This is limited to 1000 attempts or less.</p>                                          |
| `extra_time`         | `integer`          | <p>The number of extra minutes to allow for all attempts. This will<br>add to the existing time limit on the submission. This is limited to<br>10080 minutes (1 week)</p>                |
| `manually_unlocked`  | `boolean`          | <p>Allow the student to take the quiz even if it's locked for<br>everyone else.</p>                                                                                                      |
| `extend_from_now`    | `integer`          | <p>The number of minutes to extend the quiz from the current time. This is<br>mutually exclusive to extend\_from\_end\_at. This is limited to 1440<br>minutes (24 hours)</p>             |
| `extend_from_end_at` | `integer`          | <p>The number of minutes to extend the quiz beyond the quiz's current<br>ending time. This is mutually exclusive to extend\_from\_now. This is<br>limited to 1440 minutes (24 hours)</p> |

#### Example Request:

```bash
{
  "quiz_extensions": [{
    "user_id": 3,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": true
  },{
    "user_id": 2,
    "extra_attempts": 2,
    "extra_time": 20,
    "manually_unlocked": false
  }]
}
```

```bash
{
  "quiz_extensions": [{
    "user_id": 3,
    "extend_from_now": 20
  }]
}
```

#### Example Response:

```js
{
  "quiz_extensions": [QuizExtension]
}
```

***

This documentation is generated directly from the Canvas LMS source code, available [on Github](https://github.com/instructure/canvas-lms).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developerdocs.instructure.com/services/canvas/resources/course_quiz_extensions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
