Contents

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

struct AssignedWorkDocument

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

Inspecting a work document

Getting the assignable document

Getting the assignees

Getting the configuration

Merging the parts

Producing thumbnails

Computing the score

Making the parts

Exporting the parts

Comparing work documents

Hashing the work document

Accessing work documents

Default Implementations

See Also

Assignable document