Developer Platform (November 2024)

Quizzes

«  Release Conditions   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  Surveys  »

Attributes

LATESUBMISSIONOPTION_T

Late submission allowances can be accommodated in several ways. We use the term LATESUBMISSIONOPTION_T to stand in for an appropriate integer type.

Late submission option

Value

AllowNormalSubmission

0

UseLateLimit

1 ^

AutoSubmitAttempt

2

^ As of LE API v1.71, this type value is no longer supported or used.

OVERALLGRADECALCULATION_T

The grade calculation for a quiz, where multiple attempts are allowed. We use the term OVERALLGRADECALCULATION_T to stand in for an appropriate integer type.

Overall Grade Calculation Option

Value

Highest Attempt

1

Lowest Attempt

2

Average of all Attempts

3

First Attempt

4

Last Attempt

5

QUIZPAGINGTYPEID_T

Exposes page break information from the New Quiz Experience.

Overall Grade Calculation Option

Value

All questions on one page

0

One question per page

1

Page breaks after each section

2

Five questions per page

3

Ten questions per page

4

Quiz.QuizReadData

When the service sends you information about a quiz, it will send back a JSON structure like this:

{
    "QuizId": <number:D2LID>,
    "Name": <string>,
    "IsActive": <boolean>,
    "SortOrder": <number>,
    "AutoExportToGrades": <boolean>|null,
    "GradeItemId": <number:D2LID>|null,
    "IsAutoSetGraded": <boolean>,
    "Instructions": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "Description": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "DisplayInCalendar": <boolean>,
    "AttemptsAllowed": {
        "IsUnlimited": <boolean>,
        "NumberOfAttemptsAllowed": <number>|null
    },
    "LateSubmissionInfo": {
        "LateSubmissionOption": <number:LATESUBMISSIONOPTION_T>,
        "LateLimitMinutes": <number>|null
    },
    "SubmissionTimeLimit": {
        "IsEnforced": <boolean>,
        "ShowClock": <boolean>,
        "TimeLimitValue": <number>
    },
    "SubmissionGracePeriod": <number>|null,
    "Password": <string>|null,
    "Header": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "Footer": {
        "Text": { <composite:RichText> },
        "IsDisplayed": <boolean>
    },
    "AllowHints": <boolean>,
    "DisableRightClick": <boolean>,
    "DisablePagerAndAlerts": <boolean>,
    "NotificationEmail": <string>|null,
    "CalcTypeId": <number:OVERALLGRADECALCULATION_T>,
    "RestrictIPAddressRange": null|[
        {
            "IPRangeStart": <string>,
            "IPRangeEnd": <string>|null
        }
    ],
    "CategoryId": <number>|null,
    "PreventMovingBackwards": <boolean>,
    "Shuffle": <boolean>,
    "ActivityId": <string>|null,
    "AllowOnlyUsersWithSpecialAccess": <boolean>,
    "IsRetakeIncorrectOnly": <boolean>,
    "PagingTypeId": <number:QUIZPAGINGTYPEID_T>|null,  // Added with LMS v20.24.8
    "IsSynchronous": <boolean>,  // Added with LE API v1.73
    "DeductionPercentage": <number>|null  // Added with LMS v20.23.11
}
Instructions.Text, Description.Text, Header.Text, Footer.Text

These RichText properties can be displayed, or hidden, upon presentation of the quiz to those taking it (based on the value of their associated IsDisplayed property).

AttemptsAllowed

If the IsUnlimited property is True, then the NumberOfAttemptsAllowed property will be null; if IsUnlimited is False, then NumberOfAttemptsAllowed will contain the number of attempts allowed (default value is 1).

LateSubmissionInfo

As of LE API v1.71, the back-end service will ignore any value you set for LateLimitMinutes and if you set LateSubmissionOption to 1 it will instead use the value 2 (for “AutoSubmitAttempt”).

SubmissionGracePeriod

As of LE API v1.71, the back-end service will not use any value you set for this field.

Password

If not null (and visible to the calling user context), the current password set for the quiz.

NotificationEmail

If not null (and visible to the calling user context), the current notification email to receive notice of quiz attempts.

RestrictIpAddressRange

Null, or, if some IP address ranges are restricted, a list of start-end pairs that describe the restricted ranges. Within each range, both the range-start and range-end strings must be valid IPv4 addresses; if a range has range-start string, but null for the range-end, then this restricts all IP address after than the range-start address.

PreventMovingBackwards

When true, prevents the quiz taker from paging backwards in this quiz.

Shuffle

When true, the order of the questions is randomized.

