Assignment

Assignment

Represents a basic assignment on SMHW.


Constructor

new Assignment(client, response)

Instantiate an Assignment 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 assignment.

Type:
  • Array.<Number>

class_group_id :Number

The ID of the class group that the assignment was set for.

Type:
  • Number

class_group_name :String

The name of the class group that the assignment was set for.

Type:
  • String

class_year :String

The class year that the assignment was set for.

Type:
  • String

community_resource_item_id :Number

The ID of the assignment community resource.

Type:
  • Number

created_at :Number

The timestamp of when the assignment was created.

Type:
  • Number

description :String

The description of the assignment.

Type:
  • String

due_on :Number

The timestamp of when the assignment is due.

Type:
  • Number

duration :String

The duration of the assignment.

Type:
  • String

duration_units :String

The duration units of the assignment.

Type:
  • String

has_unread_comments :Boolean

Whether or not the assignment has unread comments.

Type:
  • Boolean

id :Number

The ID of the assignment.

Type:
  • Number

issued_on :Number

The timestamp of when the assignment was issued.

Type:
  • Number

published_at :Number

The timestamp of when the assignment was published.

Type:
  • Number

purpose :String

The purpose of the assignment.

Type:
  • String

school_id :Number

The ID of the school that the assignment is set for.

Type:
  • Number

school_logo_url :String

The logo URL of of the school that the assignment is set for.

Type:
  • String

school_name :String

The name of the school that the assignment is set for.

Type:
  • String

subject :String

The subject of the assignment.

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

teacher_id :Number

The ID of the teacher who set the assignment.

Type:
  • Number

teacher_name :String

The name of the teacher who set the assignment.

Type:
  • String

title :String

The title of the assignment.

Type:
  • String

type :String

The assignment type.

Type:
  • String

updated_at :Number

The timestamp of when the assignment was last updated.

Type:
  • Number

An array of links to web resources for the assigment.

Type:

Methods

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

Get attachments attached to the assignment.

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

The IDs of the attachments to retrieve.

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

getTeacher() → {Promise.<Employee>}

Get the teacher who set the assignment.

Returns:
Type
Promise.<Employee>