---
title: AssignedWorkDocument
framework: Assignables
role: symbol
role_heading: Structure
platforms: [iOS 17.4+, iPadOS 17.4+, Mac Catalyst 17.4+]
path: assignables/assignedworkdocument
---

# AssignedWorkDocument

An assigned work document is a document that contains taker and scorer markup specific to a taker. It also contains a copy of the assignable document upon which it is based.

## Declaration

```swift
struct AssignedWorkDocument
```

## Overview

Overview This document has a collection of AssignedWorkDocument.ScoreAnnotation objects that represent marks such as correct and incorrect marks on a page. Score annotations are not automatically associated with a question defined in the AssignableDocument that this work document is based on. To determine the score for the work, you use computeScore. You cannot instantiate this document type directly. Instead, you instantiate it by calling assign(to:) or makeAssignedWorkDocument(). This document is fully mergeable, which means that any copies of this document that are independently mutated can be merged into a determinisitic resulting document. You can merge copies of this document into this one using merge(_:). You can also merge individual parts of copies of this document into this one with merge(partData:into:). For example, if deviceA has documentA and deviceB has documentB, which is a copy of documentA. When a user changes a question in documentB on deviceB, deviceB can export that part’s data and send it to deviceA to be merged back into documentA. You can create as many of these objects as you have memory for. This type assumes single-threaded access.

## Topics

### Creating an assigned work document

- [init(id:assignableDocument:partData:)](assignables/assignedworkdocument/init(id:assignabledocument:partdata:)-8eh38.md)
- [init(id:assignableDocument:partData:)](assignables/assignedworkdocument/init(id:assignabledocument:partdata:)-54yg5.md)

### Inspecting a work document

- [AssignedWorkDocument.ID](assignables/assignedworkdocument/id-swift.typealias.md)
- [id](assignables/assignedworkdocument/id-swift.property.md)
- [isMultiPageDocument](assignables/assignedworkdocument/ismultipagedocument.md)
- [isPartial](assignables/assignedworkdocument/ispartial.md)
- [AssignedWorkDocument.PartIDs](assignables/assignedworkdocument/partids-swift.enum.md)
- [partIDs](assignables/assignedworkdocument/partids-swift.property.md)
- [scoreAnnotations](assignables/assignedworkdocument/scoreannotations.md)
- [scorers](assignables/assignedworkdocument/scorers.md)
- [pagesDebugDescription](assignables/assignedworkdocument/pagesdebugdescription.md)
- [AssignedWorkDocument.Error](assignables/assignedworkdocument/error.md)

### Getting the assignable document

- [assignableDocument](assignables/assignedworkdocument/assignabledocument.md)

### Getting the assignees

- [assignees](assignables/assignedworkdocument/assignees.md)

### Getting the configuration

- [AssignedWorkDocument.Configuration](assignables/assignedworkdocument/configuration-swift.typealias.md)
- [configuration](assignables/assignedworkdocument/configuration-swift.property.md)

### Merging the parts

- [merge(_:)](assignables/assignedworkdocument/merge(_:).md)
- [merge(partData:into:)](assignables/assignedworkdocument/merge(partdata:into:).md)
- [merge(other:)](assignables/assignedworkdocument/merge(other:).md)
- [merge(partID:partDataURL:)](assignables/assignedworkdocument/merge(partid:partdataurl:).md)

### Producing thumbnails

- [questionThumbnails(visibleParts:)](assignables/assignedworkdocument/questionthumbnails(visibleparts:).md)

### Computing the score

- [computeScore()](assignables/assignedworkdocument/computescore().md)
- [AssignedWorkDocument.ScoreAnnotation](assignables/assignedworkdocument/scoreannotation.md)

### Making the parts

- [makePart(for:)](assignables/assignedworkdocument/makepart(for:).md)

### Exporting the parts

- [exportParts(identifiedBy:)](assignables/assignedworkdocument/exportparts(identifiedby:).md)
- [export(partIDs:)](assignables/assignedworkdocument/export(partids:).md)

### Comparing work documents

- [==(_:_:)](assignables/assignedworkdocument/==(_:_:).md)

### Hashing the work document

- [hash(into:)](assignables/assignedworkdocument/hash(into:).md)

### Accessing work documents

- [subscript(_:)](assignables/assignedworkdocument/subscript(_:)-4srtw.md)
- [subscript(_:)](assignables/assignedworkdocument/subscript(_:)-5h89c.md)

### Default Implementations

- [MergeableDocument Implementations](assignables/assignedworkdocument/mergeabledocument-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Identifiable](swift/identifiable.md)
- [MergeableDocument](assignables/mergeabledocument.md)
- [MergeablePartsContainer](assignables/mergeablepartscontainer.md)

## See Also

### Assignable document

- [AssignableDocument](assignables/assignabledocument.md)
- [Assignable](assignables/assignable.md)
