Type Definitions


ClassSection

Description
Defines a class section in DTPS
Properties
Name Type Description
title string Name of the section
id string Section ID
users Array.<User> Students in this section
Details
Object

PartialDiscussionThread

Description
Defines partial discussion thread objects in DTPS (for threads list)
Properties
Name Type Attributes Description
title string Title of the discussion thread
id string Discussion thread ID
locked boolean <optional>
True if posting to the discussion thread is locked
Details
Object

DiscussionThread

Description
Defines discussion thread objects in DTPS
Properties
Name Type Attributes Description
title string Title of the discussion thread
id string Discussion thread ID
posts Array.<DiscussionPost> Posts in this thread, with the initial one first.
locked boolean <optional>
True if posting to the discussion thread is locked
requireInitialPost boolean <optional>
True if the user must post before viewing others' posts
Details
Object

DiscussionPost

Description
Defines discussion post objects in DTPS
Properties
Name Type Attributes Description
id string Discussion post ID
body string Discussion post body HTML
postedAt Date Date for when the post was posted
depth number <optional>
The depth level this post is
author User <optional>
Discussion post author
replies Array.<DiscussionPost> <optional>
Replies to this post. Nested replies (replies to replies) should be after this post in the array with a depth of 1, not in the replies key.
replyURL string <optional>
A URL that the user can visit to reply to this post
Details
Object

PartialPage

Description
Defines a partial page object in DTPS (for pages list)
Properties
Name Type Description
title string Page title
id string Page ID
Details
Object

Page

Description
Defines Page objects in DTPS
Properties
Name Type Attributes Description
title string Page title
id string Page ID
content string Page content HTML
updatedAt Date <optional>
When the page was last updated
author User <optional>
Page author
Details
Object

SearchData

Description
An object that can represent any type of data to be searched.
Properties
Name Type Attributes Description
title string <optional>
Result title
body string <optional>
Result body (can be HTML)
url string <optional>
A URL for opening this result in the LMS
locatedIn string Describes where this result was found (as specific as possible)
icon string The icon to use for this result. Should match (and is displayed with) the locatedIn property.
info Array.<Object> <optional>
Contains any info (e.g. due dates) for this result. Has an icon property, label property, and info property.
icons Array.<Object> Status icons for this result. Has an "icon" property, for the icon, and a "keywords" property for a string with all of the search keywords for the icon.
class number The number of the class that this result is from
Details
Object

Assignment

Description
Defines assignments objects in DTPS
Properties
Name Type Attributes Description
title string Title of the assignment
body string <optional>
HTML of the assignment's body
id string Assignment ID
class number Automatically managed by DTPS. The class number that this assignment belongs to.
dueAt Date <optional>
Assignment due date
url string <optional>
Assignment URL
feedback Array.<AssignmentFeedback> <optional>
Feedback / private comments for this assignment
grader User <optional>
Assignment grader
turnedIn boolean <optional>
True if the assignment is turned in
late boolean <optional>
True if the assignment is late
missing boolean <optional>
True if the assignment is missing
locked boolean <optional>
True if assignment submissions are locked
category string <optional>
Assignment category
publishedAt Date <optional>
Date for when the assignment was published
gradedAt Date <optional>
Date for when the assignment was graded
grade number <optional>
Points earned on this assignment
letter string <optional>
Letter grade on this assignment
value number <optional>
Total amount of points possible for this assignment
rubric Array.<RubricItem> <optional>
Assignment rubric
error string <optional>
If an error occures when processing this assignment, store an error message here to notify the user that some features/data may be unavailable
Details
Object

Module

Description
Defines module objects in DTPS
Properties
Name Type Attributes Description
title string Title of the module
id string Module ID
collapsed boolean <optional>
True if the module is collapsed, false otherwise. undefined or null if this module does not support collapsing.
items Array.<ModuleItem> An array of items for this module.
Details
Object

ModuleItem

Description
Defines module items in DTPS
Properties
Name Type Attributes Description
type string Either "assignment", "page", "discussion", "url", "embed", or "header".
title string <optional>
Required for URL and header items, and can be used to override the title of assignment, page, and discussion items.
id string <optional>
Required for assignment, page, and discussion items.
url string <optional>
Required for URL and embed items. Required for discussion and page items if the class does not support the pages or discussions feature.
indent number <optional>
Indent level
completed boolean <optional>
True if the module item has been completed
Details
Object

Announcement

Description
Defines announcement objects in DTPS
Properties
Name Type Description
title string Title of the announcement
postedAt Date Date when the announcement was posted
body string Announcement content
url string Announcement URL
Details
Object

AssignmentFeedback

Description
Defines assignment feedback objects in DTPS
Properties
Name Type Attributes Description
comment string Feedback comment
author User <optional>
Feedback author
Details
Object

RubricItem

