Developer Platform (October 2019)

Quizzes

«  Course updates for end users   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  Assessments and rubrics  »

Contents

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

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,  // Added with LE API v1.33
    "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>
}
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).

Instructions and Description

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

Password

If not null (and visible to the calling user context), the current password set for the 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>
}

Actions

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.28+ – Route first appears in LMS v10.8.0

Return. This action returns an ObjectListPage JSON block containing a list of quizzes belonging to the org unit.

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.28+ – Route first appears in LMS v10.8.0

Return. This action returns a QuizReadData JSON block containing the properties of your identified 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
  • QuizData (QuizData) – Updated quiz data.

Oauth2 Scopes

quizzing:quizzes:read quizzing:quizzes:write

Status Codes
API Versions
  • 1.33+ – Route first appears in LMS v10.8.11

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

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

«  Course updates for end users   ·  [   home  ·   reference  ·   community   ·  search   ·  index   ·  routing table   ·  scopes table   ]   ·  Assessments and rubrics  »