@doenet/doenetml-iframe 0.7.27-dev.814 → 0.7.27-dev.815

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.
Files changed (3) hide show
  1. package/README.md +27 -2
  2. package/index.js +1 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -561,12 +561,37 @@ content experienced, …). Fire-and-forget; no response is expected:
561
561
  object, // JSON string: the component acted on
562
562
  result, // JSON string: the outcome
563
563
  context, // JSON string: additional context
564
- timestamp, // "YYYY-MM-DD HH:MM:SS"
565
- version,
564
+ timestamp, // "YYYY-MM-DDTHH:MM:SS.sssZ", ISO 8601 UTC
565
+ version, // "0.2.0"
566
566
  },
567
567
  }
568
568
  ```
569
569
 
570
+ For a `"submitted"` event from an `<answer>`, a `<pretzel>`, or a
571
+ section-wide check work, `result` also counts attempts, so a host can count
572
+ and cap them without reading the document:
573
+
574
+ - `numSubmissions`: submissions so far, including this one.
575
+ - `maxNumAttempts`: the author's `maxNumAttempts`, or `null` when attempts
576
+ are unlimited.
577
+ - `numAttemptsLeft`: attempts left after this submission, or `null` when
578
+ unlimited.
579
+
580
+ Inside a section-wide check work, the section sets the limit. An `<answer>`,
581
+ a `<pretzel>`, or a container nested in the section then reports the
582
+ section's `numAttemptsLeft`, while its `maxNumAttempts` is still its own,
583
+ which does not apply there. Only the section's own check work uses one of
584
+ those attempts. Any other submission inside it (a pretzel's own button,
585
+ auto-submit, a direct action, or a submission of a nested container) reports
586
+ the section's count unchanged.
587
+
588
+ A submission made after the attempts are used up is ignored and sends no
589
+ event.
590
+
591
+ Version history: `0.2.0` changed `timestamp` to ISO 8601 UTC (it was
592
+ `"YYYY-MM-DD HH:MM:SS"`, UTC with no zone) and added the attempt counts
593
+ above.
594
+
570
595
  ## Development
571
596
 
572
597
  Source code in `src/iframe-viewer-index.ts` and `src/iframe-editor-index.ts`
package/index.js CHANGED
@@ -76353,7 +76353,7 @@ function ExternalVirtualKeyboard({
76353
76353
  }
76354
76354
  );
76355
76355
  }
76356
- const version = "0.7.27-dev.814";
76356
+ const version = "0.7.27-dev.815";
76357
76357
  const latestDoenetmlVersion = version;
76358
76358
  function versionLabel(doenetmlVersion) {
76359
76359
  return /^\d/.test(doenetmlVersion) ? `v${doenetmlVersion}` : doenetmlVersion;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@doenet/doenetml-iframe",
3
3
  "type": "module",
4
4
  "description": "A renderer for DoenetML contained in an iframe",
5
- "version": "0.7.27-dev.814",
5
+ "version": "0.7.27-dev.815",
6
6
  "license": "AGPL-3.0-or-later",
7
7
  "homepage": "https://github.com/Doenet/DoenetML#readme",
8
8
  "repository": {