Edit Pre Learning Activity - Online Test

This API is used to update an online test in pre-learning activity 

Request URL: 

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

Header:

Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Scope:

ZOHOPEOPLE.training.ALL
OR
ZOHOPEOPLE.training.UPDATE

Possible Operation Types:

ALL - Complete access to data
UPDATE - Only to update data

Method:

PATCH

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

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

Request

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Response

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