This is a modern ECMA6 template that is designed to be used to develop SCORM 1.2 SCOs. The template is written in modern semantic HTML5 with external stylesheet and no inline JavaScript.
The code in this repository is a fully functional SCORM 1.2 SCO and you should be able to test it as is:
- Download the SCORM Player and use it to open the
imsmanifest.xml
file. - You can also import it into Moodle. Zip the contents of the repository (not the containing folder) and add it as a SCORM Package activity.
The JavaScript Console provides a lot of useful data to explain what the template is doing and is also used to display any errors or warnings. Make sure this is visible (developer tools) before interacting with the system.
- Participant scores can be simulated by entering values into the textbox.
- Clicking Update score should push this value back to the SCORM API if the number is between 1-100, otherwise the value is ignored.
- Clicking the End game button calculates the pass/fail and sets the SCO status accordingly.
The current functionality has been implemented.
- When the SCO launches, it pulls student details (if available) from the API:
- The student full name is pulled from
cmi.core.student_name
and displayed on the page. - The student username/id is pulled from
cmi.core.student_id
and is logged in the JavaScript console.
- The student full name is pulled from
- Lesson status
cmi.core.lesson_status
is fully implemented:- When the SCO is opened by the participant the status changes from
not attempted
toincomplete
. - The manifest assigns a value of
40
to thecmi.student_data.mastery_score
variable. At the end of the SCO the participant score is used to change the status to eitherpassed
orfailed
. - If the mastery score is removed from the manifest, the status is changed to
completed
at the end of the SCO.
- When the SCO is opened by the participant the status changes from
- If the API provides a maximum score (to determine the score range) this is loaded when the SCO starts. This feature does not appear to be supported by Moodle:
- If this is provided, it is used to calculate the final grade and pass/fail.
- If this is not provided, a value of 100 is used to calculate the pecentage.
- Participant scores can be saved back to the API as
cmi.core.score.raw
:- If the score is in the range 1-100 this is saved back to the SCORM API.
- If the score is out of this range or non-numerical or blank the score is ignored.
- The time spent in the activity is sent back to the API as
cmi.core.session_time
.
There are the following files:
index.html
– a simple web page that can be adapted for different purposes.css/style.css
– a linked external stylesheet.js/scormfunctions
– the functions needed to interact with the SCORM API, you shound not need to modify this file which was adapted from code found at scorm.com licenced as creative commons. It contains functions to control the steps needed to save scores and cleanly exit the SCO.js/eventlisteners.js
– contains event listeners that are used to control interaction with the web page. You will certainly need to modify the event listeners when you implement your own learning content.
If you are planning to test in Moodle you need to make the following changes to the activity settings.
- Appearance:
- Display package: set this to "New Window".
- Show more:
- Display course structure in player: set this to "hidden"
- Grades:
- Grading method: don't use "learning objects" option
- Maximum grade: only used at Moodle end, not passed to the ACO (its in the manifest file).
- Attempts management:
- Force new attempt: set to "when previous attempt completed pass or failed"
- Compatibility settings:
- Mastery score overides status: keep default of "yes" means Moodle reports failed attempts correctly.
- Activity completion:
- Completion tracking: change to "show activity is complete when conditions are met" and choose one of these options.