AllowOnlyUsersWithSpecialAccess

When true, allow only users with special access to see this quiz.

IsRetakeIncorrectOnly

When true, the quiz taker will only need to answer questions that were previously incorrect on second and subsequent attempts of this quiz.

PagingTypeId

For quizzes using modern paging methods, contains the number corresponding to the quiz paging type. For quizzes using the classic paging method, this field value will be null.

IsSynchronous

When true, the timer for the quiz starts automatically at StartDate instead of when the user actually starts the quiz.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value to be deducted from the final attempt grade.

Quiz.QuizData

When updating quiz data, use a JSON structure like this:

{
    "Name": <string>,
    "IsActive": <boolean>,
    "SortOrder": <number>,
    "AutoExportToGrades": <boolean>|null,
    "GradeItemId": <number:D2LID>|null,
    "IsAutoSetGraded": <boolean>,
    "Instructions": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "Description": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "StartDate": <string:UTCDateTime>|null,
    "EndDate": <string:UTCDateTime>|null,
    "DueDate": <string:UTCDateTime>|null,
    "DisplayInCalendar": <boolean>,
    "NumberOfAttemptsAllowed": <number>|null,
    "LateSubmissionInfo": {
        "LateSubmissionOption": <number:LATESUBMISSIONOPTION_T>,
        "LateLimitMinutes": <number>|null
    },
    "SubmissionTimeLimit": {
        "IsEnforced": <boolean>,
        "ShowClock": <boolean>,
        "TimeLimitValue": <number>
    },
    "SubmissionGracePeriod": <number>|null,
    "Password": <string>|null,
    "Header": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "Footer": {
        "Text": { <composite:RichTextInput> },
        "IsDisplayed": <boolean>
    },
    "AllowHints": <boolean>,
    "DisableRightClick": <boolean>,
    "DisablePagerAndAlerts": <boolean>,
    "NotificationEmail": <string>|null,
    "CalcTypeId": <number:OVERALLGRADECALCULATION_T>,
    "RestrictIPAddressRange": null|[
        {
            "IPRangeStart": <string>,
            "IPRangeEnd": <string>|null
        }, ...
    ],
    "CategoryId": <number>|null,
    "PreventMovingBackwards": <boolean>,
    "Shuffle": <boolean>,
    "AllowOnlyUsersWithSpecialAccess": <boolean>,
    "IsRetakeIncorrectOnly": <boolean>,
    "PagingTypeId": <number:QUIZPAGINGTYPEID_T>|null,  // Added with LE API v1.78
    "IsSynchronous": <boolean>,  // Added with LE API v1.73
    "DeductionPercentage": <number>|null  // Added with LE API v1.74
}
Instructions.Text, Description.Text, Header.Text, Footer.Text

Note that these properties all use the RichTextInput structure type.

StartDate

Date and time that marks the start of the quiz. If IsSynchronous is true, then the quiz’s timer starts at the StartDate; otherwise, the quiz’s timer starts when the user first starts the quiz.

NumberOfAttemptsAllowed

Must be between 1 and 10 inclusive or null for unlimited.

LateSubmissionInfo

As of LE API v1.71, the back-end service will ignore any value you set for LateLimitMinutes and if you set LateSubmissionOption to 1 it will instead use the value 2 (for “AutoSubmitAttempt”).

SubmissionGracePeriod

As of LE API v1.71, the back-end service will not use any value you set for this field.

SubmissionGracePeriod.TimeLimitValue

Represented in minutes. For no time limit, set TimeLimitValue to 0 with IsEnforced and IsSynchronous set to false. For enforced time limit, set TimeLimitValue between 1 and 9999 with IsEnforced set to true.

Password

If not null (no password to set), must not be an empty string or whitespace.

NotificationEmail

If not null (no email to notify), must be a valid email address.

RestrictIpAddressRange

Null, or, if some IP address ranges are restricted, a list of start-end pairs that describe the restricted ranges. Within each range, both the range-start and range-end strings must be valid IPv4 addresses; if a range has range-start string, but null for the range-end, then this restricts all IP address after than the range-start address.

PreventMovingBackwards

When true, prevents the quiz taker from paging backwards in this quiz.

Shuffle

When true, the order of the questions is randomized.

AllowOnlyUsersWithSpecialAccess

When true, allow only users with special access to see this quiz.

Note

The AllowOnlyUsersWithSpecialAccess property is ignored (but still required with some value) if the calling user does not have permission to add special access to quizzes.

IsRetakeIncorrectOnly

