Repository navigation
feat(embed): SCORM 1.2 ids a person reads, and responses only where 1.2 takes them - #158
Merged
Merged
Conversation
….2 takes them An interaction's id is now the question's number and first words, in letters, digits and _ alone (Q3_which_rivers_cross_germany), or the number alone, so no id carries a colon or a slash a strict LMS refuses. A choice, true-false, matching or sequencing answer carries its result without H5P's notation, which is SCORM 2004's; fill-in and numeric answers keep their response and the right one. SCORM 2004 is unchanged. Closes #157
…is made H5P writes a question's words with and ’ in them, which the id spelled out (Q1_don_rsquo_t). The words are read as text once, for the 1.2 id and the 2004 description alike. A dotless i folds to i. Part of #157
H5P writes a fill-in's answer and the right one in 2004's notation, which a 1.2 report shows
as written: `{case_matters=false}stored[,]Range`. In 1.2 the right answer now loses its
`{case_matters=…}` and `{lang=…}` modifiers, and the blanks in both answers are listed with
commas, so a report reads `stored, Range`. A numeric answer is written only when it is a
number, 1.2's CMIDecimal, so 2004's range `1[:]5` is left out. SCORM 2004 keeps the
notation, which is its own.
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
…hout one When a question is answered again, its interaction is written over in place, and SCORM 1.2 keeps any field nothing writes again. So a fill-in typed before and left empty now kept the old response, and in an attempt begun under an earlier zip, a choice kept the response and right answer that zip wrote in H5P's notation, beside the new result. In 1.2 an answer that is written over now empties the response and right answer it has none of. A question answered for the first time writes neither, as before. The README now says an attempt begun under an earlier zip keeps its ids, and that answers are plain text up to 255 characters, a numeric one only where it is a number. The design note says an id's words are cut at the 40th character when the first word runs longer.
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.
Summary
A SCORM 1.2 zip now names each answer so a person can read the id in a report, and sends an answer's response only where 1.2 accepts H5P's form of it. Both follow the Reddit commenter's advice described in the issue. Closes #157.
Changes
a-z,0-9and_: accents are dropped, and letters such as ß, æ, ø and ł are spelled in ASCII. Where the words have no Latin letters, the id is the number alone. Examples:Q3_which_rivers_cross_germany,Q2.-2suffix is gone. and’decoded. Before this, the id spelled them out, as inQ1_don_rsquo_t. The 2004 description already read them, and it now shares the same code.student_responseandcorrect_responses.0.patternare now written only forfill-in(Essay included) andnumeric. Choice, true-false, matching, sequencing, likert, performance and untyped answers carry their type, result, weighting, latency and time.{case_matters=false}stored[,]Range. The{case_matters=…}and{lang=…}at the start of the right answer are dropped, and the[,]between blanks becomes,in both answers. So Moodle showsstored, Range. Every fill-in type in the pack writes them this way: Blanks, Advanced Blanks, Drag Text, Crossword, Dictation, Flashcards and Goals Page.0[,]2that zip wrote, beside the new result. A question answered for the first time writes neither, as before.CMIDecimal. Anything else, such as 2004's range1[:]5, is left out. No library in the pack sendsnumeric, so this only matters for a package that carries its own.description, and H5P's notation is 2004's own.compressToBase64.design/scorm.mddescribe the new behaviour.Verification
pnpm --filter @missing-elements/h5p-embed typecheckpasses, andpnpm --filter @missing-elements/h5p-embed testpasses 83 of 83, after the self-review fix as well: the 81 before, with their expectations updated, plus two new tests. With the answers written as plain text, 83 of 83 again: the real-quiz and responses-by-type tests extended, and the 2004 quiz test checking that the notation is kept.Q1_wie_heisst_die_strasse_uber_den_fluss, a Russian one givesQ2, a long hyphenated word is cut where its words end,<p>Don’t stop & go</p>givesQ4_don_t_stop_go, andKızılırmak nehrigivesQ5_kizilirmak_nehri.{case_matters=false}{lang=en}North Sea[,]Balticis written asNorth Sea, Baltic.0[,]1and0[,]2already in the LMS, empties both. With the emptying switched off, both tests fail.Q1;Q4_…andQ5_…;Q1_…ids, its fill-in answer asstored, Range, deflated, frontagainststored, Range, compressed, front, and its choice and true-false answers without a response;Not checked in a real LMS, since LMS testing is paused. Moodle stores ids as plain strings, so its interactions report should show the new ids, with an empty Response column for choice questions.
Release: a minor for embed. Under
docs/compatibility.md, both changes are conformance fixes: what the zip writes now matches SCORM 1.2, though Moodle accepted the old form. So the release notes list them first. A Moodle report keeps the result of a choice, true/false, matching or sequencing answer but no longer shows what was chosen; there's nothing for a site to do. The ids that reports show change for new answers, and an attempt under way keeps its old ids.