@speakableio/core 0.1.94 → 0.1.96
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/index.native.d.mts +19 -1
- package/dist/index.native.d.ts +19 -1
- package/dist/index.native.js +17 -9
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +17 -9
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +19 -1
- package/dist/index.web.js +17 -9
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.web.d.mts
CHANGED
|
@@ -149,6 +149,8 @@ interface PageActivity {
|
|
|
149
149
|
allowTTS?: boolean;
|
|
150
150
|
feedback_language?: string | null;
|
|
151
151
|
correct_answer?: string | null;
|
|
152
|
+
limit_attempts?: boolean;
|
|
153
|
+
max_attempts?: number;
|
|
152
154
|
}
|
|
153
155
|
declare enum ActivityPageType {
|
|
154
156
|
READ_REPEAT = "READ_REPEAT",
|
|
@@ -267,6 +269,8 @@ declare function useCreateCards(): {
|
|
|
267
269
|
allowTTS?: boolean;
|
|
268
270
|
feedback_language?: string | null;
|
|
269
271
|
correct_answer?: string | null;
|
|
272
|
+
limit_attempts?: boolean;
|
|
273
|
+
max_attempts?: number;
|
|
270
274
|
}[], Error, {
|
|
271
275
|
cards: PageActivity[];
|
|
272
276
|
}, unknown>;
|
|
@@ -356,6 +360,8 @@ declare const createCardRepo: () => {
|
|
|
356
360
|
allowTTS?: boolean;
|
|
357
361
|
feedback_language?: string | null;
|
|
358
362
|
correct_answer?: string | null;
|
|
363
|
+
limit_attempts?: boolean;
|
|
364
|
+
max_attempts?: number;
|
|
359
365
|
}[]>;
|
|
360
366
|
getCard: (params: {
|
|
361
367
|
cardId: string;
|
|
@@ -797,7 +803,15 @@ declare function useSubmitAssignmentScore({ onAssignmentSubmitted, studentName,
|
|
|
797
803
|
error: unknown;
|
|
798
804
|
message?: undefined;
|
|
799
805
|
}, Error, {
|
|
800
|
-
assignment:
|
|
806
|
+
assignment: {
|
|
807
|
+
id: string;
|
|
808
|
+
name: string;
|
|
809
|
+
owners: string[];
|
|
810
|
+
courseId: string;
|
|
811
|
+
courseWorkId: string;
|
|
812
|
+
isAssessment: boolean;
|
|
813
|
+
maxPoints: number;
|
|
814
|
+
};
|
|
801
815
|
userId: string;
|
|
802
816
|
cardIds: string[];
|
|
803
817
|
weights: Record<string, number>;
|
|
@@ -1119,6 +1133,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1119
1133
|
allowTTS?: boolean;
|
|
1120
1134
|
feedback_language?: string | null;
|
|
1121
1135
|
correct_answer?: string | null;
|
|
1136
|
+
limit_attempts?: boolean;
|
|
1137
|
+
max_attempts?: number;
|
|
1122
1138
|
}[]>;
|
|
1123
1139
|
getCard: (params: {
|
|
1124
1140
|
cardId: string;
|
|
@@ -2788,6 +2804,8 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
|
|
|
2788
2804
|
allowTTS?: boolean;
|
|
2789
2805
|
feedback_language?: string | null;
|
|
2790
2806
|
correct_answer?: string | null;
|
|
2807
|
+
limit_attempts?: boolean;
|
|
2808
|
+
max_attempts?: number;
|
|
2791
2809
|
}[]>;
|
|
2792
2810
|
getCard: (params: {
|
|
2793
2811
|
cardId: string;
|
package/dist/index.web.js
CHANGED
|
@@ -2426,7 +2426,7 @@ function useActivity({
|
|
|
2426
2426
|
});
|
|
2427
2427
|
};
|
|
2428
2428
|
const onSubmitScore = async () => {
|
|
2429
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
2429
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
2430
2430
|
try {
|
|
2431
2431
|
let results;
|
|
2432
2432
|
if (isAssignment) {
|
|
@@ -2435,25 +2435,33 @@ function useActivity({
|
|
|
2435
2435
|
(cardScore) => cardScore.status === "pending_review"
|
|
2436
2436
|
);
|
|
2437
2437
|
results = await submitAssignmentScore2({
|
|
2438
|
-
assignment:
|
|
2438
|
+
assignment: {
|
|
2439
|
+
id: (_c = (_b2 = assignmentQuery.data) == null ? void 0 : _b2.id) != null ? _c : "",
|
|
2440
|
+
name: (_e = (_d = assignmentQuery.data) == null ? void 0 : _d.name) != null ? _e : "",
|
|
2441
|
+
owners: (_g = (_f = assignmentQuery.data) == null ? void 0 : _f.owners) != null ? _g : [],
|
|
2442
|
+
courseId: (_i = (_h = assignmentQuery.data) == null ? void 0 : _h.courseId) != null ? _i : "",
|
|
2443
|
+
courseWorkId: (_k = (_j = assignmentQuery.data) == null ? void 0 : _j.courseWorkId) != null ? _k : "",
|
|
2444
|
+
isAssessment: (_m = (_l = assignmentQuery.data) == null ? void 0 : _l.isAssessment) != null ? _m : false,
|
|
2445
|
+
maxPoints: (_o = (_n = assignmentQuery.data) == null ? void 0 : _n.maxPoints) != null ? _o : 0
|
|
2446
|
+
},
|
|
2439
2447
|
userId,
|
|
2440
2448
|
cardIds: contentCardsToUse != null ? contentCardsToUse : [],
|
|
2441
2449
|
scores: scoreQuery.data,
|
|
2442
2450
|
weights: weightsToUse != null ? weightsToUse : {},
|
|
2443
2451
|
status: hasPendingReview ? "PENDING_REVIEW" : "FINALIZED"
|
|
2444
2452
|
});
|
|
2445
|
-
if ((
|
|
2453
|
+
if ((_p = assignmentQuery.data) == null ? void 0 : _p.ltiDeeplink) {
|
|
2446
2454
|
submitLTIScore({
|
|
2447
|
-
maxPoints: (
|
|
2448
|
-
score: (
|
|
2449
|
-
SERVICE_KEY: (
|
|
2450
|
-
lineItemId: (
|
|
2451
|
-
lti_id: (
|
|
2455
|
+
maxPoints: (_q = assignmentQuery.data) == null ? void 0 : _q.maxPoints,
|
|
2456
|
+
score: (_s = (_r = scoreQuery.data) == null ? void 0 : _r.score) != null ? _s : 0,
|
|
2457
|
+
SERVICE_KEY: (_t = ltiData == null ? void 0 : ltiData.serviceKey) != null ? _t : "",
|
|
2458
|
+
lineItemId: (_u = ltiData == null ? void 0 : ltiData.lineItemId) != null ? _u : "",
|
|
2459
|
+
lti_id: (_v = ltiData == null ? void 0 : ltiData.lti_id) != null ? _v : ""
|
|
2452
2460
|
});
|
|
2453
2461
|
}
|
|
2454
2462
|
} else {
|
|
2455
2463
|
results = await submitPracticeScore2({
|
|
2456
|
-
setId: (
|
|
2464
|
+
setId: (_x = (_w = querySet.data) == null ? void 0 : _w.id) != null ? _x : "",
|
|
2457
2465
|
userId,
|
|
2458
2466
|
scores: scoreQuery.data
|
|
2459
2467
|
});
|