Correxit API / Browser / Rubric
Rubric¶
Immutable assignment, cell, reference, and scoring data.
Namespaces¶
| Namespace | Description |
|---|---|
| Assignment | - |
| Cell | - |
| Content | - |
| 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; }>;id:string;references:Readonly\<{[referent:string]:Readonly\<{cell:string;points:number;referent:string;secret:boolean; }>; }>;revised:number; }> &Format
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:76
Cell grading configuration.
Content¶
Content =
Readonly\<{digest:string|null;id:string;type:INotebookContent["cells"][number]["cell_type"]; }>
Defined in: src/correxit/rubric.ts:62
Issued cell order, types, and keyed source commitments.
Format¶
Format =
Readonly\<{contents:Content[] |null;cxtformat: typeofCXTFORMAT; }>
Defined in: src/correxit/rubric.ts:56
Locked¶
Locked =
Base&Readonly\<{key:null;locked:true; }>
Defined in: src/correxit/rubric.ts:339
A rubric whose key is absent.
Outputs¶
Outputs =
Map\<string,Output[]>
Defined in: src/correxit/rubric.ts:384
Score¶
Score =
Readonly\<{code:Code;comment:string;id:string;points:number;possible:number;status:Status; }>
Defined in: src/correxit/rubric.ts:386
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; }>;id:string;references:Readonly\<{[referent:string]:Readonly\<{cell:string;points:number;referent:string;secret:boolean; }>; }>; }> &Format
Defined in: src/correxit/rubric.ts:396
The signed terms of a rubric/assignment pairing.
Timestamp¶
Timestamp =
number|null
Defined in: src/correxit/rubric.ts:419
Unlocked¶
Unlocked =
Base&Readonly\<{key:string;locked:false; }>
Defined in: src/correxit/rubric.ts:422
A rubric whose key is available in memory.
Variables¶
CXTFORMAT¶
constCXTFORMAT:2
Defined in: src/correxit/rubric.ts:22
Current persisted Correxit metadata format.
Functions¶
acknowledge()¶
acknowledge(
rubric,receipt?):Locked
Defined in: src/correxit/rubric.ts:863
Parameters¶
| Parameter | Type | Default value |
|---|---|---|
rubric |
Locked |
undefined |
receipt |
string | null |
null |
Returns¶
a locked rubric with a submitted receipt.
add()¶
add(
rubric,cell,references?):Unlocked
Defined in: src/correxit/rubric.ts:875
Parameters¶
| Parameter | Type | Default value |
|---|---|---|
rubric |
Unlocked |
undefined |
cell |
Cell |
undefined |
references |
Readonly\<{ cell: string; points: number; referent: string; secret: boolean; }>[] |
[] |
Returns¶
an unlocked rubric that includes the added cell.
assign()¶
assign(
__namedParameters,__namedParameters?):Promise\<Unlocked>
Defined in: src/correxit/rubric.ts:932
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:1021
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
Returns¶
an unlocked rubric with a certification timestamp.
collect()¶
collect(
rubric,receipt?):Locked
Defined in: src/correxit/rubric.ts:1028
Parameters¶
| Parameter | Type | Default value |
|---|---|---|
rubric |
Locked |
undefined |
receipt |
string | null |
null |
Returns¶
a locked rubric with a collected receipt.
create()¶
create():
Omit\<Unlocked,"key">
Defined in: src/correxit/rubric.ts:995
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:1041
Remove a single reference; removes the cell if none remain.
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
referent |
string |
Returns¶
distribute()¶
Call Signature¶
distribute(
rubric):Locked
Defined in: src/correxit/rubric.ts:1075
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
Returns¶
Call Signature¶
distribute(
rubric):Unlocked
Defined in: src/correxit/rubric.ts:1076
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
Returns¶
draft()¶
draft(
rubric):Locked
Defined in: src/correxit/rubric.ts:1007
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
Returns¶
a locked rubric with lifecycle timestamps nulled.
get()¶
get(
rubric,id):Cell|null
Defined in: src/correxit/rubric.ts:1084
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:1089
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:1094
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Rubric |
Returns¶
Promise\<Locked>
the given rubric, locked.
mac()¶
mac(
rubric,key):Promise\<string>
Defined in: src/correxit/rubric.ts:1118
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:1123
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Partial\<Locked> |
Returns¶
a normalized locked rubric or throws.
pending()¶
pending(
__namedParameters):boolean
Defined in: src/correxit/rubric.ts:1214
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:1221
Provision a locked rubric with assignee keys for sealed submission.
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
keys |
Keys |
Returns¶
refer()¶
refer(
rubric,id,reference):Unlocked
Defined in: src/correxit/rubric.ts:1227
Add a reference to an existing comparable or correctable cell.
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
id |
string |
reference |
Reference |
Returns¶
remove()¶
remove(
rubric,id):Unlocked
Defined in: src/correxit/rubric.ts:1266
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
id |
string |
Returns¶
an unlocked rubric which excludes the given cell.
seal()¶
seal(
rubric,hash):Locked
Defined in: src/correxit/rubric.ts:1302
Record a seal hash on a locked rubric.
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
hash |
string |
Returns¶
sign()¶
sign(
rubric,report):Promise\<Unlocked>
Defined in: src/correxit/rubric.ts:1282
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:1293
Record the submission timestamp for a locked workbook.
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
submission |
number |
Returns¶
terms()¶
terms(
rubric):Terms
Defined in: src/correxit/rubric.ts:1307
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Rubric |
Returns¶
timestamp()¶
timestamp(
timestamp,empty?):string
Defined in: src/correxit/rubric.ts:1319
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:1330
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
referent |
string |
Returns¶
a rubric with a reference's secret flag toggled.
unlock()¶
unlock(
rubric,key):Promise\<Unlocked>
Defined in: src/correxit/rubric.ts:1345
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:1358
Clear seal and student keys (for revise).
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Locked |
Returns¶
validate()¶
validate(
rubric):Promise\<void>
Defined in: src/correxit/rubric.ts:1373
Parameters¶
| Parameter | Type |
|---|---|
rubric |
Unlocked |
Returns¶
Promise\<void>