# Submission

Represents a base submission on SMHW.

## Constructor

#### new Submission(client, response)

Instantiate a Submission object.

Parameters:

Name | Type | Description
--- | --- | ---
`client` | Client | The client that is instantiating this objectg.
`response` | Object | The data for the object.

Source:
  - structures/Submission.js, line 12

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Source:
  - structures/Submission.js, line 18

#### assignment_type :String

The assignment type of the submission.

Type:

- String

Source:
  - structures/Submission.js, line 84

#### comment_ids :Array.<Number>

An array of IDs of comments posted to the submission.

Type:

- Array.<Number>

Source:
  - structures/Submission.js, line 24

#### created_at :Number

The timestamp of when the submission was created.

Type:

- Number

Source:
  - structures/Submission.js, line 30

#### event_ids :Array.<Number>

An array of IDs to events refering to the submission.

Type:

- Array.<Number>

Source:
  - structures/Submission.js, line 36

#### grade :String

The grade recieved for the event.

Type:

- String

Source:
  - structures/Submission.js, line 42

#### id :String

The ID of the submission.

Type:

- String

Source:
  - structures/Submission.js, line 48

#### status :String

The status of the submission.

Type:

- String

Source:
  - structures/Submission.js, line 54

#### student_avatar :String

The avatar URL of the student.

Type:

- String

Source:
  - structures/Submission.js, line 60

#### student_id :Number

The ID of the student.

Type:

- Number

Source:
  - structures/Submission.js, line 66

#### student_name :String

The name of the student.

Type:

- String

Source:
  - structures/Submission.js, line 72

#### updated_at :Number

The timestamp of when the submission was last updated.

Type:

- Number

Source:
  - structures/Submission.js, line 78

### Methods

#### getEvents(idsopt) → {Promise.<Array.<SubmissionEvent>>}

Get submission events that refer to this submission.

Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`ids` | Array.<Number> | <optional> | An array of IDs of submission events to retrieve.

Source:
  - structures/Submission.js, line 100

Returns:

Type
  Promise.<Array.<SubmissionEvent>>

#### getStudent() → {Promise.<Student>}

Get the student who submitted the flexible task submission.

Source:
  - structures/Submission.js, line 91

Returns:

Type
  Promise.<Student>