Skip to content

Correxit API v2.0.1


Correxit API / Browser / Rubric

Rubric

Immutable assignment, cell, reference, and scoring data.

Namespaces

Namespace Description
Assignment -
Cell -
Reference -
Score -

Type Aliases

Assignment

Assignment = Readonly\<{ assignee: string; certification: Timestamp; collected: string | null; distribution: Timestamp; expiration: Timestamp; id: string | null; issue: string; issuer: string; keys: Keys; mac: string; name: string; overdue: Overdue; penalty: number | null; report: Report; resources: string[] | null; roster: string[]; seal: string | null; submission: Timestamp; submitted: string | null; }>

Defined in: src/correxit/rubric.ts:25

Assignment integrity, lifecycle, and grading metadata.


Base

Base = Readonly\<{ assignment: Assignment; cells: Readonly\<{[id: string]: Cell; }>; cxtformat: typeof CXTFORMAT; id: string; references: Readonly\<{[referent: string]: Readonly\<{ cell: string; points: number; referent: string; secret: boolean; }>; }>; revised: number; }>

Defined in: src/correxit/rubric.ts:48

Fields shared by locked and unlocked rubrics.


Cell

Cell = Readonly\<{ id: string; is: "answerable"; payload: string[]; points: number; references: null; }> | Readonly\<{ id: string; is: "comparable" | "correctable"; payload: null; points: number; references: string[]; }> | Readonly\<{ id: string; is: "reviewable"; payload: null; points: number; references: null; }>

Defined in: src/correxit/rubric.ts:58

Cell grading configuration.


Locked

Locked = Base & Readonly\<{ key: null; locked: true; }>

Defined in: src/correxit/rubric.ts:321

A rubric whose key is absent.


Outputs

Outputs = Map\<string, Output[]>

Defined in: src/correxit/rubric.ts:361


Score

Score = Readonly\<{ code: Code; comment: string; id: string; points: number; possible: number; status: Status; }>

Defined in: src/correxit/rubric.ts:363


Terms

Terms = Readonly\<{ assignment: Readonly\<{ assignee: string; author: Author; expiration: Timestamp; id: string | null; issue: string; issuer: string; name: string; overdue: Overdue; penalty: number | null; report: Readonly\<{ interventions: {[id: string]: Readonly\<{ code: Code; comment: string; id: string; points: number; possible: number; status: Status; }>; }; scores: {[id: string]: Readonly\<{ code: Code; comment: string; id: string; points: number; possible: number; status: Status; }>; }; }>; resources: string[] | null; roster: string[]; }>; cells: Readonly\<{[id: string]: Cell; }>; cxtformat: typeof CXTFORMAT; id: string; references: Readonly\<{[referent: string]: Readonly\<{ cell: string; points: number; referent: string; secret: boolean; }>; }>; }>

Defined in: src/correxit/rubric.ts:373

The signed terms of a rubric/assignment pairing.


Timestamp

Timestamp = number | null

Defined in: src/correxit/rubric.ts:397


Unlocked

Unlocked = Base & Readonly\<{ key: string; locked: false; }>

Defined in: src/correxit/rubric.ts:400

A rubric whose key is available in memory.

Variables

CXTFORMAT

const CXTFORMAT: 1

Defined in: src/correxit/rubric.ts:22

Current persisted Correxit metadata format.

Functions

acknowledge()

acknowledge(rubric, receipt?): Locked

Defined in: src/correxit/rubric.ts:832

Parameters

Parameter Type Default value
rubric Locked undefined
receipt string | null null

Returns

Locked

a locked rubric with a submitted receipt.


add()

add(rubric, cell, references?): Unlocked

Defined in: src/correxit/rubric.ts:844

Parameters

Parameter Type Default value
rubric Unlocked undefined
cell Cell undefined
references Readonly\<{ cell: string; points: number; referent: string; secret: boolean; }>[] []

Returns

Unlocked

an unlocked rubric that includes the added cell.


assign()

assign(__namedParameters, __namedParameters?): Promise\<Unlocked>

Defined in: src/correxit/rubric.ts:900

Parameters

Parameter Type
__namedParameters Unlocked
__namedParameters Partial\<Assignment>

Returns

Promise\<Unlocked>

an unlocked rubric with the given assignment details.


certify()

certify(rubric): Unlocked

Defined in: src/correxit/rubric.ts:989

Parameters

Parameter Type
rubric Unlocked

Returns

Unlocked

an unlocked rubric with a certification timestamp.


collect()

collect(rubric, receipt?): Locked

Defined in: src/correxit/rubric.ts:996

Parameters

Parameter Type Default value
rubric Locked undefined
receipt string | null null

Returns

Locked

a locked rubric with a collected receipt.


create()

create(): Omit\<Unlocked, "key">

Defined in: src/correxit/rubric.ts:963

Returns

Omit\<Unlocked, "key">

