Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SCORM 2004 : cmi.progress_measure not set

New Here ,
Jan 06, 2016 Jan 06, 2016

Hi,

Do we know if there is a specific setup when publishing the Course to SCORM 2004 in order to activate the following scorm variable cmi.progress_measure?

If not how do we get access to the TOC variable info to send this with a call?

Thanks for your help!

824
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jan 06, 2016 Jan 06, 2016
LATEST

It would be pretty easy, especially if you are using HTML5 to set the variable.

Captivate keeps track of progress using both cmi.suspend_data for actual slides completed, and cmi.location for the actual slide you are viewing, it goes forward and backward. You can't reliably tap into either of these.

onEnter of every slide you could execute javascript to push the (cpInfoCurrentSlide - 1) into an array. Then divide the array.length/cpInfoSlideCount and then call: SCORM2004_CallSetValue("cmi.progress_measure", numMeasure);

The caveat is that you would either have to store the array in a string and then parse that everytime, or simply put a function in the html page and let it do the work.

This script would do the trick for an HTML5 course:

var interfaceObj, eventEmitterObj, progressArray = [];

window.addEventListener( "moduleReadyEvent", function( e )
{
interfaceObj = e.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
    initializeEventListeners();
});

function initializeEventListeners()
{
if ( interfaceObj )
{
     if ( eventEmitterObj )
  {
         eventEmitterObj.addEventListener( "CPAPI_SLIDEENTER", function( e )
   {
    if ( typeof progressArray[ window.cpInfoCurrentSlide - 1 ] === 'undefined' )
    {
     progressArray [ window.cpInfoCurrentSlide - 1 ] = 1;
         
     var tempProgress = SCORM2004_CallSetValue("cmi.progress_measure", progressArray.length / window.cpInfoSlideCount );
    } 
            });
  
  }
}
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources