cmi5
This page is a cmi5 assignable unit. An LMS opens it with the launch parameters in the
address, the page sends initialized, relays every statement the content emits
to the LMS’s LRS with the launch actor and registration, records
passed or failed by the mastery score and completed
when the content finishes, and terminated on Exit. The package stays on this
site; the LMS holds only a course structure that names this address.
Launching it
Try a simulated launch:
the same page, with a stand-in for the LMS in the page’s own script, so every
statement that would reach an LRS shows in the log below instead. Answer the quiz to see
failed or passed against a mastery score of 0.8, then
completed, and Exit for terminated.
Download the course structure, zipped as an
LMS wants it, and import it into an LMS that supports cmi5 — SCORM Cloud does, with a
free tier — then open the course. It is the structure below, naming this page and
the quiz. The LMS appends its five launch
parameters to the address. launchMethod="OwnWindow" makes it open the page
in a window of its own, top level, which is what lets the player run on every browser,
Safari and iOS included.
<?xml version="1.0" encoding="utf-8"?>
<courseStructure xmlns="https://w3id.org/xapi/profiles/cmi5/v1/CourseStructure.xsd">
<course id="https://your-site.example/courses/quiz">
<title><langstring lang="en-US">Quiz</langstring></title>
<description><langstring lang="en-US">A question set</langstring></description>
</course>
<au id="https://your-site.example/courses/quiz/au" moveOn="CompletedAndPassed" masteryScore="0.8"
launchMethod="OwnWindow">
<title><langstring lang="en-US">Quiz</langstring></title>
<description><langstring lang="en-US">A question set</langstring></description>
<url>https://h5p-offline-player.vercel.app/demo/cmi5.html?src=https://h5p-offline-player.vercel.app/demo/content/quiz.h5p</url>
</au>
</courseStructure>
For a page and package of your own, zip a structure like it as cmi5.xml
and upload the zip. The package URL must send CORS headers,
as for any setup; this site’s content does. Instead of ?src=, the
structure can carry the URL in <launchParameters>, which the page reads
from the LMS.