an unlocked rubric with the key field omitted. The client needs to add a key field to use the rubric.


dereference()

dereference(rubric, referent): Unlocked

Defined in: src/correxit/rubric.ts:1009

Remove a single reference; removes the cell if none remain.

Parameters

Parameter Type
rubric Unlocked
referent string

Returns

Unlocked


distribute()

Call Signature

distribute(rubric): Locked

Defined in: src/correxit/rubric.ts:1043

Parameters
Parameter Type
rubric Locked
Returns

Locked

Call Signature

distribute(rubric): Unlocked

Defined in: src/correxit/rubric.ts:1044

Parameters
Parameter Type
rubric Unlocked
Returns

Unlocked


draft()

draft(rubric): Locked

Defined in: src/correxit/rubric.ts:975

Parameters

Parameter Type
rubric Locked

Returns

Locked

a locked rubric with lifecycle timestamps nulled.


get()

get(rubric, id): Cell | null

Defined in: src/correxit/rubric.ts:1052

Parameters

Parameter Type
rubric Rubric
id string

Returns

Cell | null

the cell for id, or null.


has()

has(rubric, id): boolean

Defined in: src/correxit/rubric.ts:1057

Parameters

Parameter Type
rubric Rubric
id string

Returns

boolean

whether a rubric has a cell with the given id.


lock()

lock(rubric): Promise\<Locked>

Defined in: src/correxit/rubric.ts:1062

Parameters

Parameter Type
rubric Rubric

Returns

Promise\<Locked>

the given rubric, locked.


mac()

mac(rubric, key): Promise\<string>

Defined in: src/correxit/rubric.ts:1084

Parameters

Parameter Type
rubric Rubric
key string

Returns

Promise\<string>

an HMAC associated with the given rubric.


normalize()

normalize(rubric?): Locked

Defined in: src/correxit/rubric.ts:1089

Parameters

Parameter Type
rubric Partial\<Locked>

Returns

Locked

a normalized locked rubric or throws.


pending()

pending(__namedParameters): boolean

Defined in: src/correxit/rubric.ts:1165

Parameters

Parameter Type
__namedParameters Rubric

Returns

boolean

whether any reviewable cell still needs an intervention.


provision()

provision(rubric, keys): Locked

Defined in: src/correxit/rubric.ts:1172

Provision a locked rubric with assignee keys for sealed submission.

Parameters

Parameter Type
rubric Locked
keys Keys

Returns

Locked


refer()

refer(rubric, id, reference): Unlocked

Defined in: src/correxit/rubric.ts:1178

Add a reference to an existing comparable or correctable cell.

Parameters

Parameter Type
rubric Unlocked
id string
reference Reference

Returns

Unlocked


remove()

remove(rubric, id): Unlocked

Defined in: src/correxit/rubric.ts:1216

Parameters

Parameter Type
rubric Unlocked
id string

Returns

Unlocked

an unlocked rubric which excludes the given cell.


seal()

seal(rubric, hash): Locked

Defined in: src/correxit/rubric.ts:1252

Record a seal hash on a locked rubric.

Parameters

Parameter Type
rubric Locked
hash string

Returns

Locked


sign()

sign(rubric, report): Promise\<Unlocked>

Defined in: src/correxit/rubric.ts:1232

Parameters

Parameter Type
rubric Unlocked
report Report

Returns

Promise\<Unlocked>

an unlocked rubric with a signed assignment report.


submit()

submit(rubric, submission?): Locked

Defined in: src/correxit/rubric.ts:1243

Record the submission timestamp for a locked workbook.

Parameters

Parameter Type
rubric Locked
submission number

Returns

Locked


terms()

terms(rubric): Terms

Defined in: src/correxit/rubric.ts:1257

Parameters

Parameter Type
rubric Rubric

Returns

Terms


timestamp()

timestamp(timestamp, empty?): string

Defined in: src/correxit/rubric.ts:1268

Parameters

Parameter Type Default value
timestamp Timestamp undefined
empty string ''

Returns

string

a formatted rendition of a rubric timestamp.


toggle()

toggle(rubric, referent): Unlocked

Defined in: src/correxit/rubric.ts:1279

Parameters

Parameter Type
rubric Unlocked
referent string

Returns

Unlocked

a rubric with a reference's secret flag toggled.


unlock()

unlock(rubric, key): Promise\<Unlocked>

Defined in: src/correxit/rubric.ts:1294

Parameters

Parameter Type
rubric Locked
key string

Returns

Promise\<Unlocked>

an unlocked rubric after decrypting the roster.


unseal()

unseal(rubric): Locked

Defined in: src/correxit/rubric.ts:1309

Clear seal and student keys (for revise).

Parameters

Parameter Type
rubric Locked

Returns

Locked


validate()

validate(rubric): Promise\<void>

Defined in: src/correxit/rubric.ts:1324

Parameters

Parameter Type
rubric Unlocked

Returns

Promise\<void>