Update Online Test API
This API is used to update online test in modules of course or batch in LMS
Request URL: (Self Paced Course)
https://people.zoho.com/api/v1/courses/<courseId>/modules/<moduleId>/onlineTests?/<onlineTestId>?onlineTestData ={"name" : <name> , "duration" : <duration>, "durationFor" : <durationFor>, "description" : <description>, "lockUntil" : <lockUntil>, "maximumAttemptsAllowed" : <maximumAttemptsAllowed>, "questionsPerPage" : <questionsPerPage>, "isMandatory" : <isMandatory> , "passPercentage" : <passPercentage>, "shuffleQuestions" : <shuffleQuestions>, "showMarksToLearner" : <showMarksToLearner>, "gradeCategoryId" : <gradeCategoryId>}
Request URL: (Blended Learning Course)
https://people.zoho.com/api/v1/courses/<courseId>/batches/<batchId>/modules/<moduleId>/onlineTests/<onlineTestId>?onlineTestData ={"name" : <name> , "duration" : <duration>, "durationFor" : <durationFor>, "description" : <description>, "lockUntil" : <lockUntil>, "maximumAttemptsAllowed" : <maximumAttemptsAllowed>, "questionsPerPage" : <questionsPerPage>, "isMandatory" : <isMandatory> , "passPercentage" : <passPercentage>, "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
Parameters | Values Allowed | Default Value | Description |
*onlineTestData | <parameters in JSON Object> | JSON Input |
Parameters | Values Allowed | Default Value | Description |
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 |
maximumAttemptsAllowed | 1-10|unlimited | <Mandatory> | Specify the maximum allowed attempts value |
*questionPerPage | all|one | <Mandatory> | Specify the questions per page |
passPercentage | 1-100 | - | Specify the pass percentage |
shuffleQuestions | true|false | - | Specify the shuffle questions |
showMarksToLearner | true|false | - | Specify if marks must be showed to learners at the end of the test |
description | <Description> | - | Specify the description |
isMandatory | true|false | true | Specify 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/modules/219225000000648001/onlineTests/219225000000669011?onlineTestData={"name" : "Online test One_update", "duration" : 35, "durationFor" : "test", "description" : "API Testing", "lockUntil" : "28-12-2021", "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/219225000000669019/preview",
"totalLearnersCount": 0,
"resources": [],
"canUserDelete": true,
"duration": "35 minutes",
"isMandatoryTest": true,
"lockUntil": "27-12-2021",
"gradeCategoryName": "",
"completedLearnersCount": 0,
"isLocked": false,
"maximumAttemptsAllowed": 5,
"testId": "219225000000669011",
"canUserEdit": true,
"moduleId": "219225000000648001",
"testMark": "1.0",
"resultType": 2,
"testName": "Online test One_update",
"status": "Not ready"
}
}