Add Post Learning Activity - Online Test

This API is used to create an online test as a part of post-learning activities in LMS

Request URL: 

https://people.zoho.com/api/v1/courses/<courseId>/settings/postcourseactivities/onlineTests?onlineTestData ={"name" : <name> , "duration" : <duration>, "durationFor" : <durationFor>,"questionsPerPage" : <questionsPerPage>,"description" : "<description>", "isMandatory" : <isMandatory> , "shuffleQuestions" : <shuffleQuestions>, "showMarksToLearner" : <showMarksToLearner>, "gradeCategoryId" : <gradeCategoryId>}

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Scope:

ZOHOPEOPLE.training.ALL
OR
ZOHOPEOPLE.training.CREATE

Possible Operation Types:

ALL - Complete access to data
CREATE - Only to create data

Method:

POST

Request Parameters

ParametersValues AllowedDefault ValueDescription
*onlineTestData <parameters in JSON Object> JSON Input

 

ParametersValues AllowedDefault ValueDescription
*name<Online test name><Mandatory>Specify the online test name
*durationFor<none|test|question><Mandatory>

Specify the duration

*duration<Duration in minutes><Mandatory if duration is not none>Specify the duration
*maximumAttemptsAllowed1-10|unlimited<Mandatory>Specify the maximum allowed attempts value
*questionPerPageall|one<Mandatory>Specify the questions per page
passPercentage1-100-Specify the pass percentage
shuffleQuestionstrue|false-Specify the shuffle questions
showMarksToLearnertrue|false-Specify if marks must be showed to learners at the end of the test
description<Description>-Specify the description
isMandatorytrue|falsetrueSpecify if the test is mandatory or not
lockUntil

<lockUntil date in DD-MM-YYYY format>

-Specify the lockUntil date
gradeCategoryId<Grade category id>-Specify the Grade category id
resources<files>-Specify resources

*mandatory parameters

Request

Copiedhttps://people.zoho.com/api/v1/courses/219225000000642002/settings/postcourseactivities/onlineTests?onlineTestData={"name" : "Online test One", "duration" : 35, "durationFor" : "test", "lockUntil" : "01-01-2022", "description" : "Description for Online  test", "maximumAttemptsAllowed" : "5","questionsPerPage" : "all", "isMandatory" : true, "passPercentage" : 80, "shuffleQuestions" : true, "showMarksToLearner" : true, "gradeCategoryId" : ""}

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Response

Copied{
    "code": "200",
    "message": "success",
    "onlineTest": {
        "previewURL": "https://people.zoho.com/peoplelms/assessments/219225000000671069/preview",
        "showMarksToLearner": "Yes",
        "totalLearnersCount": 0,
        "resources": [],
        "canUserDelete": true,
        "duration": "35 minutes",
        "isMandatoryTest": false,
        "lockUntil": "",
        "gradeCategoryName": "",
        "completedLearnersCount": 0,
        "isLocked": false,
        "maximumAttemptsAllowed": 1,
        "testId": "219225000000671061",
        "canUserEdit": true,
        "moduleId": 0,
        "testMark": "0.0",
        "testName": "Online test One",
        "status": "Not ready"
    }
}