@nakafa/aksara-contracts 8.4.1 → 8.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assessment/answer.d.ts +2 -0
- package/dist/assessment/answer.js +5 -3
- package/dist/assessment/closure.js +2 -1
- package/dist/assessment/fit.d.ts +16 -2
- package/dist/assessment/fit.js +23 -5
- package/dist/assessment/graphic.d.ts +27 -0
- package/dist/assessment/graphic.js +17 -1
- package/dist/assessment/hash.d.ts +71 -3
- package/dist/assessment/interaction.d.ts +18 -1
- package/dist/assessment/interaction.js +2 -1
- package/dist/assessment/item.d.ts +85 -0
- package/dist/assessment/item.js +1 -1
- package/dist/assessment/joint.d.ts +4 -3
- package/dist/assessment/joint.js +4 -3
- package/dist/assessment/key.d.ts +138 -0
- package/dist/assessment/key.js +6 -0
- package/dist/assessment/paper.d.ts +316 -0
- package/dist/assessment/profile.d.ts +3 -3
- package/dist/assessment/profile.js +4 -4
- package/dist/assessment/rows.d.ts +285 -3
- package/dist/assessment/scoring.d.ts +12 -6
- package/dist/assessment/scoring.js +25 -8
- package/dist/assessment/sketch.d.ts +125 -0
- package/dist/assessment/sketch.js +175 -0
- package/dist/assessment/snapshot.d.ts +746 -10
- package/dist/assessment/structure.js +4 -4
- package/dist/hash/sha256.d.ts +16 -0
- package/dist/hash/sha256.js +164 -0
- package/dist/hash/stream.d.ts +7 -5
- package/dist/hash/stream.js +13 -18
- package/dist/math/boundary.js +3 -22
- package/dist/math/edge.d.ts +11 -0
- package/dist/math/edge.js +74 -0
- package/dist/math/graph.d.ts +9 -0
- package/dist/math/graph.js +66 -0
- package/dist/math/plane.js +6 -0
- package/dist/math/shape.d.ts +392 -0
- package/dist/math/shape.js +59 -0
- package/dist/math/straight.d.ts +13 -0
- package/dist/math/straight.js +26 -0
- package/dist/release/snapshot/data.d.ts +88 -2
- package/dist/release/snapshot/verify.d.ts +285 -3
- package/dist/transport/group.d.ts +264 -6
- package/dist/transport/request.d.ts +1886 -22
- package/dist/transport/snapshot.d.ts +176 -4
- package/dist/visual/biology/blood.d.ts +91 -0
- package/dist/visual/biology/blood.js +55 -0
- package/dist/visual/biology/heart.d.ts +92 -0
- package/dist/visual/biology/heart.js +54 -0
- package/dist/visual/biology/mitochondrion.d.ts +91 -0
- package/dist/visual/biology/mitochondrion.js +45 -0
- package/dist/visual/biology/muscle.d.ts +103 -0
- package/dist/visual/biology/muscle.js +62 -0
- package/dist/visual/biology/neuron.d.ts +97 -0
- package/dist/visual/biology/neuron.js +48 -0
- package/dist/visual/biology/paddy.d.ts +100 -0
- package/dist/visual/biology/paddy.js +54 -0
- package/dist/visual/biology/synapse.d.ts +101 -0
- package/dist/visual/biology/synapse.js +46 -0
- package/dist/visual/biology/vessel.d.ts +104 -0
- package/dist/visual/biology/vessel.js +60 -0
- package/dist/visual/biology/yeast.d.ts +108 -0
- package/dist/visual/biology/yeast.js +61 -0
- package/dist/visual/catalog.d.ts +2177 -778
- package/dist/visual/catalog.js +28 -0
- package/dist/visual/mathematics/journey.d.ts +118 -0
- package/dist/visual/mathematics/journey.js +125 -0
- package/dist/visual/mathematics/logic.d.ts +90 -0
- package/dist/visual/mathematics/logic.js +49 -0
- package/dist/visual/mathematics/network.d.ts +101 -0
- package/dist/visual/mathematics/network.js +97 -0
- package/dist/visual/mathematics/numeral.d.ts +81 -0
- package/dist/visual/mathematics/numeral.js +48 -0
- package/dist/visual/mathematics/sets.d.ts +92 -0
- package/dist/visual/mathematics/sets.js +95 -0
- package/dist/visual/physics/thermodynamics.d.ts +117 -0
- package/dist/visual/physics/thermodynamics.js +95 -0
- package/package.json +2 -2
package/dist/assessment/key.d.ts
CHANGED
|
@@ -84,12 +84,81 @@ export declare const InteractionKeySchema: Schema.Union<readonly [Schema.Struct<
|
|
|
84
84
|
readonly interaction: Schema.String;
|
|
85
85
|
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
86
86
|
readonly criterion: Schema.String;
|
|
87
|
+
readonly feedback: Schema.optionalKey<Schema.Struct<{
|
|
88
|
+
readonly earned: Schema.Trimmed;
|
|
89
|
+
readonly missed: Schema.Trimmed;
|
|
90
|
+
}>>;
|
|
87
91
|
readonly levels: Schema.NonEmptyArray<Schema.Struct<{
|
|
88
92
|
readonly descriptor: Schema.Trimmed;
|
|
89
93
|
readonly level: Schema.String;
|
|
90
94
|
}>>;
|
|
91
95
|
}>>;
|
|
92
96
|
readonly kind: Schema.Literal<"extendedText">;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
99
|
+
readonly check: Schema.Struct<{
|
|
100
|
+
readonly feature: Schema.Union<readonly [Schema.Struct<{
|
|
101
|
+
readonly contact: Schema.Literals<readonly ["cross", "touch"]>;
|
|
102
|
+
readonly kind: Schema.Literal<"zero">;
|
|
103
|
+
readonly x: Schema.String;
|
|
104
|
+
}>, Schema.Struct<{
|
|
105
|
+
readonly kind: Schema.Literal<"yIntercept">;
|
|
106
|
+
readonly y: Schema.String;
|
|
107
|
+
}>, Schema.Struct<{
|
|
108
|
+
readonly kind: Schema.Literal<"extremum">;
|
|
109
|
+
readonly turn: Schema.Literals<readonly ["maximum", "minimum"]>;
|
|
110
|
+
readonly x: Schema.String;
|
|
111
|
+
readonly y: Schema.String;
|
|
112
|
+
}>, Schema.Struct<{
|
|
113
|
+
readonly kind: Schema.Literal<"asymptote">;
|
|
114
|
+
readonly line: Schema.Union<readonly [Schema.Struct<{
|
|
115
|
+
readonly kind: Schema.Literal<"vertical">;
|
|
116
|
+
readonly x: Schema.String;
|
|
117
|
+
}>, Schema.Struct<{
|
|
118
|
+
readonly intercept: Schema.String;
|
|
119
|
+
readonly kind: Schema.Literal<"sloped">;
|
|
120
|
+
readonly slope: Schema.String;
|
|
121
|
+
}>]>;
|
|
122
|
+
}>, Schema.Struct<{
|
|
123
|
+
readonly direction: Schema.Literals<readonly ["falling", "rising"]>;
|
|
124
|
+
readonly from: Schema.NullOr<Schema.String>;
|
|
125
|
+
readonly kind: Schema.Literal<"interval">;
|
|
126
|
+
readonly to: Schema.NullOr<Schema.String>;
|
|
127
|
+
}>, Schema.Struct<{
|
|
128
|
+
readonly kind: Schema.Literal<"end">;
|
|
129
|
+
readonly limit: Schema.Union<readonly [Schema.Literals<readonly ["negativeInfinity", "positiveInfinity"]>, Schema.String]>;
|
|
130
|
+
readonly side: Schema.Literals<readonly ["left", "right"]>;
|
|
131
|
+
}>, Schema.Struct<{
|
|
132
|
+
readonly kind: Schema.Literal<"inflection">;
|
|
133
|
+
readonly x: Schema.String;
|
|
134
|
+
readonly y: Schema.String;
|
|
135
|
+
}>, Schema.Struct<{
|
|
136
|
+
readonly end: Schema.optionalKey<Schema.Literals<readonly ["closed", "open"]>>;
|
|
137
|
+
readonly kind: Schema.Literal<"point">;
|
|
138
|
+
readonly x: Schema.String;
|
|
139
|
+
readonly y: Schema.String;
|
|
140
|
+
}>]>;
|
|
141
|
+
readonly kind: Schema.Literal<"feature">;
|
|
142
|
+
}>;
|
|
143
|
+
readonly criterion: Schema.String;
|
|
144
|
+
readonly feedback: Schema.Struct<{
|
|
145
|
+
readonly earned: Schema.Trimmed;
|
|
146
|
+
readonly missed: Schema.Trimmed;
|
|
147
|
+
}>;
|
|
148
|
+
readonly requires: Schema.optionalKey<Schema.NonEmptyArray<Schema.String>>;
|
|
149
|
+
}>>;
|
|
150
|
+
readonly interaction: Schema.String;
|
|
151
|
+
readonly kind: Schema.Literal<"sketch">;
|
|
152
|
+
readonly tolerances: Schema.Struct<{
|
|
153
|
+
readonly asymptote: Schema.optionalKey<Schema.String>;
|
|
154
|
+
readonly end: Schema.optionalKey<Schema.String>;
|
|
155
|
+
readonly extremum: Schema.optionalKey<Schema.String>;
|
|
156
|
+
readonly inflection: Schema.optionalKey<Schema.String>;
|
|
157
|
+
readonly interval: Schema.optionalKey<Schema.String>;
|
|
158
|
+
readonly point: Schema.optionalKey<Schema.String>;
|
|
159
|
+
readonly yIntercept: Schema.optionalKey<Schema.String>;
|
|
160
|
+
readonly zero: Schema.optionalKey<Schema.String>;
|
|
161
|
+
}>;
|
|
93
162
|
}>]>;
|
|
94
163
|
export type InteractionKey = typeof InteractionKeySchema.Type;
|
|
95
164
|
/**
|
|
@@ -183,12 +252,81 @@ export declare const ItemKeySchema: Schema.Struct<{
|
|
|
183
252
|
readonly interaction: Schema.String;
|
|
184
253
|
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
185
254
|
readonly criterion: Schema.String;
|
|
255
|
+
readonly feedback: Schema.optionalKey<Schema.Struct<{
|
|
256
|
+
readonly earned: Schema.Trimmed;
|
|
257
|
+
readonly missed: Schema.Trimmed;
|
|
258
|
+
}>>;
|
|
186
259
|
readonly levels: Schema.NonEmptyArray<Schema.Struct<{
|
|
187
260
|
readonly descriptor: Schema.Trimmed;
|
|
188
261
|
readonly level: Schema.String;
|
|
189
262
|
}>>;
|
|
190
263
|
}>>;
|
|
191
264
|
readonly kind: Schema.Literal<"extendedText">;
|
|
265
|
+
}>, Schema.Struct<{
|
|
266
|
+
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
267
|
+
readonly check: Schema.Struct<{
|
|
268
|
+
readonly feature: Schema.Union<readonly [Schema.Struct<{
|
|
269
|
+
readonly contact: Schema.Literals<readonly ["cross", "touch"]>;
|
|
270
|
+
readonly kind: Schema.Literal<"zero">;
|
|
271
|
+
readonly x: Schema.String;
|
|
272
|
+
}>, Schema.Struct<{
|
|
273
|
+
readonly kind: Schema.Literal<"yIntercept">;
|
|
274
|
+
readonly y: Schema.String;
|
|
275
|
+
}>, Schema.Struct<{
|
|
276
|
+
readonly kind: Schema.Literal<"extremum">;
|
|
277
|
+
readonly turn: Schema.Literals<readonly ["maximum", "minimum"]>;
|
|
278
|
+
readonly x: Schema.String;
|
|
279
|
+
readonly y: Schema.String;
|
|
280
|
+
}>, Schema.Struct<{
|
|
281
|
+
readonly kind: Schema.Literal<"asymptote">;
|
|
282
|
+
readonly line: Schema.Union<readonly [Schema.Struct<{
|
|
283
|
+
readonly kind: Schema.Literal<"vertical">;
|
|
284
|
+
readonly x: Schema.String;
|
|
285
|
+
}>, Schema.Struct<{
|
|
286
|
+
readonly intercept: Schema.String;
|
|
287
|
+
readonly kind: Schema.Literal<"sloped">;
|
|
288
|
+
readonly slope: Schema.String;
|
|
289
|
+
}>]>;
|
|
290
|
+
}>, Schema.Struct<{
|
|
291
|
+
readonly direction: Schema.Literals<readonly ["falling", "rising"]>;
|
|
292
|
+
readonly from: Schema.NullOr<Schema.String>;
|
|
293
|
+
readonly kind: Schema.Literal<"interval">;
|
|
294
|
+
readonly to: Schema.NullOr<Schema.String>;
|
|
295
|
+
}>, Schema.Struct<{
|
|
296
|
+
readonly kind: Schema.Literal<"end">;
|
|
297
|
+
readonly limit: Schema.Union<readonly [Schema.Literals<readonly ["negativeInfinity", "positiveInfinity"]>, Schema.String]>;
|
|
298
|
+
readonly side: Schema.Literals<readonly ["left", "right"]>;
|
|
299
|
+
}>, Schema.Struct<{
|
|
300
|
+
readonly kind: Schema.Literal<"inflection">;
|
|
301
|
+
readonly x: Schema.String;
|
|
302
|
+
readonly y: Schema.String;
|
|
303
|
+
}>, Schema.Struct<{
|
|
304
|
+
readonly end: Schema.optionalKey<Schema.Literals<readonly ["closed", "open"]>>;
|
|
305
|
+
readonly kind: Schema.Literal<"point">;
|
|
306
|
+
readonly x: Schema.String;
|
|
307
|
+
readonly y: Schema.String;
|
|
308
|
+
}>]>;
|
|
309
|
+
readonly kind: Schema.Literal<"feature">;
|
|
310
|
+
}>;
|
|
311
|
+
readonly criterion: Schema.String;
|
|
312
|
+
readonly feedback: Schema.Struct<{
|
|
313
|
+
readonly earned: Schema.Trimmed;
|
|
314
|
+
readonly missed: Schema.Trimmed;
|
|
315
|
+
}>;
|
|
316
|
+
readonly requires: Schema.optionalKey<Schema.NonEmptyArray<Schema.String>>;
|
|
317
|
+
}>>;
|
|
318
|
+
readonly interaction: Schema.String;
|
|
319
|
+
readonly kind: Schema.Literal<"sketch">;
|
|
320
|
+
readonly tolerances: Schema.Struct<{
|
|
321
|
+
readonly asymptote: Schema.optionalKey<Schema.String>;
|
|
322
|
+
readonly end: Schema.optionalKey<Schema.String>;
|
|
323
|
+
readonly extremum: Schema.optionalKey<Schema.String>;
|
|
324
|
+
readonly inflection: Schema.optionalKey<Schema.String>;
|
|
325
|
+
readonly interval: Schema.optionalKey<Schema.String>;
|
|
326
|
+
readonly point: Schema.optionalKey<Schema.String>;
|
|
327
|
+
readonly yIntercept: Schema.optionalKey<Schema.String>;
|
|
328
|
+
readonly zero: Schema.optionalKey<Schema.String>;
|
|
329
|
+
}>;
|
|
192
330
|
}>]>>;
|
|
193
331
|
readonly version: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
194
332
|
}>;
|
package/dist/assessment/key.js
CHANGED
|
@@ -3,6 +3,7 @@ import { DecimalSchema, TextKeySchema, ToleranceSchema, } from "#contracts/asses
|
|
|
3
3
|
import { hasDistinctIds, LocalIdSchema } from "#contracts/assessment/identity";
|
|
4
4
|
import { isWithinRecordLimit } from "#contracts/assessment/record";
|
|
5
5
|
import { LatexSchema, PlainTextSchema } from "#contracts/assessment/scalar";
|
|
6
|
+
import { CriterionFeedbackSchema, SketchKeySchema, } from "#contracts/assessment/sketch";
|
|
6
7
|
import { Sha256HashSchema } from "#contracts/ids";
|
|
7
8
|
import { PlanePointSchema, PositiveMeasureSchema, samePlanePoint, } from "#contracts/math/base";
|
|
8
9
|
const DISTINCT_MESSAGE = "Expected no part to be named twice.";
|
|
@@ -100,11 +101,15 @@ const GraphPointKeySchema = Schema.Struct({
|
|
|
100
101
|
/**
|
|
101
102
|
* The rubric descriptors: for each criterion, what earns each level. They are
|
|
102
103
|
* for a grader and are never shown to a learner before the key is released.
|
|
104
|
+
* `feedback`, when present, is what the learner reads about the criterion once
|
|
105
|
+
* it is scored: `earned` at its highest level and `missed` below it, the same
|
|
106
|
+
* shape a sketch's criteria carry, so one results view serves both.
|
|
103
107
|
*/
|
|
104
108
|
const ExtendedTextKeySchema = Schema.Struct({
|
|
105
109
|
...KeyFields,
|
|
106
110
|
criteria: Schema.NonEmptyArray(Schema.Struct({
|
|
107
111
|
criterion: LocalIdSchema,
|
|
112
|
+
feedback: Schema.optionalKey(CriterionFeedbackSchema),
|
|
108
113
|
levels: Schema.NonEmptyArray(Schema.Struct({ descriptor: PlainTextSchema, level: LocalIdSchema })).check(Schema.makeFilter((levels) => hasDistinctIds(Arr.map(levels, ({ level }) => level)), { message: DISTINCT_MESSAGE })),
|
|
109
114
|
})).check(Schema.makeFilter((criteria) => hasDistinctIds(Arr.map(criteria, ({ criterion }) => criterion)), { message: DISTINCT_MESSAGE })),
|
|
110
115
|
kind: Schema.Literal("extendedText"),
|
|
@@ -123,6 +128,7 @@ export const InteractionKeySchema = Schema.Union([
|
|
|
123
128
|
GapMatchKeySchema,
|
|
124
129
|
GraphPointKeySchema,
|
|
125
130
|
ExtendedTextKeySchema,
|
|
131
|
+
SketchKeySchema,
|
|
126
132
|
]);
|
|
127
133
|
/**
|
|
128
134
|
* The answer key of one item version: its own schema and its own artifact,
|
|
@@ -539,6 +539,23 @@ export declare const verifyPaperStimuli: (paper: {
|
|
|
539
539
|
readonly kind: "graphPoint";
|
|
540
540
|
readonly placing: "lines" | "points";
|
|
541
541
|
readonly snap?: number;
|
|
542
|
+
} | {
|
|
543
|
+
readonly id: string;
|
|
544
|
+
readonly label: string;
|
|
545
|
+
readonly frame: {
|
|
546
|
+
readonly kind: "cartesian";
|
|
547
|
+
readonly x: {
|
|
548
|
+
readonly max: number;
|
|
549
|
+
readonly min: number;
|
|
550
|
+
};
|
|
551
|
+
readonly y: {
|
|
552
|
+
readonly max: number;
|
|
553
|
+
readonly min: number;
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
readonly grid?: number;
|
|
557
|
+
readonly kind: "sketch";
|
|
558
|
+
readonly marks: readonly ("asymptote" | "point")[];
|
|
542
559
|
}, ...({
|
|
543
560
|
readonly id: string;
|
|
544
561
|
readonly label: string;
|
|
@@ -928,6 +945,23 @@ export declare const verifyPaperStimuli: (paper: {
|
|
|
928
945
|
readonly kind: "graphPoint";
|
|
929
946
|
readonly placing: "lines" | "points";
|
|
930
947
|
readonly snap?: number;
|
|
948
|
+
} | {
|
|
949
|
+
readonly id: string;
|
|
950
|
+
readonly label: string;
|
|
951
|
+
readonly frame: {
|
|
952
|
+
readonly kind: "cartesian";
|
|
953
|
+
readonly x: {
|
|
954
|
+
readonly max: number;
|
|
955
|
+
readonly min: number;
|
|
956
|
+
};
|
|
957
|
+
readonly y: {
|
|
958
|
+
readonly max: number;
|
|
959
|
+
readonly min: number;
|
|
960
|
+
};
|
|
961
|
+
};
|
|
962
|
+
readonly grid?: number;
|
|
963
|
+
readonly kind: "sketch";
|
|
964
|
+
readonly marks: readonly ("asymptote" | "point")[];
|
|
931
965
|
})[]];
|
|
932
966
|
readonly joint?: {
|
|
933
967
|
readonly levels: readonly [{
|
|
@@ -1458,6 +1492,23 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
1458
1492
|
readonly kind: "graphPoint";
|
|
1459
1493
|
readonly placing: "lines" | "points";
|
|
1460
1494
|
readonly snap?: number;
|
|
1495
|
+
} | {
|
|
1496
|
+
readonly id: string;
|
|
1497
|
+
readonly label: string;
|
|
1498
|
+
readonly frame: {
|
|
1499
|
+
readonly kind: "cartesian";
|
|
1500
|
+
readonly x: {
|
|
1501
|
+
readonly max: number;
|
|
1502
|
+
readonly min: number;
|
|
1503
|
+
};
|
|
1504
|
+
readonly y: {
|
|
1505
|
+
readonly max: number;
|
|
1506
|
+
readonly min: number;
|
|
1507
|
+
};
|
|
1508
|
+
};
|
|
1509
|
+
readonly grid?: number;
|
|
1510
|
+
readonly kind: "sketch";
|
|
1511
|
+
readonly marks: readonly ("asymptote" | "point")[];
|
|
1461
1512
|
}, ...({
|
|
1462
1513
|
readonly id: string;
|
|
1463
1514
|
readonly label: string;
|
|
@@ -1847,6 +1898,23 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
1847
1898
|
readonly kind: "graphPoint";
|
|
1848
1899
|
readonly placing: "lines" | "points";
|
|
1849
1900
|
readonly snap?: number;
|
|
1901
|
+
} | {
|
|
1902
|
+
readonly id: string;
|
|
1903
|
+
readonly label: string;
|
|
1904
|
+
readonly frame: {
|
|
1905
|
+
readonly kind: "cartesian";
|
|
1906
|
+
readonly x: {
|
|
1907
|
+
readonly max: number;
|
|
1908
|
+
readonly min: number;
|
|
1909
|
+
};
|
|
1910
|
+
readonly y: {
|
|
1911
|
+
readonly max: number;
|
|
1912
|
+
readonly min: number;
|
|
1913
|
+
};
|
|
1914
|
+
};
|
|
1915
|
+
readonly grid?: number;
|
|
1916
|
+
readonly kind: "sketch";
|
|
1917
|
+
readonly marks: readonly ("asymptote" | "point")[];
|
|
1850
1918
|
})[]];
|
|
1851
1919
|
readonly joint?: {
|
|
1852
1920
|
readonly levels: readonly [{
|
|
@@ -1907,6 +1975,122 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
1907
1975
|
readonly hash: string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">;
|
|
1908
1976
|
}[], keys: readonly {
|
|
1909
1977
|
readonly answers: readonly [{
|
|
1978
|
+
readonly criteria: readonly [{
|
|
1979
|
+
readonly check: {
|
|
1980
|
+
readonly feature: {
|
|
1981
|
+
readonly contact: "cross" | "touch";
|
|
1982
|
+
readonly kind: "zero";
|
|
1983
|
+
readonly x: string;
|
|
1984
|
+
} | {
|
|
1985
|
+
readonly kind: "yIntercept";
|
|
1986
|
+
readonly y: string;
|
|
1987
|
+
} | {
|
|
1988
|
+
readonly kind: "extremum";
|
|
1989
|
+
readonly turn: "maximum" | "minimum";
|
|
1990
|
+
readonly x: string;
|
|
1991
|
+
readonly y: string;
|
|
1992
|
+
} | {
|
|
1993
|
+
readonly kind: "asymptote";
|
|
1994
|
+
readonly line: {
|
|
1995
|
+
readonly kind: "vertical";
|
|
1996
|
+
readonly x: string;
|
|
1997
|
+
} | {
|
|
1998
|
+
readonly intercept: string;
|
|
1999
|
+
readonly kind: "sloped";
|
|
2000
|
+
readonly slope: string;
|
|
2001
|
+
};
|
|
2002
|
+
} | {
|
|
2003
|
+
readonly direction: "falling" | "rising";
|
|
2004
|
+
readonly from: string | null;
|
|
2005
|
+
readonly kind: "interval";
|
|
2006
|
+
readonly to: string | null;
|
|
2007
|
+
} | {
|
|
2008
|
+
readonly kind: "end";
|
|
2009
|
+
readonly limit: string;
|
|
2010
|
+
readonly side: "left" | "right";
|
|
2011
|
+
} | {
|
|
2012
|
+
readonly kind: "inflection";
|
|
2013
|
+
readonly x: string;
|
|
2014
|
+
readonly y: string;
|
|
2015
|
+
} | {
|
|
2016
|
+
readonly end?: "closed" | "open";
|
|
2017
|
+
readonly kind: "point";
|
|
2018
|
+
readonly x: string;
|
|
2019
|
+
readonly y: string;
|
|
2020
|
+
};
|
|
2021
|
+
readonly kind: "feature";
|
|
2022
|
+
};
|
|
2023
|
+
readonly criterion: string;
|
|
2024
|
+
readonly feedback: {
|
|
2025
|
+
readonly earned: string;
|
|
2026
|
+
readonly missed: string;
|
|
2027
|
+
};
|
|
2028
|
+
readonly requires?: readonly [string, ...string[]];
|
|
2029
|
+
}, ...{
|
|
2030
|
+
readonly check: {
|
|
2031
|
+
readonly feature: {
|
|
2032
|
+
readonly contact: "cross" | "touch";
|
|
2033
|
+
readonly kind: "zero";
|
|
2034
|
+
readonly x: string;
|
|
2035
|
+
} | {
|
|
2036
|
+
readonly kind: "yIntercept";
|
|
2037
|
+
readonly y: string;
|
|
2038
|
+
} | {
|
|
2039
|
+
readonly kind: "extremum";
|
|
2040
|
+
readonly turn: "maximum" | "minimum";
|
|
2041
|
+
readonly x: string;
|
|
2042
|
+
readonly y: string;
|
|
2043
|
+
} | {
|
|
2044
|
+
readonly kind: "asymptote";
|
|
2045
|
+
readonly line: {
|
|
2046
|
+
readonly kind: "vertical";
|
|
2047
|
+
readonly x: string;
|
|
2048
|
+
} | {
|
|
2049
|
+
readonly intercept: string;
|
|
2050
|
+
readonly kind: "sloped";
|
|
2051
|
+
readonly slope: string;
|
|
2052
|
+
};
|
|
2053
|
+
} | {
|
|
2054
|
+
readonly direction: "falling" | "rising";
|
|
2055
|
+
readonly from: string | null;
|
|
2056
|
+
readonly kind: "interval";
|
|
2057
|
+
readonly to: string | null;
|
|
2058
|
+
} | {
|
|
2059
|
+
readonly kind: "end";
|
|
2060
|
+
readonly limit: string;
|
|
2061
|
+
readonly side: "left" | "right";
|
|
2062
|
+
} | {
|
|
2063
|
+
readonly kind: "inflection";
|
|
2064
|
+
readonly x: string;
|
|
2065
|
+
readonly y: string;
|
|
2066
|
+
} | {
|
|
2067
|
+
readonly end?: "closed" | "open";
|
|
2068
|
+
readonly kind: "point";
|
|
2069
|
+
readonly x: string;
|
|
2070
|
+
readonly y: string;
|
|
2071
|
+
};
|
|
2072
|
+
readonly kind: "feature";
|
|
2073
|
+
};
|
|
2074
|
+
readonly criterion: string;
|
|
2075
|
+
readonly feedback: {
|
|
2076
|
+
readonly earned: string;
|
|
2077
|
+
readonly missed: string;
|
|
2078
|
+
};
|
|
2079
|
+
readonly requires?: readonly [string, ...string[]];
|
|
2080
|
+
}[]];
|
|
2081
|
+
readonly interaction: string;
|
|
2082
|
+
readonly kind: "sketch";
|
|
2083
|
+
readonly tolerances: {
|
|
2084
|
+
readonly asymptote?: string;
|
|
2085
|
+
readonly end?: string;
|
|
2086
|
+
readonly extremum?: string;
|
|
2087
|
+
readonly inflection?: string;
|
|
2088
|
+
readonly interval?: string;
|
|
2089
|
+
readonly point?: string;
|
|
2090
|
+
readonly yIntercept?: string;
|
|
2091
|
+
readonly zero?: string;
|
|
2092
|
+
};
|
|
2093
|
+
} | {
|
|
1910
2094
|
readonly interaction: string;
|
|
1911
2095
|
readonly correct: readonly [string, ...string[]];
|
|
1912
2096
|
readonly kind: "choice";
|
|
@@ -2002,6 +2186,10 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
2002
2186
|
readonly interaction: string;
|
|
2003
2187
|
readonly criteria: readonly [{
|
|
2004
2188
|
readonly criterion: string;
|
|
2189
|
+
readonly feedback?: {
|
|
2190
|
+
readonly earned: string;
|
|
2191
|
+
readonly missed: string;
|
|
2192
|
+
};
|
|
2005
2193
|
readonly levels: readonly [{
|
|
2006
2194
|
readonly descriptor: string;
|
|
2007
2195
|
readonly level: string;
|
|
@@ -2011,6 +2199,10 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
2011
2199
|
}[]];
|
|
2012
2200
|
}, ...{
|
|
2013
2201
|
readonly criterion: string;
|
|
2202
|
+
readonly feedback?: {
|
|
2203
|
+
readonly earned: string;
|
|
2204
|
+
readonly missed: string;
|
|
2205
|
+
};
|
|
2014
2206
|
readonly levels: readonly [{
|
|
2015
2207
|
readonly descriptor: string;
|
|
2016
2208
|
readonly level: string;
|
|
@@ -2029,6 +2221,122 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
2029
2221
|
};
|
|
2030
2222
|
readonly value: string;
|
|
2031
2223
|
}, ...({
|
|
2224
|
+
readonly criteria: readonly [{
|
|
2225
|
+
readonly check: {
|
|
2226
|
+
readonly feature: {
|
|
2227
|
+
readonly contact: "cross" | "touch";
|
|
2228
|
+
readonly kind: "zero";
|
|
2229
|
+
readonly x: string;
|
|
2230
|
+
} | {
|
|
2231
|
+
readonly kind: "yIntercept";
|
|
2232
|
+
readonly y: string;
|
|
2233
|
+
} | {
|
|
2234
|
+
readonly kind: "extremum";
|
|
2235
|
+
readonly turn: "maximum" | "minimum";
|
|
2236
|
+
readonly x: string;
|
|
2237
|
+
readonly y: string;
|
|
2238
|
+
} | {
|
|
2239
|
+
readonly kind: "asymptote";
|
|
2240
|
+
readonly line: {
|
|
2241
|
+
readonly kind: "vertical";
|
|
2242
|
+
readonly x: string;
|
|
2243
|
+
} | {
|
|
2244
|
+
readonly intercept: string;
|
|
2245
|
+
readonly kind: "sloped";
|
|
2246
|
+
readonly slope: string;
|
|
2247
|
+
};
|
|
2248
|
+
} | {
|
|
2249
|
+
readonly direction: "falling" | "rising";
|
|
2250
|
+
readonly from: string | null;
|
|
2251
|
+
readonly kind: "interval";
|
|
2252
|
+
readonly to: string | null;
|
|
2253
|
+
} | {
|
|
2254
|
+
readonly kind: "end";
|
|
2255
|
+
readonly limit: string;
|
|
2256
|
+
readonly side: "left" | "right";
|
|
2257
|
+
} | {
|
|
2258
|
+
readonly kind: "inflection";
|
|
2259
|
+
readonly x: string;
|
|
2260
|
+
readonly y: string;
|
|
2261
|
+
} | {
|
|
2262
|
+
readonly end?: "closed" | "open";
|
|
2263
|
+
readonly kind: "point";
|
|
2264
|
+
readonly x: string;
|
|
2265
|
+
readonly y: string;
|
|
2266
|
+
};
|
|
2267
|
+
readonly kind: "feature";
|
|
2268
|
+
};
|
|
2269
|
+
readonly criterion: string;
|
|
2270
|
+
readonly feedback: {
|
|
2271
|
+
readonly earned: string;
|
|
2272
|
+
readonly missed: string;
|
|
2273
|
+
};
|
|
2274
|
+
readonly requires?: readonly [string, ...string[]];
|
|
2275
|
+
}, ...{
|
|
2276
|
+
readonly check: {
|
|
2277
|
+
readonly feature: {
|
|
2278
|
+
readonly contact: "cross" | "touch";
|
|
2279
|
+
readonly kind: "zero";
|
|
2280
|
+
readonly x: string;
|
|
2281
|
+
} | {
|
|
2282
|
+
readonly kind: "yIntercept";
|
|
2283
|
+
readonly y: string;
|
|
2284
|
+
} | {
|
|
2285
|
+
readonly kind: "extremum";
|
|
2286
|
+
readonly turn: "maximum" | "minimum";
|
|
2287
|
+
readonly x: string;
|
|
2288
|
+
readonly y: string;
|
|
2289
|
+
} | {
|
|
2290
|
+
readonly kind: "asymptote";
|
|
2291
|
+
readonly line: {
|
|
2292
|
+
readonly kind: "vertical";
|
|
2293
|
+
readonly x: string;
|
|
2294
|
+
} | {
|
|
2295
|
+
readonly intercept: string;
|
|
2296
|
+
readonly kind: "sloped";
|
|
2297
|
+
readonly slope: string;
|
|
2298
|
+
};
|
|
2299
|
+
} | {
|
|
2300
|
+
readonly direction: "falling" | "rising";
|
|
2301
|
+
readonly from: string | null;
|
|
2302
|
+
readonly kind: "interval";
|
|
2303
|
+
readonly to: string | null;
|
|
2304
|
+
} | {
|
|
2305
|
+
readonly kind: "end";
|
|
2306
|
+
readonly limit: string;
|
|
2307
|
+
readonly side: "left" | "right";
|
|
2308
|
+
} | {
|
|
2309
|
+
readonly kind: "inflection";
|
|
2310
|
+
readonly x: string;
|
|
2311
|
+
readonly y: string;
|
|
2312
|
+
} | {
|
|
2313
|
+
readonly end?: "closed" | "open";
|
|
2314
|
+
readonly kind: "point";
|
|
2315
|
+
readonly x: string;
|
|
2316
|
+
readonly y: string;
|
|
2317
|
+
};
|
|
2318
|
+
readonly kind: "feature";
|
|
2319
|
+
};
|
|
2320
|
+
readonly criterion: string;
|
|
2321
|
+
readonly feedback: {
|
|
2322
|
+
readonly earned: string;
|
|
2323
|
+
readonly missed: string;
|
|
2324
|
+
};
|
|
2325
|
+
readonly requires?: readonly [string, ...string[]];
|
|
2326
|
+
}[]];
|
|
2327
|
+
readonly interaction: string;
|
|
2328
|
+
readonly kind: "sketch";
|
|
2329
|
+
readonly tolerances: {
|
|
2330
|
+
readonly asymptote?: string;
|
|
2331
|
+
readonly end?: string;
|
|
2332
|
+
readonly extremum?: string;
|
|
2333
|
+
readonly inflection?: string;
|
|
2334
|
+
readonly interval?: string;
|
|
2335
|
+
readonly point?: string;
|
|
2336
|
+
readonly yIntercept?: string;
|
|
2337
|
+
readonly zero?: string;
|
|
2338
|
+
};
|
|
2339
|
+
} | {
|
|
2032
2340
|
readonly interaction: string;
|
|
2033
2341
|
readonly correct: readonly [string, ...string[]];
|
|
2034
2342
|
readonly kind: "choice";
|
|
@@ -2124,6 +2432,10 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
2124
2432
|
readonly interaction: string;
|
|
2125
2433
|
readonly criteria: readonly [{
|
|
2126
2434
|
readonly criterion: string;
|
|
2435
|
+
readonly feedback?: {
|
|
2436
|
+
readonly earned: string;
|
|
2437
|
+
readonly missed: string;
|
|
2438
|
+
};
|
|
2127
2439
|
readonly levels: readonly [{
|
|
2128
2440
|
readonly descriptor: string;
|
|
2129
2441
|
readonly level: string;
|
|
@@ -2133,6 +2445,10 @@ export declare const verifyPaperPlaces: (paper: {
|
|
|
2133
2445
|
}[]];
|
|
2134
2446
|
}, ...{
|
|
2135
2447
|
readonly criterion: string;
|
|
2448
|
+
readonly feedback?: {
|
|
2449
|
+
readonly earned: string;
|
|
2450
|
+
readonly missed: string;
|
|
2451
|
+
};
|
|
2136
2452
|
readonly levels: readonly [{
|
|
2137
2453
|
readonly descriptor: string;
|
|
2138
2454
|
readonly level: string;
|
|
@@ -6,7 +6,7 @@ import { Schema } from "effect";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const SectionTemplateSchema: Schema.Struct<{
|
|
8
8
|
readonly id: Schema.String;
|
|
9
|
-
readonly interactions: Schema.NonEmptyArray<Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">)[]]>>;
|
|
9
|
+
readonly interactions: Schema.NonEmptyArray<Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">)[]]>>;
|
|
10
10
|
readonly items: Schema.Int;
|
|
11
11
|
readonly names: Schema.$Record<Schema.Literals<readonly ["en", "id", "de", "ms"]>, Schema.Trimmed>;
|
|
12
12
|
readonly navigation: Schema.Literals<readonly ["free", "linear"]>;
|
|
@@ -81,7 +81,7 @@ export declare const ExamProfileSchema: Schema.Struct<{
|
|
|
81
81
|
readonly seconds: Schema.Int;
|
|
82
82
|
}>>;
|
|
83
83
|
readonly defaults: Schema.$Array<Schema.Struct<{
|
|
84
|
-
readonly interaction: Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">)[]]>;
|
|
84
|
+
readonly interaction: Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">)[]]>;
|
|
85
85
|
readonly rule: Schema.Union<readonly [Schema.Struct<{
|
|
86
86
|
readonly kind: Schema.Literal<"allOrNothing">;
|
|
87
87
|
}>, Schema.Struct<{
|
|
@@ -139,7 +139,7 @@ export declare const ExamProfileSchema: Schema.Struct<{
|
|
|
139
139
|
}>]>;
|
|
140
140
|
readonly sections: Schema.NonEmptyArray<Schema.Struct<{
|
|
141
141
|
readonly id: Schema.String;
|
|
142
|
-
readonly interactions: Schema.NonEmptyArray<Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"textEntry">)[]]>>;
|
|
142
|
+
readonly interactions: Schema.NonEmptyArray<Schema.Union<[Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">, ...(Schema.Literal<"choice"> | Schema.Literal<"extendedText"> | Schema.Literal<"gapMatch"> | Schema.Literal<"graphPoint"> | Schema.Literal<"hotspot"> | Schema.Literal<"inlineChoice"> | Schema.Literal<"match"> | Schema.Literal<"mathEntry"> | Schema.Literal<"matrix"> | Schema.Literal<"numericEntry"> | Schema.Literal<"order"> | Schema.Literal<"sketch"> | Schema.Literal<"textEntry">)[]]>>;
|
|
143
143
|
readonly items: Schema.Int;
|
|
144
144
|
readonly names: Schema.$Record<Schema.Literals<readonly ["en", "id", "de", "ms"]>, Schema.Trimmed>;
|
|
145
145
|
readonly navigation: Schema.Literals<readonly ["free", "linear"]>;
|
|
@@ -2,7 +2,7 @@ import { Array as Arr, HashSet, Schema } from "effect";
|
|
|
2
2
|
import { ExamProfileIdSchema, hasDistinctIds, KebabKeySchema, } from "#contracts/assessment/identity";
|
|
3
3
|
import { InteractionKindSchema } from "#contracts/assessment/interaction";
|
|
4
4
|
import { LocalizedTextSchema, PositiveIntSchema, } from "#contracts/assessment/scalar";
|
|
5
|
-
import { DefaultRuleSchema, ScoreScaleSchema, ScoringStrategySchema, supportsRule, } from "#contracts/assessment/scoring";
|
|
5
|
+
import { DefaultRuleSchema, ScoreScaleSchema, ScoringStrategySchema, supportsRule, takesRubric, } from "#contracts/assessment/scoring";
|
|
6
6
|
import { ToolSetSchema } from "#contracts/assessment/tools";
|
|
7
7
|
/**
|
|
8
8
|
* One section of an exam: its name in every language, how many items it has,
|
|
@@ -119,11 +119,11 @@ function hasBreaksBetweenSections(profile) {
|
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
121
|
* Checks that every kind a section allows has one default rule, except an
|
|
122
|
-
* extended text, which
|
|
123
|
-
* one.
|
|
122
|
+
* extended text and a sketch, which carry a rubric of their own, and that no
|
|
123
|
+
* other kind has one.
|
|
124
124
|
*/
|
|
125
125
|
function hasDefaultRules(profile) {
|
|
126
|
-
const allowed = HashSet.fromIterable(Arr.filter(Arr.flatMap(profile.sections, ({ interactions }) => interactions), (kind) => kind
|
|
126
|
+
const allowed = HashSet.fromIterable(Arr.filter(Arr.flatMap(profile.sections, ({ interactions }) => interactions), (kind) => !takesRubric(kind)));
|
|
127
127
|
const defaulted = Arr.map(profile.defaults, ({ interaction }) => interaction);
|
|
128
128
|
return (hasDistinctIds(defaulted) &&
|
|
129
129
|
HashSet.size(allowed) === defaulted.length &&
|