@doenet/assignment-viewer 0.1.0-alpha3 → 0.1.0-alpha4
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.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3130,7 +3130,7 @@ function isExportedActivityState(obj) {
|
|
|
3130
3130
|
const typedObj = obj;
|
|
3131
3131
|
return (
|
|
3132
3132
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
3133
|
-
typedObj !== null && typeof typedObj === "object" && isActivityStateNoSource(typedObj.state) && typeof typedObj.sourceHash === "string"
|
|
3133
|
+
typedObj !== null && typeof typedObj === "object" && isActivityStateNoSource(typedObj.state) && typeof typedObj.sourceHash === "string" && (typedObj.onSubmission === void 0 || typeof typedObj.onSubmission === "boolean")
|
|
3134
3134
|
);
|
|
3135
3135
|
}
|
|
3136
3136
|
function initializeActivityState({
|
|
@@ -53670,13 +53670,19 @@ function activityStateReducer(state, action) {
|
|
|
53670
53670
|
if (action.allowSaveState) {
|
|
53671
53671
|
const scoreByItem = extractActivityItemCredit(newActivityState);
|
|
53672
53672
|
const sourceHash = hash(newActivityState.source);
|
|
53673
|
+
let onSubmission = false;
|
|
53674
|
+
const doenetState = action.doenetState;
|
|
53675
|
+
if (typeof doenetState === "object" && doenetState !== null && "onSubmission" in doenetState && typeof doenetState.onSubmission === "boolean") {
|
|
53676
|
+
onSubmission = doenetState.onSubmission;
|
|
53677
|
+
}
|
|
53673
53678
|
window.postMessage({
|
|
53674
53679
|
state: {
|
|
53675
53680
|
state: pruneActivityStateForSave(
|
|
53676
53681
|
newActivityState,
|
|
53677
53682
|
false
|
|
53678
53683
|
),
|
|
53679
|
-
sourceHash
|
|
53684
|
+
sourceHash,
|
|
53685
|
+
onSubmission
|
|
53680
53686
|
},
|
|
53681
53687
|
score: newActivityState.creditAchieved,
|
|
53682
53688
|
scoreByItem,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@doenet/assignment-viewer",
|
|
3
3
|
"private": false,
|
|
4
4
|
"description": "View assignments from questions written in DoenetML",
|
|
5
|
-
"version": "0.1.0-
|
|
5
|
+
"version": "0.1.0-alpha4",
|
|
6
6
|
"license": "AGPL-3.0-or-later",
|
|
7
7
|
"homepage": "https://github.com/Doenet/assignment-viewer#readme",
|
|
8
8
|
"type": "module",
|