Google Classroom API . courses . posts . addOnAttachments . studentSubmissions

Instance Methods

close()

Close httplib2 connections.

get(courseId, postId, attachmentId, submissionId, itemId=None, x__xgafv=None)

Returns a student submission for an add-on attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

patch(courseId, postId, attachmentId, submissionId, body=None, itemId=None, updateMask=None, x__xgafv=None)

Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive `max_points` value set. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

Method Details

close()
Close httplib2 connections.
get(courseId, postId, attachmentId, submissionId, itemId=None, x__xgafv=None)
Returns a student submission for an add-on attachment. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

Args:
  courseId: string, Required. Identifier of the course. (required)
  postId: string, Optional. Deprecated, use `item_id` instead. (required)
  attachmentId: string, Required. Identifier of the attachment. (required)
  submissionId: string, Required. Identifier of the student’s submission. (required)
  itemId: string, Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Payload for grade update requests.
  "pointsEarned": 3.14, # Student grade on this attachment. If unset, no grade was set.
  "postSubmissionState": "A String", # Submission state of add-on attachment's parent post (i.e. assignment).
}
patch(courseId, postId, attachmentId, submissionId, body=None, itemId=None, updateMask=None, x__xgafv=None)
Updates data associated with an add-on attachment submission. Requires the add-on to have been the original creator of the attachment and the attachment to have a positive `max_points` value set. This method returns the following error codes: * `PERMISSION_DENIED` for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `NOT_FOUND` if one of the identified resources does not exist.

Args:
  courseId: string, Required. Identifier of the course. (required)
  postId: string, Optional. Deprecated, use `item_id` instead. (required)
  attachmentId: string, Required. Identifier of the attachment. (required)
  submissionId: string, Required. Identifier of the student's submission. (required)
  body: object, The request body.
    The object takes the form of:

{ # Payload for grade update requests.
  "pointsEarned": 3.14, # Student grade on this attachment. If unset, no grade was set.
  "postSubmissionState": "A String", # Submission state of add-on attachment's parent post (i.e. assignment).
}

  itemId: string, Identifier of the `Announcement`, `CourseWork`, or `CourseWorkMaterial` under which the attachment is attached. This field is required, but is not marked as such while we are migrating from post_id.
  updateMask: string, Required. Mask that identifies which fields on the attachment to update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the `AddOnAttachmentStudentSubmission` object. The following fields may be specified by teachers: * `points_earned`
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Payload for grade update requests.
  "pointsEarned": 3.14, # Student grade on this attachment. If unset, no grade was set.
  "postSubmissionState": "A String", # Submission state of add-on attachment's parent post (i.e. assignment).
}