FlexibleTaskSubmission

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.

Members

(private) _client :Client

The client that instantiatied this client.

Type:
  • Client

comment_ids :Array.<Number>

An array of IDs of comments posted on the flexible task submission.

Type:
  • Array.<Number>

completed :Boolean

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

Type:
  • Boolean

created_at :Number

The timestamp of when the flexible task submission was created.

Type:
  • Number

current_submission_version_id :Number

The ID of the current flexible task submission version.

Type:
  • Number

event_ids :Array.<Number>

An array of IDs of events relating to the flexible task submission.

Type:
  • Array.<Number>

flexible_task_id :Number

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

Type:
  • Number

grade :String

The grade recieved for the flexible task submission.

Type:
  • String

grade_sent :Boolean

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

Type:
  • Boolean

grading_comment :String

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

Type:
  • String

handed_in_on :Number

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

Type:
  • Number

has_unread_comments :Boolean

Whether or not the flexible task submission has unread comments.

Type:
  • Boolean

id :String

The ID of the flexible task submission.

Type:
  • String

marked :Boolean

Whether or not the flexible task submission has been marked.

Type:
  • Boolean

overdue :Boolean

Whether or not the flexible task submission is overdue.

Type:
  • Boolean

status :String

The status of the flexible task submission.

Type:
  • String

student_avatar :String

The avatar URL of the student who the flexible task submission belongs to.

Type:
  • String

student_id :Number

The ID of the student who the flexible task submission belongs to.

Type:
  • Number

student_name :String

The name of the student who the flexible task submission belongs to.

Type:
  • String

updated_at :Number

The timestamp of when the flexible task submission was last updated.

Type:
  • Number

version_ids :Array.<Number>

An array of IDs to each flexible task submission version.

Type:
  • Array.<Number>

Methods

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

Get comments made to the flexible task submission.

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

An array of IDs of the flexible task submission comments to retrieve.

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

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.

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

getFlexibleTask() → {Promise.<FlexibleTask>}

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

Returns:
Type
Promise.<FlexibleTask>

getStudent() → {Promise.<Student>}

Get the student who submitted the flexible task submission.

Returns:
Type
Promise.<Student>

postComment(text) → {Promise.<SubmissionComment>}

Post a comment on the submission from the client user.

Parameters:
Name Type Description
text String

The text of the comment.

Returns:
Type
Promise.<SubmissionComment>