Update Course API

This API is used for updating courses in LMS.

Request URL:

https://people.zoho.com/api/v1/courses?courseData={"name" : <name>,  "type" : <type>, "description" : <description>, "aboutCourse" : <aboutCourse>, "duration" : <duration>, "durationUnit" : <durationUnit>, "courseCode" : <courseCode>,  "courseAdmins" : <courseAdmins>, "categories" : <categories>, "permissionSettings" : <permissionSettings>}

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
*courseData <parameters in JSON Object> JSON Input

 

ParametersValues AllowedDefault ValueDescription
*name<Course name><Mandatory>Specify the Course name
*type<1> | <2> | <3><Mandatory>

Specify the Course type 
1 - Self Paced
2 - Blended Learning
3 - E-Matrerial

description<Description>-Specify the description
aboutCourse<about course>-Specify what is covered in the course along with the details on the content of the course
duration<Duration in integer format>-Specify the course duration
durationUnit<minute> | <hour> | <day>-Specify the course code
courseCode<Course Code>-Specify the course code
courseAdmins<Erec Nos>-Specify the course admins
categories<category Ids>-Specify the category Ids
permissionSettings<permissionSettings>-JSON Input

Sample object for "permissionSettings" key 
 {"whoCanEnroll" : ["admin","learner"], "whoCanUnenroll" : ["admin","learner"], 
"whenAnEntityIsConsideredAsCompleted" : 2, 
"whenACourseIsConsideredAsCompleted" : 2, 
"whenAModuleIsConsideredAsCompleted" : 2}

Possible values for  the keys inside the object
 whoCanEnroll  -  admin|courseAdmin|manager|learner
 
whoCanUnenroll-  admin|courseAdmin|manager|learner
 
whenAnEntityIsConsideredAsCompleted - 1|2  
                   1 - When an entity is marked as completed by the learner
                   2 - When an entity is opened or accessed

whenACourseIsConsideredAsCompleted  - 1|2|3|4
                   1 - When the learner mark as completed
                   2 - When all mandatory entities are completed
                   3 - When course admin/trainer marks as complete
                   4 - Based on date

whenAModuleIsConsideredAsCompleted  - 1|2
                   1 - When the learner mark as completed
                   2 - When all mandatory entities are completed 

JSON Sample Request

Request

Copiedhttps://people.zoho.com/api/v1/courses?courseData={"name" : "An Introduction to Java",  "type" : 1, "description" : "Course to learn Java couse ", "aboutCourse" : "You will be familiar with basic aspects of Java, including procedural programming and object-oriented programming", "duration" : 30, "durationUnit" : "minute", "courseCode" : 0001,  "courseAdmins" : [471932000000133005], "categories" : [471932000032486058], "permissionSettings" : {"whoCanEnroll" : ["admin","learner"], "whoCanUnenroll" : ["admin","learner"], "whenAnEntityIsConsideredAsCompleted" : 2, "whenACourseIsConsideredAsCompleted" : 2, "whenAModuleIsConsideredAsCompleted" : 2}}

Header

CopiedAuthorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxx9be93.9b8xxxxxxf

Response

Copied{
    "code": "200",
    "course": {
        "canUserRequestToJoin": false,
        "canUserAddLearners": true,
        "durationAsDisplayString": "30 Minutes",
        "courseCode": "0001",
        "description": "Course to learn Java couse",
        "courseURL": "https://people.zoho.com/idcportalfb18/zp/lmscourse#lms-learner/course/588882000000984009/overview",
        "type": "1",
        "canUserGiveFeedback": true,
        "canUserShare": true,
        "canUserDelete": true,
        "permissionSettings": {
            "whenAModuleIsConsideredAsCompleted": "1",
            "whoCanEnroll": [
                "admin",
                "courseAdmin",
                "learner"
            ],
            "whenAnEntityIsConsideredAsCompleted": "1",
            "whenACourseIsConsideredAsCompleted": "2"
        },
        "hasUserCompleted": false,
        "canUserUnpublish": true,
        "canUserSuggest": false,
        "currentUserRole": {
            "settingsAdmin": false,
            "courseOwner": true,
            "trainer": false,
            "sharedUser": false,
            "learner": false,
            "admin": true,
            "courseAdmin": false,
            "dataAdmin": false
        },
        "canUserShareCourseURL": false,
        "isSuggestedCourse": false,
        "isDisabled": false,
        "categories": [],
        "isFavourite": false,
        "courseId": "588882000000984009",
        "aboutCourse": "You will be familiar with basic aspects of Java, including procedural programming and object-oriented programming",
        "publishStatus": "unpublished",
        "hasUserStarted": true,
        "introFiles": [],
        "canUserFavourite": true,
        "progressAsDisplayString": "0 of 0 Completed",
        "canUserDisable": false,
        "typeAsDisplayString": "Self paced learning",
        "isSharedCourse": false,
        "canUserDeleteLearners": true,
        "percentageOfProgress": 0,
        "courseOwners": [
            {
                "erecno": "588882000000162005",
                "displayName": "adam CEO logicx",
                "employeeId": "1",
                "emailId": "davisvenfield@zohotest.com",
                "displayPictureURL": "https://people.zoho.com/api/viewEmployeePhoto?filename=953310000000021001"
            }
        ],
        "canUserStartDiscussion": false,
        "canUserComplete": false,
        "statusAsDisplayString": "Drafted",
        "canUserUnEnroll": true,
        "canUserUnfavourite": true,
        "canUserRevokeCompletion": false,
        "courseImageURL": null,
        "canUserPublish": true,
        "name": "An Introduction to Java",
        "courseAdmins": [
{
                "erecno": "588882000000162005",
                "displayName": "adam CEO logicx",
                "employeeId": "1",
                "emailId": "davisvenfield@zohotest.com",
                "displayPictureURL": "https://people.zoho.com/api/viewEmployeePhoto?filename=953310000000021001"
            }
],
        "canUserEnroll": true,
        "canUserPreview": true,
        "status": 0
    },
    "message": "success"
}