Description
Defines rubric item objects in DTPS
Properties
Name Type Attributes Description
title string Title of the rubric item
id string Rubric item ID (only needs to be unique to this assignment)
value number Total amount of points possible
outcome string <optional>
The ID of the outcome this rubric item is assessing. This is only used for grade calculation.
description string <optional>
Rubric item description
score number <optional>
Rubric assessment score in points
scoreName string <optional>
Rubric assessment score name
color string <optional>
Score color in a CSS color format
Details
Object

DashboardItem

Description
Defines dashboard items in DTPS
Properties
Name Type Description
name string Dashbord item name
id string Unique dashboard item ID
icon string Dashboard item icon
supportsCompactMode boolean True if this dashboard item supports compact mode
size number The approximate size of this dashboard item relative to other dashboard items. Should be no less than 20.
defaultSide string The default side of this dashboard item. Either "right" or "left".
compact boolean True if the user has turned on compact mode for this item.
Details
Object

Date

Description
A date string recognized by Date.parse or an actual Date object
Details
string | Date

User

Description
Defines user objects in DTPS
Properties
Name Type Attributes Description
name string User name
id string User ID
photoURL string User photo URL
url string [ONLY FOR DTPSLMS.FETCHUSERS] The URL to this user's profile. Only used when displaying users in the people tab.
children Array.<User> <optional>
[ONLY FOR DTPS.USER] Array of child users. If this is defined, the user is treated as a parent account. Sub-children are not allowed.
parent boolean [ONLY FOR DTPS.USER] Automatically managed by DTPS. True if the user is a parent account.
Details
Object

Class

Description
Defines class objects in DTPS
Properties
Name Type Attributes Description
name string Name of the class
id string Class ID used by Power+
lmsID string Class ID used for LMS API calls
userID string The ID of the user this class is associated with (from the parameter of dtpsLMS.fetchClasses)
num number Index of the class in the dtps.classes array
subject string Class subject
usualDueRange Array.<number> The range of usual due dates for this course [min,max]. Anything outside this range is considered unusual and highlighted if enabled.
people Array.<ClassSection> | boolean <optional>
Users in this class. True if the class supports the "People" tab, but not yet loaded. If this is true dtpsLMS.fetchUsers must be implemented.
icon string <optional>
The icon to show with this class
group string <optional>
The name of the group that this class is in
period number | string <optional>
The period or section the user has this class at
startDate Date <optional>
The start date for this course. Only used internally for filtering out stale courses.
endDate Date <optional>
The end date for this course. Only used internally for filtering out stale courses.
termStartDate Date <optional>
The start date for the term this course is in. Only used internally for filtering out stale courses.
termEndDate Date <optional>
The end date for the term this course is in. Only used internally for filtering out stale courses.
assignments Array.<Assignment> Class assignments. Assume assignments are still loading if this is undefined. The class has no assignments if this is an empty array. Loaded in dtps.init.
modules Array.<Module> | boolean <optional>
Class modules. Assume this class supports the modules feature, but is not yet loaded, if this is true and that the class has no modules if this is an empty array. For LMSs that do not support modules, either keep it undefined or set it to false.
discussions Array.<DiscussionThread> | boolean <optional>
Class discussion threads. Assume this class supports discussions, but not yet loaded, if this is true and that the class has no threads if this is an empty array. For LMSs that do not support discussions, either keep it undefined or set it to false.
pages Array.<Page> | boolean <optional>
Class pages. Assume this class supports the pages feature, but not yet loaded, if true and that the class has no pages if this is an empty array. For LMSs that do not support pages, either keep it undefined or set it to false.
newDiscussionThreadURL string <optional>
A URL the user can visit to create a new discussion thread in this class
homepage boolean <optional>
True if the class has a homepage. If a class has a homepage, dtpsLMS.fetchHomepage must be implemented.
term string <optional>
Class term
color string <optional>
Class color
grade number <optional>
Current percentage grade in the class (a number from 0 to 100)
letter string <optional>
Current letter grade in the class
previousLetter string <optional>
Automatically managed by DTPS. The previous letter grade in this class, based on local grade history.
image string <optional>
URL to the class background image
teacher User <optional>
Class teacher. If the class has multiple teachers, this is the primary teacher.
hasGradebook boolean <optional>
Automatically managed by DTPS. True if the class should show the gradebook tab.
gradeCalculation object <optional>
Automatically managed by DTPS. If custom grade calculation is implemented, this will be the results from custom grade calculation returned by dtpsLMS.calculateGrade.
videoMeetingURL string <optional>
The URL used to join this class' online meeting. If dtpsLMS.fetchMeetingURL is implemented, DTPS will use it to get the meeting URL if this property is undefined. If this property is null, DTPS will not call dtpsLMS.fetchMeeting URL for the class.
Details
Object