HomeworkSubmissionVersion

HomeworkSubmissionVersion

Represents a homework submission version on SMHW.


Constructor

new HomeworkSubmissionVersion(client, response)

Instantiate a HomeworkSubmissionVersion object.

Parameters:
Name Type Description
client Client

The client that is instantiating the object.

response Object

The data for the object.

Members

(private) _client :Client

The client that instantiated this object.

Type:
  • Client

attachment_ids :Array.<Number>

An array of IDs to attachments attached to the homework submission version.

Type:
  • Array.<Number>

complete_online_text :String

The text submitted through online.

Type:
  • String

created_at :Number

The timestamp of when the homework submission version was created.

Type:
  • Number

id :Number

The ID of the homework submission version.

Type:
  • Number

updated_at :Number

The timestamp of when the homework submission version was last updated.

Type:
  • Number

user_attachment_ids :Array.<Number>

An array of IDs to attachments attached to the homework submission version.

Type:
  • Array.<Number>

user_id :Number

The ID of the user who the version was created by.

Type:
  • Number

user_name :String

The name of the user who the version was created by.

Type:
  • String

Methods

getAttachments(idsopt) → {Promise.<Array.<Attachment>>}

Get attachments attached to the homework submission version.

Parameters:
Name Type Attributes Description
ids Array.<Number> <optional>

An array of IDs of attachments to retrieve.

Returns:
Type
Promise.<Array.<Attachment>>

getUser() → {Promise.<User>}

Get the user who created the homework submission version.

Returns:
Type
Promise.<User>