# FlexibleTaskSubmission

Represents a flexible task submission on SMHW.

## Constructor

#### new FlexibleTaskSubmission(client, response)

Instantiate a FlexibleTaskSubmission object.

Parameters:

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

Source:
  - structures/FlexibleTaskSubmission.js, line 16

### Extends

- Submission

### Members

#### (private) _client :Client

The client that instantiated this object.

Type:

- Client

Overrides:
  - Submission#_client
Source:
  - structures/Submission.js, line 18

#### assignment_type :String

The type of assignment that the submission is for.

Type:

- String

Overrides:
  - Submission#assignment_type
Source:
  - structures/FlexibleTaskSubmission.js, line 83

#### comment_ids :Array.<Number>

An array of IDs of comments posted to the submission.

Type:

- Array.<Number>

Overrides:
  - Submission#comment_ids
Source:
  - structures/Submission.js, line 24

#### completed :Boolean

Whether or not the flexible task submission is marked as complete.

Type:

- Boolean

Source:
  - structures/FlexibleTaskSubmission.js, line 23

#### created_at :Number

The timestamp of when the submission was created.

Type:

- Number

Overrides:
  - Submission#created_at
Source:
  - structures/Submission.js, line 30

#### current_submission_version_id :Number

The ID of the current flexible task submission version.

Type:

- Number

Source:
  - structures/FlexibleTaskSubmission.js, line 29

#### event_ids :Array.<Number>

An array of IDs to events refering to the submission.

Type:

- Array.<Number>

Overrides:
  - Submission#event_ids
Source:
  - structures/Submission.js, line 36

#### flexible_task_id :Number

The ID of the flexible task that the flexible task submission is for.

Type:

- Number

Source:
  - structures/FlexibleTaskSubmission.js, line 59

#### grade :String

The grade recieved for the event.

Type:

- String

Overrides:
  - Submission#grade
Source:
  - structures/Submission.js, line 42

#### grade_sent :Boolean

Whether or not a grade has been given for the flexible task submission.

Type:

- Boolean

Source:
  - structures/FlexibleTaskSubmission.js, line 35

#### grading_comment :String

The comment made for the grade for the flexible task submission.

Type:

- String

Source:
  - structures/FlexibleTaskSubmission.js, line 41

#### handed_in_on :Number

The timestamp of when the flexible task submission was handed in.

Type:

- Number

Source:
  - structures/FlexibleTaskSubmission.js, line 47

#### has_unread_comments :Boolean

Whether or not the flexible task submission has unread comments.

Type:

- Boolean

Source:
  - structures/FlexibleTaskSubmission.js, line 53

#### id :String

The ID of the submission.

Type:

- String

Overrides:
  - Submission#id
Source:
  - structures/Submission.js, line 48

#### marked :Boolean

Whether or not the flexible task submission has been marked.

Type:

- Boolean

Source:
  - structures/FlexibleTaskSubmission.js, line 65

#### overdue :Boolean

Whether or not the flexible task submission is overdue.

Type:

- Boolean

Source:
  - structures/FlexibleTaskSubmission.js, line 71

#### status :String

The status of the submission.

Type:

- String

Overrides:
  - Submission#status
Source:
  - structures/Submission.js, line 54

#### student_avatar :String

The avatar URL of the student.

Type:

- String

Overrides:
  - Submission#student_avatar
Source:
  - structures/Submission.js, line 60

#### student_id :Number

The ID of the student.

Type:

- Number

Overrides:
  - Submission#student_id
Source:
  - structures/Submission.js, line 66

#### student_name :String

The name of the student.

Type:

- String

Overrides:
  - Submission#student_name
Source:
  - structures/Submission.js, line 72

#### submission_type :String

The type of submission.

Type:

- String

Source:
  - structures/FlexibleTaskSubmission.js, line 89

#### updated_at :Number

The timestamp of when the submission was last updated.

Type:

- Number

Overrides:
  - Submission#updated_at
Source:
  - structures/Submission.js, line 78

#### version_ids :Array.<Number>

An array of IDs to each flexible task submission version.

Type:

- Array.<Number>

Source:
  - structures/FlexibleTaskSubmission.js, line 77

### Methods

#### getComments(idsopt) → {Promise.<Array.<FlexibleTaskSubmissionComment>>}

Get an array comments made to the submission.

Parameters:

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

Source:
  - structures/FlexibleTaskSubmission.js, line 105

Returns:

Type
  Promise.<Array.<FlexibleTaskSubmissionComment>>

#### 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.

Overrides:
  - Submission#getEvents
Source:
  - structures/Submission.js, line 100

Returns:

Type
  Promise.<Array.<SubmissionEvent>>

#### getFlexibleTask() → {Promise.<FlexibleTask>}

Get the flexible task that the flexible task submission is for.

Source:
  - structures/FlexibleTaskSubmission.js, line 96

Returns:

Type
  Promise.<FlexibleTask>

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

Get the student who submitted the flexible task submission.

Overrides:
  - Submission#getStudent
Source:
  - structures/Submission.js, line 91

Returns:

Type
  Promise.<Student>

#### postComment(text) → {Promise.<FlexibleTaskSubmissionComment>}

Post a comment on the submission from the client user.

Parameters:

Name | Type | Description
--- | --- | ---
`text` | String | The text of the comment.

Source:
  - structures/FlexibleTaskSubmission.js, line 131

Returns:

Type
  Promise.<FlexibleTaskSubmissionComment>