When true, the quiz taker will only need to answer questions that were previously incorrect on second and subsequent attempts of this quiz.

PagingTypeId

For quizzes using modern paging methods, contains the number corresponding to the quiz paging type. As of LE API v1.78, any attempt to set the value NULL or to update the classic quiz will reset the PagingTypeId value to 0

IsSynchronous

When true, the timer for the quiz starts automatically at StartDate instead of when the user actually starts the quiz.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value to be deducted from the final attempt grade. Must be between 0 and 100.

Quiz Attempts

Quiz.QuizAttemptData

When the service sends you information about a quiz attempt, it will send back a JSON structure like this:

{
     "AttemptId": <number:D2LID>,
     "QuizId": <number:D2LID>,
     "UserId": <number:D2LID>,
     "AttemptNumber": <number>,
     "Score": <number:decimal>|null,
     "Started": <string:UTCDateTime>,
     "Completed": <string:UTCDateTime>|null,
     "AttemptFeedback": { <composite:RichText> },
     "FeedbackLastModified": <string:UTCDateTime>|null,
     "IsPublished":  <boolean>,
     "IsRetakeIncorrectOnly": <boolean>,
     "AttemptDueDate": <string:UTCDateTime>|null,
     "AttemptEnforceTimeLimit": <boolean>,
     "AttemptSubmissionTimeLimit": <number>,
     "AttemptSubmissionGraceLimit": <number>,
     "AttemptSubmissionLateTypeId": <number>,
     "AttemptSubmissionLateData": <number>,
     "AttemptIsSynchronous": <boolean>,  // Added with LE API v1.73
     "DeductionPercentage": <number>|null  // Added with LMS v20.23.11
}
Started

The date and time that this quiz attempt was started.

Completed

The date and time that this quiz attempt was completed or null if it in progress.

IsPublished

When true, the quiz attempt feedback is available to the student.

IsRetakeIncorrectOnly

When true, this quiz attempt was a retake incorrect questions only attempt.

AttemptSubmissionLateTypeId

Specifies the behaviour for when the grace period is exceeded for this attempt; see LATESUBMISSIONOPTION_T for the possible values.

AttemptSubmissionLateData

Specifies the extended deadline (in minutes) for this attempt.

AttemptIsSynchronous

When true, this quiz attempt has a synchronous start time.

DeductionPercentage

If not null, denotes the percentage of each incorrect question’s point value that was deducted from the final attempt grade.

Quiz Categories

Quiz.QuizCategoryData

When creating or updating a quiz category, use a structure like this:

{
    "Name": <string>,
    "SortOrder": <number>
}
Quiz.QuizCategoryReadData

When the service sends you information about a quiz category, it will send back a JSON structure like this:

{
    "CategoryId": <number:D2LID>,
    "Name": <string>,
    "SortOrder": <number>
}

Questions

QUESTION_T

Quizzing supports questions that assess answers in a variety of ways. We use the term QUESTION_T to stand in for an appropriate integer type.

Question Type

Value

MultipleChoice

1

TrueFalse

2

FillInTheBlank

3

MultiSelect

4

Matching

5^

Ordering

6^

LongAnswer

7

ShortAnswer

8

Likert

9

ImageInfo

10^

TextInfo

11^

Arithmetic

12^

SignificantFigures

13^

MultiShortAnswer

14

^ QuestionInfo will be null for the these question types.

EVALULATION_T

The questions have several evaluation types. We use the term EVALULATION_T to stand in for an appropriate integer type.

Evaluation Type

Value

CaseInsensitive

0

CaseSensitive

1

RegularExpression

2

ENUMERATION_T

The questions have several evaluation types. We use the term ENUMERATION_T to stand in for an appropriate integer type.

Enumeration

Value

Numbers

1

Roman Numerals

2

UpperCase Roman Numerals

3

Letters

4

UpperCase Letters

5

No Enumeration

6

GRADINGRULE_T

The questions have grading rules. We use the term GRADINGRULE_T to stand in for an appropriate integer type. For Short Answer question types, grading rule 3 is equally weighted; For Multi-select question types, grading rule 3 is Correct Answers Limited Selections.

Grading Rule

Value

All or Nothing

0

Right minus wrong

1

Correct answers

2

Equally weighted/Correct Answers Limited Selections

3

STYLE_T

The questions have style options. We use the term STYLE_T to stand in for an appropriate integer type.

Style

Value

Horizontal

1

Vertical

2

Dropdown

3

CALE_T The questions have scale options. We use the term SCALE_T to stand in for an appropriate integer type.

Style

Value

One to Five

0

One to Eight

1

