Contents

AssignableDocument

An assignable document is an augmented PDF that allows teachers to mark up the PDF with the intention of students taking the assessment.

Declaration

struct AssignableDocument

Overview

The document has several parts, which includes the ability to modify the PDF, annotate the PDF, and define question regions in the PDF.

To add a question to this assignable, you can use appendQuestion(pageID:rect:maxScore:) which will take care of associating a box to a page and adding a question connected to that box to the document.

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 assignable document

Inspecting an assignable document

Getting and setting the questions

Computing the max score

Getting the authors

Getting the configuration

Merging the parts

Producing thumbnails

Making the parts

Exporting the parts

Accessing documents

Comparing assignable documents

Hashing the assignable document

Default Implementations

See Also

Assignable document