Repository navigation
feat(skills): h5p-to-scorm, an H5P package as a SCORM zip for an LMS - #161
Merged
Merged
Conversation
A fifth agent skill: what to ask first, a check that plays the package as the zip will, the command and its refusals, the setting each supported LMS needs, and what to tell the user. It is tested from apps/skills: its commands run as written, their zips are played as a learner under a stand-in LMS in SCORM 1.2 and 2004, and its LMS table is held to the embed README's. The README's skills section is now a table, like the packages one, and h5p-author's hand-over names the skill. Those tests found that --completion-score's example, a presentation without questions, never finishes: Course Presentation and Interactive Book send `completed` only from a summary page, which they show only when they contain tasks. The command's help, the embed README, both copies of the SCORM page and design/scorm.md now name a questionnaire or a branching scenario without scoring instead. Closes #159 Closes #160
…caping or encoding' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed
Reply to a comment to ask cubic a question or push back. It learns from your replies.
Click Fix with cubic on a comment, or reply @cubic-dev-ai fix this, and cubic writes the fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed
Tip: Get a Slack DM when cubic finishes reviewing your PRs. Connect Slack
View guided diff | Turn on auto-fix | Re-trigger cubic
… content keeps one The zip saves what the content's getCurrentState() returns, and a content type without it, such as an Accordion, Image Hotspots, Flashcards or a Timeline, starts over at every launch, as on any H5P site (docs/resume.md). The skill's opening and its "how to try it" said every launch continues where the learner was, a promise taken from the embed README, which said the same. Both now say which content keeps its place. The skill's test holds the content it names to the pack's libraries, so a library that gains or loses getCurrentState() in a pack refresh shows up in the weekly run.
…ntations never finish - The check's exit 1 is a package that does not play, to be fixed. Exit 2 is a check that could not run, for want of a browser or a file, and the package is never changed for it. - `No such file` from the zip's command is a wrong path or folder, checked before the user is asked for the file again. - "A presentation or a book without questions" read as if any presentation stayed incomplete, though one with questions finishes from its summary slide. The skill, the embed README and design/scorm.md now say "a presentation or book with no questions in it".
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 #159
Closes #160
The skill
skills/h5p-to-scorm/SKILL.mdtakes an agent from an.h5pto a SCORM zip in the user's LMS:--libraries pack --no-refresh-libraries --no-downgrade-libraries.It only names options that are on npm now (embed 1.6.2, verify 1.4.1), since a skill installs from
main.Also in this PR:
Found by the tests:
--completion-score's example never finishes (#160)The help, the embed README and the SCORM page all said the option was for content like "a presentation without questions". But such a presentation never finishes. Played to its last slide, it sends only
progressed, so the activity staysincompletewhether or not the option is set. Course Presentation 1.27 and Interactive Book 1.15 sendcompletedonly from their summary page, and they only show that page when they contain tasks.The content that really finishes without a score is a questionnaire, or a branching scenario with no scoring. The zip records both as 100.
So the bridge was right and the example was wrong. It's corrected in the command's help, the embed README, both copies of the SCORM page (
packages/embed/site/and the demo's) anddesign/scorm.md.Tests
apps/skills/tests/to-scorm.test.tshas three tests and runs in about 21 s. They take the skill's commands exactly as it writes them, run them on packages built by h5p-author, then play each zip as a learner. The zip is served as an LMS serves it, and the launch page runs under a stand-in LMS page that keeps the values between launches.incompleteandsuspend, plus base64 saved state under 4,096 characters.failedat 66.67, one interaction per question, and the session ends with nothing left to resume.incompletewith no score.Mutation check: I made the bridge ignore the pass mark, then made it write the state as UTF-16 instead of base64. Test 1 failed both times.
Runs:
apps/skillssuite passes: 76 tests in 61 s.apps/skillsand embed typechecks pass.Not verified
Release
The skill reaches users from
mainonce this merges. The corrected help text and SCORM page reach npm with the next embed release; with #158 that's 1.7.0, and this goes under fixes.Summary by cubic
Adds
h5p-to-scorm, a fifth agent skill that turns an.h5pinto a SCORM zip for an LMS, and fixes--completion-score's example: tests showed a presentation without questions never finishes, so it now names a questionnaire or a branching scenario without scoring.New Features
${'No such file'}from the zip's command is a wrong path or folder, checked before asking for the file.apps/skills/tests/to-scorm.test.tsruns the skill's commands as written and plays the zips under a stand-in LMS: a two-session quiz in SCORM 1.2 that the skill's pass mark decides, and in 2004 a questionnaire and a branching scenario counted as 100 while a presentation without questions stays incomplete; a third test holds the content the skill names as resuming or restarting to the pack's libraries.Bug Fixes
design/scorm.md, and the wording now says "a presentation or book with no questions in it".getCurrentState()resume; an Accordion, Image Hotspots, Flashcards, or a Timeline starts over.Closes #159 and #160.
Written for commit bb65c98. Summary will update on new commits.