One to Ten

2

Agreement

3

Satisfaction

4

Frequency

5

Importance

6

Opposition

7

Quiz.QuestionData

When the service sends you information about a quiz question, it will send back a JSON structure like this:

{
   "QuestionId": <number:D2LID>,
   "QuestionTypeId": <number:QUESTION_T>,
   "Name": <string>|null,
   "QuestionText": { <composite:RichText> },
   "Points": <number>,
   "Difficulty": <number>,
   "Bonus": <boolean>,
   "Mandatory": <boolean>,
   "Hint": { <composite:RichText> },
   "Feedback": { <composite:RichText> },
   "LastModified": <utcdatetime>,
   "LastModifiedBy": <number:D2LID>|null,
   "SectionId": <number:D2LID>,
   "QuestionTemplateId": <number:D2LID>,
   "QuestionTemplateVersionId": <number:D2LID>,
   "QuestionInfo": { <composite:QuestionInfo> }
}

Each question type adds its own set of QuestionInfo.

Question.QuestionInfo

Multiple Choice. Question info of the MultipleChoice type (1), have these properties:

{
   "Answers": [
       {
       "PartId": <number:D2LID>,
       "Answer": { <composite:RichText> },
       "AnswerFeedback": { <composite:RichText> },
       "Weight": <number>
       }, ...
   ],
   "Randomize": <boolean>,
   "Enumeration": <number:ENUMERATION_T>
}

True-False. Question info of the TrueFalse type (2) have these properties:

{
   "TruePartId": <number:D2LID>,
   "TrueWeight": <number>,
   "TrueFeedback": { <composite:RichText> },
   "FalsePartId": <number:D2LID>,
   "FalseWeight": <number>,
   "FalseFeedback": { <composite:RichText> },
   "Enumeration": <number:ENUMERATION_T>
}

Fill In The Blank. Question info of the FillInTheBlank type (3) have these properties:

{
   "Texts": [
       {
       "Text": { <composite:RichText> }
       }, ...
   ],
   "Blanks": [
       {
       "PartId": <number:D2LID>,
       "Size": <number>,
       "Answers": [
          {
             "TextAnswer": <string>,
             "Weight": <number>,
             "EvaluationType": <number:EVALULATION_T>
          }, ...
       ]
       }, ...
   ]
}

Multi-Select. Question info of the MultiSelect type (4), have these properties:

{
    "Answers": [
        {
           "PartId": <number:D2LID>,
           "Answer": { <composite:RichText> },
           "AnswerFeedback": { <composite:RichText> },
           "IsCorrect": <boolean>
        }, ...
    ],
    "Randomize": <boolean>,
    "Enumeration": <number:ENUMERATION_T>,
    "Style": <number:STYLE_T>,
    "GradingType": <number:GRADINGRULE_T>
}

Long Answer. Question info of the LongAnswer type (7) have these properties:

{
   "PartId": <number:D2LID>,
   "EnableStudentEditor": <boolean>,
   "InitialText": { <composite:RichText> },
   "AnswerKey": { <composite:RichText> },
   "EnableAttachments": <boolean>
}

Short Answer. Question info of the ShortAnswer type (8) have these properties:

{
   "Blanks":[
       {
       "PartId": <number:D2LID>,
       "Answers":[
            {
            "Text": <string>,
            "Weight": <number>
            }, ...
       ],
       "EvaluationType": <number:EVALULATION_T>
       }, ...
   ],
   "GradingType": <number:GRADINGRULE_T>
}

Likert. Question info of the Likert type (9), have these properties:

{
   "Scale": <number:SCALE_T>,
   "NaOption": <boolean>,
   "Statements": [
       {
           "PartId": <number:D2LID>,
           "Statement": { <composite:RichText> }
       }, ...
   ],
}

Multiple Short Answer. Question info of the MultipleShortAnswer type (14) have these properties:

{
   "PartIds": [ <number:D2LID>, ... ],
   "Boxes": <number>,
   "Rows": <number>,
   "Columns": <number>,
   "Answers": [
       {
       "AnswerText": <string>,
       "Weight": <number>,
       "EvaluationType": <number:EVALUATION_T>
       }, ...
   ]
}

Special Access

Quiz.SpecialAccessData

When creating or updating special access for a quiz, use a structure like this:

{
   "StartDate": <string:UTCDateTime>|null,
   "EndDate": <string:UTCDateTime>|null,
   "DueDate": <string:UTCDateTime>|null,
   "SubmissionTimeLimit": null|{
         "IsEnforced": <boolean>,
         "TimeLimitValue": <number>
   },
   "AttemptsAllowed": null|{
      "IsUnlimited": <boolean>,
      "NumberOfAttemptsAllowed": <number>|null
   }
}
SubmissionTimeLimit

