@speakableio/core 1.0.2 → 1.0.3
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 +1 -1
- package/dist/index.native.d.ts +1 -1
- package/dist/index.native.js +17 -20
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +17 -20
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +1 -1
- package/dist/index.web.js +17 -20
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -828,7 +828,7 @@ declare function useSubmitAssignmentScore({ onAssignmentSubmitted, studentName,
|
|
|
828
828
|
cardIds: string[];
|
|
829
829
|
weights: Record<string, number>;
|
|
830
830
|
scores: Score;
|
|
831
|
-
status: "
|
|
831
|
+
status: Score["status"];
|
|
832
832
|
}, unknown>;
|
|
833
833
|
isLoading: boolean;
|
|
834
834
|
};
|
package/dist/index.native.d.ts
CHANGED
|
@@ -828,7 +828,7 @@ declare function useSubmitAssignmentScore({ onAssignmentSubmitted, studentName,
|
|
|
828
828
|
cardIds: string[];
|
|
829
829
|
weights: Record<string, number>;
|
|
830
830
|
scores: Score;
|
|
831
|
-
status: "
|
|
831
|
+
status: Score["status"];
|
|
832
832
|
}, unknown>;
|
|
833
833
|
isLoading: boolean;
|
|
834
834
|
};
|
package/dist/index.native.js
CHANGED
|
@@ -2549,42 +2549,39 @@ function useActivity({
|
|
|
2549
2549
|
});
|
|
2550
2550
|
};
|
|
2551
2551
|
const onSubmitScore = async () => {
|
|
2552
|
-
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w
|
|
2552
|
+
var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
2553
2553
|
try {
|
|
2554
2554
|
let results;
|
|
2555
2555
|
if (isAssignment) {
|
|
2556
|
-
const
|
|
2557
|
-
const hasPendingReview = Object.values(cardScores).some(
|
|
2558
|
-
(cardScore) => cardScore.status === "pending_review"
|
|
2559
|
-
);
|
|
2556
|
+
const someCardIsManualGraded = cards.some((page) => page.grading_method === "manual");
|
|
2560
2557
|
results = await submitAssignmentScore2({
|
|
2561
2558
|
assignment: {
|
|
2562
|
-
id: (
|
|
2563
|
-
name: (
|
|
2564
|
-
owners: (
|
|
2565
|
-
courseId: (
|
|
2566
|
-
courseWorkId: (
|
|
2567
|
-
isAssessment: (
|
|
2568
|
-
maxPoints: (
|
|
2559
|
+
id: (_b2 = (_a2 = assignmentQuery.data) == null ? void 0 : _a2.id) != null ? _b2 : "",
|
|
2560
|
+
name: (_d = (_c = assignmentQuery.data) == null ? void 0 : _c.name) != null ? _d : "",
|
|
2561
|
+
owners: (_f = (_e = assignmentQuery.data) == null ? void 0 : _e.owners) != null ? _f : [],
|
|
2562
|
+
courseId: (_h = (_g = assignmentQuery.data) == null ? void 0 : _g.courseId) != null ? _h : "",
|
|
2563
|
+
courseWorkId: (_j = (_i = assignmentQuery.data) == null ? void 0 : _i.courseWorkId) != null ? _j : "",
|
|
2564
|
+
isAssessment: (_l = (_k = assignmentQuery.data) == null ? void 0 : _k.isAssessment) != null ? _l : false,
|
|
2565
|
+
maxPoints: (_n = (_m = assignmentQuery.data) == null ? void 0 : _m.maxPoints) != null ? _n : 0
|
|
2569
2566
|
},
|
|
2570
2567
|
userId,
|
|
2571
2568
|
cardIds: contentCardsToUse != null ? contentCardsToUse : [],
|
|
2572
2569
|
scores: scoreQuery.data,
|
|
2573
2570
|
weights: weightsToUse != null ? weightsToUse : {},
|
|
2574
|
-
status:
|
|
2571
|
+
status: someCardIsManualGraded ? "PENDING_REVIEW" : "SUBMITTED"
|
|
2575
2572
|
});
|
|
2576
|
-
if ((
|
|
2573
|
+
if ((_o = assignmentQuery.data) == null ? void 0 : _o.ltiDeeplink) {
|
|
2577
2574
|
submitLTIScore({
|
|
2578
|
-
maxPoints: (
|
|
2579
|
-
score: (
|
|
2580
|
-
SERVICE_KEY: (
|
|
2581
|
-
lineItemId: (
|
|
2582
|
-
lti_id: (
|
|
2575
|
+
maxPoints: (_p = assignmentQuery.data) == null ? void 0 : _p.maxPoints,
|
|
2576
|
+
score: (_r = (_q = scoreQuery.data) == null ? void 0 : _q.score) != null ? _r : 0,
|
|
2577
|
+
SERVICE_KEY: (_s = ltiData == null ? void 0 : ltiData.serviceKey) != null ? _s : "",
|
|
2578
|
+
lineItemId: (_t = ltiData == null ? void 0 : ltiData.lineItemId) != null ? _t : "",
|
|
2579
|
+
lti_id: (_u = ltiData == null ? void 0 : ltiData.lti_id) != null ? _u : ""
|
|
2583
2580
|
});
|
|
2584
2581
|
}
|
|
2585
2582
|
} else {
|
|
2586
2583
|
results = await submitPracticeScore2({
|
|
2587
|
-
setId: (
|
|
2584
|
+
setId: (_w = (_v = querySet.data) == null ? void 0 : _v.id) != null ? _w : "",
|
|
2588
2585
|
userId,
|
|
2589
2586
|
scores: scoreQuery.data
|
|
2590
2587
|
});
|