@speakableio/core 1.0.40 → 1.0.42
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.js +3 -14
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +3 -14
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.js +3 -14
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.js
CHANGED
|
@@ -1328,7 +1328,6 @@ async function clearScoreV2(params) {
|
|
|
1328
1328
|
// src/domains/assignment/services/submit-assignment-score.service.ts
|
|
1329
1329
|
var import_dayjs4 = __toESM(require("dayjs"));
|
|
1330
1330
|
async function _submitAssignmentScore({
|
|
1331
|
-
cardIds,
|
|
1332
1331
|
assignment,
|
|
1333
1332
|
weights,
|
|
1334
1333
|
userId,
|
|
@@ -1344,14 +1343,7 @@ async function _submitAssignmentScore({
|
|
|
1344
1343
|
status
|
|
1345
1344
|
};
|
|
1346
1345
|
if (assignment.isAssessment) {
|
|
1347
|
-
const result = await handleAssessment(
|
|
1348
|
-
assignment,
|
|
1349
|
-
userId,
|
|
1350
|
-
cardIds,
|
|
1351
|
-
weights,
|
|
1352
|
-
fieldsUpdated,
|
|
1353
|
-
studentName
|
|
1354
|
-
);
|
|
1346
|
+
const result = await handleAssessment(assignment, userId, weights, fieldsUpdated, studentName);
|
|
1355
1347
|
return result;
|
|
1356
1348
|
} else if (assignment.courseId) {
|
|
1357
1349
|
await handleCourseAssignment(assignment, userId);
|
|
@@ -1363,15 +1355,14 @@ var submitAssignmentScore = withErrorHandler(
|
|
|
1363
1355
|
_submitAssignmentScore,
|
|
1364
1356
|
"submitAssignmentScore"
|
|
1365
1357
|
);
|
|
1366
|
-
async function handleAssessment(assignment, userId,
|
|
1358
|
+
async function handleAssessment(assignment, userId, weights, fieldsUpdated, studentName) {
|
|
1367
1359
|
var _a, _b, _c;
|
|
1368
1360
|
const path = refsAssignmentFiresotre.assignmentScores({ id: assignment.id, userId });
|
|
1369
1361
|
const response = await api.getDoc(path);
|
|
1370
1362
|
if (!response.data) {
|
|
1371
1363
|
throw new Error("Score not found");
|
|
1372
1364
|
}
|
|
1373
|
-
|
|
1374
|
-
await api.updateDoc(path, { score: scoreCalculated, status: "PENDING_REVIEW" });
|
|
1365
|
+
await api.updateDoc(path, { status: "PENDING_REVIEW" });
|
|
1375
1366
|
await ((_c = (_b = (_a = api).httpsCallable) == null ? void 0 : _b.call(_a, "submitAssessment")) == null ? void 0 : _c({
|
|
1376
1367
|
assignmentId: assignment.id,
|
|
1377
1368
|
assignmentTitle: assignment.name,
|
|
@@ -1630,7 +1621,6 @@ function useSubmitAssignmentScore({
|
|
|
1630
1621
|
mutationFn: async ({
|
|
1631
1622
|
assignment,
|
|
1632
1623
|
userId,
|
|
1633
|
-
cardIds,
|
|
1634
1624
|
weights,
|
|
1635
1625
|
scores,
|
|
1636
1626
|
status
|
|
@@ -1639,7 +1629,6 @@ function useSubmitAssignmentScore({
|
|
|
1639
1629
|
const scoreUpdated = await submitAssignmentScore({
|
|
1640
1630
|
assignment,
|
|
1641
1631
|
userId,
|
|
1642
|
-
cardIds,
|
|
1643
1632
|
weights,
|
|
1644
1633
|
status,
|
|
1645
1634
|
studentName
|