FlexibleTask

FlexibleTask

Represents a flexible task assignment on SMHW.


Constructor

new FlexibleTask(client, response)

Istantiate a FlexibleTask 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 for attachments attached to the flexible task.

Type:
  • Array.<Number>

bookstore_content_ids :Array.<Number>

Type:
  • Array.<Number>

class_group_id :Number

The ID of the class group that the flexible task was set for.

Type:
  • Number

class_group_name :String

The name of the class group that the flexible task was set for.

Type:
  • String

class_year :String

The class year that the flexible task was set for.

Type:
  • String

community_resource_item_id :Number

The ID of the flexible task community resource.

Type:
  • Number

created_at :Number

The timestamp of when the flexible task was created.

Type:
  • Number

description :String

The description of the flexible task.

Type:
  • String

due_on :Number

The timestamp of when the flexible task is due.

Type:
  • Number

duration :String

The duration of the flexible task.

Type:
  • String

duration_units :String

The duration units of the flexible task.

Type:
  • String

has_unread_comments :Boolean

Whether or not the flexible task has unread comments.

Type:
  • Boolean

id :Number

The ID of the flexible task.

Type:
  • Number

issued_on :Number

The timestamp of when the flexible task was issued.

Type:
  • Number

marking_scheme_id :Number

The ID of the marking scheme used for the flexible task.

Type:
  • Number

published_at :Number

The timestamp of when the flexible task was published.

Type:
  • Number

purpose :String

The purpose of the flexible task.

Type:
  • String

school_id :Number

The ID of the school that the flexible task is set for.

Type:
  • Number

school_logo_url :String

The logo URL of of the school that the flexible task is set for.

Type:
  • String

school_name :String

The name of the school that the flexible task is set for.

Type:
  • String

subject :String

The subject of the flexible task.

Type:
  • String

submission_ids :Array.<Number>

An array of IDs for submissions

Type:
  • Array.<Number>

submission_method_id :Number

The ID of the submission method to use.

Type:
  • Number

submission_status :String

The status of the submission for the client user.

Type:
  • String

submission_type :String

The name of the submission method to use.

Type:
  • String

teacher_id :Number

The ID of the teacher who set the flexible task.

Type:
  • Number

teacher_name :String

The name of the teacher who set the flexible task.

Type:
  • String

title :String

The title of the flexible task.

Type:
  • String

updated_at :Number

The timestamp of when the flexible task was last updated.

Type:
  • Number

An array of links to web resources for the flexible task.

Type:
  • Array.<String>

Methods

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

Get attachments on the flexible task.

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

The IDs of the attachments to retrieve.

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

getSubmission() → {Promise.<FlexibleTaskSubmission>}

Get the client user's submission to the flexible task.

Returns:
Type
Promise.<FlexibleTaskSubmission>

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

Get comments made on flexible task submissions.

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

The IDs of the flexible task comments to retrieve.

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

getSubmissions(idsopt) → {Promise.<Array.<FlexibleTaskSubmissions>>}

Get submissions to the flexible task.

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

The IDs of the flexible task submissions to retrieve.

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

getTeacher() → {Promise.<Employee>}

Get the teacher who set the flexible task.

Returns:
Type
Promise.<Employee>