Skip to content

Correxit API v2.0.1


Correxit API / Browser / Correxit

Correxit

Tokens and contracts for composing Correxit JupyterLab plugins.

Namespaces

Namespace Description
CommandIDs -
Error -
Icons -

Type Aliases

Collector

Collector = (certified) => Promise\<string | null>

Defined in: src/correxit/correxit.ts:12

A collector of certified workbook grades.

Parameters

Parameter Type
certified Certified

Returns

Promise\<string | null>


Distributor

Distributor = (propagated) => Promise\<boolean>

Defined in: src/correxit/correxit.ts:27

Called for each assignee during propagation, and again on a single-workbook retry. Returns true to confirm delivery (the propagator attempts to write the local file with assignment.distribution recorded, and emits distributed only when that save succeeds), false to skip the assignee without writing a local file (the propagator emits skipped), or throws to signal an unexpected failure (the propagator attempts to write the local file for recovery but emits distribute-error and does not record assignment.distribution). A distributor with no external target should return true unconditionally.

Parameters

Parameter Type
propagated { identifier: Assigned; notebook: INotebookContent; overwrite: boolean; path: string; resources: Resource[] | null; }
propagated.identifier Assigned
propagated.notebook INotebookContent
propagated.overwrite boolean
propagated.path string
propagated.resources Resource[] | null

Returns

Promise\<boolean>


Injector

Injector = (workbook) => void

Defined in: src/correxit/correxit.ts:35

Parameters

Parameter Type
workbook Workbook | null

Returns

void


Monitor

Monitor = AsyncIterable\<Workbook | null>

Defined in: src/correxit/correxit.ts:38

Connects/disconnects workbooks and yields them to plugins.


Registrar

Registrar = (workbook, identifier) => Promise\<Registration[] | object[] | null>

Defined in: src/correxit/correxit.ts:47

A registrar that provides assignment registrations for a workbook.

Notes

If the returned registrations are null, assignment input is unlocked. If registrations are empty or populated, assignment input is locked.

Parameters

Parameter Type
workbook Workbook
identifier Identifier

Returns

Promise\<Registration[] | object[] | null>


Resource

Resource = object

Defined in: src/correxit/correxit.ts:59

A simple sidecar file utility type to encapsulate required workbook files.

Properties

data

data: Uint8Array

Defined in: src/correxit/correxit.ts:59

name

name: string

Defined in: src/correxit/correxit.ts:59


Submitter

Submitter = (workbook, identifier) => Promise\<string | null>

Defined in: src/correxit/correxit.ts:61

Parameters

Parameter Type
workbook Workbook
identifier Assigned

Returns

Promise\<string | null>


Unlocker

Unlocker = object

Defined in: src/correxit/correxit.ts:66

Methods

store()

store(id, key): Promise\<void>

Defined in: src/correxit/correxit.ts:68

Store the key for a given rubric id.

Parameters
Parameter Type
id string
key string
Returns

Promise\<void>

unlock()

unlock(workbook, credentials): Promise\<Unlocked | null>

Defined in: src/correxit/correxit.ts:71

Unlock a given workbook with the given credentials.

Parameters
Parameter Type
workbook Workbook
credentials Partial\<Credentials & { silent: boolean; }> | null
Returns

Promise\<Unlocked | null>

Variables

Collector

Collector: Token\<Collector>

Defined in: src/correxit/correxit.ts:12


COLLECTOR

const COLLECTOR: "correxit:collector" = 'correxit:collector'

Defined in: src/correxit/correxit.ts:77


commands

const commands: (app, utilities) => IDisposable[] = COMMANDS

Defined in: src/correxit/correxit.ts:83

Parameters

Parameter Type
app JupyterFrontEnd
utilities { collector: Collector; distributor: Distributor; documents: IDocumentManager; injector: Injector; registrar: Registrar; submitter: Submitter; translator: ITranslator; unlocker: Unlocker; }
utilities.collector Collector
utilities.distributor Distributor
utilities.documents IDocumentManager
utilities.injector Injector
utilities.registrar Registrar
utilities.submitter Submitter
utilities.translator ITranslator
utilities.unlocker Unlocker

Returns

IDisposable[]


CORRECTOR

const CORRECTOR: "correxit:corrector" = 'correxit:corrector'

Defined in: src/correxit/correxit.ts:89


DESCRIPTION

const DESCRIPTION: object

Defined in: src/correxit/correxit.ts:91

Type Declaration

COLLECTOR

COLLECTOR: string = description.COLLECTOR

CORRECTOR

CORRECTOR: string = description.CORRECTOR

DISTRIBUTOR

DISTRIBUTOR: string = description.DISTRIBUTOR

MONITOR

MONITOR: string = description.MONITOR

REGISTRAR

REGISTRAR: string = description.REGISTRAR

SUBMITTER

SUBMITTER: string = description.SUBMITTER

UI

UI: string = description.UI

UNLOCKER

UNLOCKER: string = description.UNLOCKER


Distributor

Distributor: Token\<Distributor>

Defined in: src/correxit/correxit.ts:27


DISTRIBUTOR

const DISTRIBUTOR: "correxit:distributor" = 'correxit:distributor'

Defined in: src/correxit/correxit.ts:85


GALATA

const GALATA: "correxit:galata" = 'correxit:galata'

Defined in: src/correxit/correxit.ts:121


Monitor

Monitor: Token\<Monitor>

Defined in: src/correxit/correxit.ts:38


MONITOR

const MONITOR: "correxit:monitor" = 'correxit:monitor'

Defined in: src/correxit/correxit.ts:125


NO_CORREXIT_METADATA

const NO_CORREXIT_METADATA: TypeError

Defined in: src/correxit/correxit.ts:129


Registrar

Registrar: Token\<Registrar>

Defined in: src/correxit/correxit.ts:47


REGISTRAR

const REGISTRAR: "correxit:registrar" = 'correxit:registrar'

Defined in: src/correxit/correxit.ts:131


Submitter

Submitter: Token\<Submitter>

Defined in: src/correxit/correxit.ts:61


SUBMITTER

const SUBMITTER: "correxit:submitter" = 'correxit:submitter'

Defined in: src/correxit/correxit.ts:135


TOOLBARS

const TOOLBARS: "correxit:toolbars" = 'correxit:toolbars'

Defined in: src/correxit/correxit.ts:139


UI

const UI: "correxit:ui" = 'correxit:ui'

Defined in: src/correxit/correxit.ts:141


Unlocker

Unlocker: Token\<Unlocker>

Defined in: src/correxit/correxit.ts:66


UNLOCKER

const UNLOCKER: "correxit:unlocker" = 'correxit:unlocker'

Defined in: src/correxit/correxit.ts:143