Repository navigation
fix(scorm): six points from the review of #139 and #140 - #143
Merged
Merged
Conversation
- The 2004 bridge writes an answer's pattern and response only after its type, which SCORM 2004 requires (408 otherwise). - buildScorm and buildScormInPage return passMark and completionScore as written; the command's summary names the mark kept to the hundredth. - The design note says the no-score checks ran in zips that also held a mark of 80. - planScormInPage takes a title, for the plan and its writes. - A plan hashes the package once, on its first write. - The page takes files chosen or dropped during a build; they wait for the next Build. Closes #142.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #142.
These are six small points from my review of #139 and #140, made after both merged. A zip written without options is unchanged, and the 1.2 bridge behaves as before.
What changes
The zip and the bridge (#140)
correct_responses.0.patternandlearner_responseonly after the interaction'stype. SCORM 2004 requires that order and answers error 408 otherwise.buildScormandbuildScormInPagenow returnpassMarkandcompletionScorebesidescormVersion.passMarkis kept to the hundredth, ornull. The command's summary names the mark the zip holds, so--pass-mark 66.666prints "pass mark 66.67".The planner and the page (#139)
planScormInPage({ title }): a title given to the plan is now the plan'stitleand its writes' default, asbuildScormInPagealready treated it.buildScormInPageis nowplanScormInPage(options)followed bywrite().writeand kept. Before, every write read the whole package into memory and hashed it again.Docs:
design/scorm.md: the points above, and the test lists.Testing
pnpm --filter @missing-elements/h5p-embed typecheckis clean.scorm.test.ts:passMarkandcompletionScore;--pass-mark 66.666prints 66.67 and writes 0.6667.scorm-browser.test.ts: a title given to the plan is itstitleand its writes' default, and two writes hash the package once.scorm-page.test.ts: a file dropped while the quiz builds gets a row at once, and afterwards waits as "1 more to build".Not verified
Release
This is part of embed 1.6.0, with #139 and #140. The two new result fields add API, which fits that minor release, since 1.6.0 has not shipped yet.