When null, SubmissionTimeLimit will not be overridden.

TimeLimitValue

Represented in minutes. Must be between 0 and 9999 inclusive. For no time limit, set TimeLimitValue to 0 with IsEnforced set to false. For enforced time limit, set TimeLimitValue between 1 and 9999 with IsEnforced set to true.

AttemptsAllowed

When null, AttemptsAllowed will not be overridden.

NumberOfAttemptsAllowed

Must be between 1 and 10 inclusive or null for unlimited.

Quiz.SpecialAccessUserData

When retrieving special access in a quiz, use a structure like this:

{
    "UserId": <number:D2LID>,
    "SpecialAccess": <composite:Quiz.SpecialAccessData>
}

Actions

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Delete a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/

Retrieve the quizzes belonging to an org unit.

Parameters:
Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizReadData blocks.

Note

This action only returns the quiz objects that the calling user context has permission to see. If the calling user has no permission to see any quiz objects, this action returns an empty result page.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Retrieve a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizReadData JSON block containing the properties of your identified quiz.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/access/

Retrieve a list of users with access to a specified quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Query Parameters:
  • userId (D2LID) – Optional. Retrieve access for a single user.

  • roleId (D2LID) – Optional. Retrieve access for users with the given role.

Oauth2 Scopes:

quizzing:access:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing a list of UserAccess blocks.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/

Create a new quiz.

Parameters:
JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:create

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizReadData JSON block containing the properties of your quiz.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)

Update a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Input. Note that your provided block’s data replaces all the associated quiz’s properties on the service.

This action will also report an invalid quiz data error if you try to restrict a shared quiz for special access or if you try to set auto-submit on for a quiz with mandatory questions.

Return. This action returns a QuizReadData JSON block containing the updated properties of your quiz.

Quiz Attempts

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/attempts/

Retrieve a list of attempts for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Query Parameters:
  • userId (D2LID) – Optional. Retrieve attempts for a single user.

Oauth2 Scopes:

quizzing:attempts:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizAttemptData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/attempts/(attemptId)

Retrieve a quiz attempt.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • attemptId (D2LID) – Attempt ID.

Oauth2 Scopes:

quizzing:attempts:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizAttemptData JSON block containing the properties of your identified quiz attempt.

Quiz Categories

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Delete a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/

Retrieve the quiz categories belonging to an org unit.

Parameters:
Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuizCategoryReadData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Retrieve a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizCategoryReadData JSON block containing the properties of your identified quiz category.

POST /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/

Create a new quiz category.

Parameters:
JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:create

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizCategoryReadData JSON block containing the data for the newly created quiz category.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/categories/(categoryId)

Update a quiz category.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • categoryId (D2LID) – Quiz Category ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:read quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a QuizCategoryReadData JSON block containing the updated data for your quiz category.

Questions

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/questions/

Retrieve all the questions in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing a list of QuestionData blocks.

Special Access

Members of the classlist can be given access to a quiz either for a limited time or in perpetuity. The quiz access data will be in a SpecialAccessData JSON data block or in SpecialAccessUserData JSON Data blocks if a non-empty set of students’ data is returned in the response.

DELETE /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Delete a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

Oauth2 Scopes:

quizzing:quizzes:delete

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/

Retrieve special access rules for users in a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns an ObjectListPage JSON block containing the resulting SpecialAccessUserData blocks.

GET /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Retrieve a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

Oauth2 Scopes:

quizzing:quizzes:read

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

Return. This action returns a SpecialAccessData JSON block.

PUT /d2l/api/le/(version)/(orgUnitId)/quizzes/(quizId)/specialaccess/(userId)

Create or update a user’s special access rule for a quiz.

Parameters:
  • version (D2LVERSION) – API version.

  • orgUnitId (D2LID) – Org unit ID.

  • quizId (D2LID) – Quiz ID.

  • userId (D2LID) – User ID.

JSON Parameters:
Oauth2 Scopes:

quizzing:quizzes:write

Status Codes:
API Versions:
  • 1.67+ – Route first appears in LMS v20.23.1.

  • 1.61-66Deprecated as of LMS v20.24.1.

  • 1.60-Obsolete as of LMS v20.24.1.

«  Release Conditions   ·  [   home  ·   reference  ·   community   |   search  ·   index   ·  routing table   ·  scopes table   ]   ·  Surveys  »