Explore the community Forums Lectora LMS Integration LMSSetValue Error Reply To: LMSSetValue Error

#428998 Score: 0
Profile photo of Justin Hansen
Justin Hansen
Member
beginner
intermediate
wise owl
@jhansen4963

Arrgh, for security reasons, the Java Script file was not allowed.  So, I have included the snip-it below:
function computeTime() {
var startDate = readVariable( ‘TrivantisSCORMTimer’, 0 )
if ( startDate != 0 ) {
var currentDate = new Date().getTime();
var elapsedMills = currentDate – startDate;
var formattedTime = convertTotalMills( elapsedMills );
}
else formattedTime = “00:00:00.0”;
MySetValue( “cmi.core.session_time”, formattedTime );
}

 

Thank you,