Create/Update grade

Method

Method Description
exam.gradeCreate Create grade
exam.gradeUpdate Update grade

Request parameters

{
    "grade": {
        "id": {GradeId}, /* Only for update operation */
        "test_id": {TestId},
        "name": "{Name}",
        "description": "{Description}",
        "external_id": "{ExternalId}",
        "badge_color": "{BadgeColor}",
        "score_from": {ScoreFrom},
        "score_to": {ScoreTo}
    },
    "resources": {
        "{ResourcePath}": "{ResourceCnt}",
        ...
    }
}

Response parameters

{
    "grade": {
        "id": {GradeStudyId},
        "test_id": {TestId},
        "name": "{Name}",
        "description": "{Description}",
        "external_id": "{ExternalId}",
        "badge_color": "{BadgeColor}",
        "score_from": {ScoreFrom},
        "score_to": {ScoreTo}
    },
    "resources": {
        "{ResourcePath}": "{NewResourcePath}",
        ...
    },
    "completed": {Comleted}
}

Variable Type Appearance Description
{GradeId} Integer Mandatory Grade id. Mandatory for update operation.
{TestId} Integer Mandatory Exam id.
{Name} String Mandatory Grade name.
{Description} String Mandatory Grade content. HTML formatted, may contain media resources like images and audio. Please be aware that only relative URLs are allowed.
{ExternalId} String Optional External Id. Optional field to store external system grade id, which later can be used for matching/synchronization.
{BadgeColor} String Mandatory Badge background color in HEX format (e.g., #000000).
{ScoreFrom} Integer / null Optional Indicates the starting value of the score range to which the grade applies. NULL means the starting value is not defined.
{ScoreTo} Integer / null Optional Indicates the end value of the score range to which the grade applies. NULL means the end value is not defined.
resources Object Optional If you are using media resources like images you need to send the content of each media resource under "resources" node.
{ResourcePath} String Mandatory Path of media resource. Same value as it was used in Description.
Example: "fld/image.jpg" for <img src="fld/image.jpg">.
{ResourceCnt} String Mandatory Base64 encoded content of media resource.
{NewResourcePath} String Mandatory New media resource path.
{Completed} Boolean Mandatory Indicates whether action was successfully completed or not.