var session_time = new Duration(data.cmi.session_time || (currentTime() - msec)); var total_time = new Duration(data.cmi.total_time, true); if (normal) 
var session_time; if (data.cmi.session_time==undefined) { var interval=(currentTime() - msec)/1000; var dur= new ADLDuration({iFormat: FORMAT_SECONDS, iValue: interval}); session_time =dur.format(FORMAT_SCHEMA); } else { session_time=data.cmi.session_time; }  if (normal || suspended) 
Runtime.onTerminate = function (data, msec) /// or user walks away{	var credit = data.cmi.credit==="credit";	var normal = !data.cmi.mode || data.cmi.mode==="normal";	var suspended = data.cmi.exit==="suspend";	var not_attempted = data.cmi.completion_status==="not attempted";	var success = (/^(completed|passed|failed)$/).test(data.cmi.success_status, true);	var session_time = new Duration(data.cmi.session_time || (currentTime() - msec));	var total_time = new Duration(data.cmi.total_time, true);	if (normal) 	{		data.cmi.session_time = session_time.toString();		total_time.add(session_time);		data.cmi.total_time = total_time.toString();	}	if (not_attempted) 	{		data.cmi.success_status = 'incomplete';	}	//if suspended	if (suspended) {		data.cmi.session_time = session_time.toString();		total_time.add(session_time);		data.cmi.total_time = total_time.toString();		data.cmi.entry="resume";		//clear session time	    //data.cmi.session_time="";	} else {		data.cmi.entry="";	}};
6251	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6251/0d7a86c7c1687c52da69e4104153795b8bb0da09/rte.js/clean/Modules/Scorm2004/scripts/rte.js