Skip to content

web/template-scorm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
js
 
 
 
 
 
 
 
 
 
 

SCORM Template

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.

Getting Started

The code in this repository is a fully functional SCORM 1.2 SCO and you should be able to test it as is:

  1. Download the SCORM Player and use it to open the imsmanifest.xml file.
  2. 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.

Interacting with the Template

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.

  1. Participant scores can be simulated by entering values into the textbox.
  2. Clicking Update score should push this value back to the SCORM API if the number is between 1-100, otherwise the value is ignored.
  3. Clicking the End game button calculates the pass/fail and sets the SCO status accordingly.

Functionality

The current functionality has been implemented.

  1. When the SCO launches, it pulls student details (if available) from the API:
    1. The student full name is pulled from cmi.core.student_name and displayed on the page.
    2. The student username/id is pulled from cmi.core.student_id and is logged in the JavaScript console.
  2. Lesson status cmi.core.lesson_status is fully implemented:
    1. When the SCO is opened by the participant the status changes from not attempted to incomplete.
    2. The manifest assigns a value of 40 to the cmi.student_data.mastery_score variable. At the end of the SCO the participant score is used to change the status to either passed or failed.
    3. If the mastery score is removed from the manifest, the status is changed to completed at the end of the SCO.
  3. 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:
    1. If this is provided, it is used to calculate the final grade and pass/fail.
    2. If this is not provided, a value of 100 is used to calculate the pecentage.
  4. Participant scores can be saved back to the API as cmi.core.score.raw:
    1. If the score is in the range 1-100 this is saved back to the SCORM API.
    2. If the score is out of this range or non-numerical or blank the score is ignored.
  5. The time spent in the activity is sent back to the API as cmi.core.session_time.

Files

There are the following files:

  1. index.html – a simple web page that can be adapted for different purposes.
  2. css/style.css – a linked external stylesheet.
  3. 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.
  4. 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.

Moodle SCORM Settings

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.

About

Template that can be used to generate SCORM learning resources.

Resources

Stars

Watchers

Forks

Releases

No releases published