The Comment Object

{
  "id": 1, // assigned by codePost API
  "text": "Missing a semicolon",
  "pointDelta": 1,
  "startChar": 4,
  "endChar": 9,
  "startLine": 1,
  "endLine": 2,
  "file": 1,
  "rubricComment": null,
  "author": "[email protected]",
  "color": "",
}

Attribute

Type

Description

id

integer

Unique identifier for the object.

text

string

The text of the comment. This is text is shown both to graders and to students. It is the customization of the comment as written by graders.

pointDelta

integer

The delta the comment will apply to its ancestor submission's grade. A positive value indicates a deduction, while a negative value indicates an addition. null indicates a value of 0.

startChar

integer

The index of the character on which the comment begins. The index is relative to the beginning of the character's line. Must be greater than or equal to 0. If startLine == endLine, cannot be greater than endChar.

endChar

integer

The index of the character on which the comment ends. The index is relative to the beginning of the character's line. Must be greater than or equal to 0. If startLine == endLine, cannot be less than endChar.

startLine

integer

The line of the parent File's code on which the comment should begin. Must be greater than or equal to 0, and cannot be greater than endLine.

endLine

integer

The line of the parent File's code on which the comment should end. Must be greater than or equal to 0, cannot be less than startLine, and cannot exceed the number of lines in the file.

file

integer

The ID of the file to which this Comment applies.

rubricComment

integer

The ID of a linked RubricComment. This field should be null if the comment isn't linked to any RubricComment.

author

string

The user who created this Comment.

feedback

integer

An integer representing the feedback applied to this comment. Currently only valid if rubricComment is not null.

color

string

A hex string that indicates the color which a comment will render in codePost.