AssignmentAssignment

An assignment.

Instance Properties

Name Description Access
assignedStories AssignedStories A collection of assigned stories. read-only
assignmentFileStatus AssignmentStatus The status of the assignment file. read-only
documentPath File The path to the document that the hyperlink destination points to. read-only
eventListeners EventListeners A collection of event listeners. read-only
events Events A collection of events. read-only
exportOptions AssignmentExportOptions The content to export in the assignment. read-write
filePath string The file path (colon delimited on the Mac OS). Can also accept: File. read-only
frameColor The color of the assignment's frames. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator or NothingEnum enumerator. read-write
id number The unique ID of the Assignment. read-only
includeLinksWhenPackage bool If true, includes linked files when packaging the assignment. read-write
index number The index of the Assignment within its containing object. read-only
isValid bool Returns true if the object specifier resolves to valid objects. read-only
label string A property that can be set to any string. read-write
name string The name of the Assignment. read-write
packageUpToDate bool If true, the assignment package is up to date. read-only
packaged bool If true, the assignment is packaged. read-only
parent Document The parent of the Assignment (a Document). read-only
properties Object A property that allows setting of several properties at the same time. read-write
userName string The user name to assign to tracked changes and notes. read-write

Methods

addEventListener(
eventType, handler ​[, captures])
 → EventListener
createPackage(
filePath ​[, submit] ​[, withProperties])
 → File
extractLabel(
key)
 → string
insertLabel(
key, value)
remove(
)
removeEventListener(
eventType, handler ​[, captures])
 → bool
toSource(
)
 → string
toSpecifier(
)
 → string
update(
[versionComments] ​[, forceSave])
addEventListener(
eventType, handler ​[, captures=false])
 → EventListener
Adds an event listener.
eventType string The event type.
handler The event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
cancelPackage(
)
Cancels the package for an assignment.
createPackage(
filePath ​[, submit=true] ​[, withProperties])
 → File
Creates an assignment package.
filePath File The full path name of the assignment package file.
submit bool If true, submits assigned stories before packaging the assignment. (Optional)
withProperties Object Initial values for properties of the new Assignment (Optional)
extractLabel(
key)
 → string
Gets the label value associated with the specified key.
key string The key.
getElements(
)
 → Assignment
Resolves the object specifier, creating an array of object references.
insertLabel(
key, value)
Sets the label to the value associated with the specified key.
key string The key.
value string The value.
remove(
)
Deletes the assignment and its file.
removeEventListener(
eventType, handler ​[, captures=false])
 → bool
Removes the event listener.
eventType string The registered event type.
handler The registered event handler. Can accept: File or JavaScript Function.
captures bool This parameter is obsolete. (Optional)
toSource(
)
 → string
Generates a string which, if executed, will return the Assignment.
toSpecifier(
)
 → string
Retrieves the object specifier.
update(
[versionComments] ​[, forceSave=false])
Updates the assignment file.
versionComments string The comment for this version. (Optional)
forceSave bool If true, forcibly saves a version. (Optional)