if (cmi_interaction_id===null) 
if (cmi_interaction_id===null ) 
function load(){	// optionally add parameters for loading level 1 or level 2 data only		var cmi = this.config.cmi_data || sendJSONRequest(this.config.cmi_url);		if (!cmi) return alert('FATAL: Could not load userdata!');		var k, i, ni, row, act, j, nj, dat, id;	var cmi_node_id, cmi_interaction_id;		if (!remoteMapping) 	{		remoteMapping = cmi.schema;		for (k in remoteMapping) 		{			for (i=remoteMapping[k].length; i--; )			{				remoteMapping[k][remoteMapping[k][i]] = i;			}		}		while ((row = cmi.data['package'].pop()))		{			for (i=remoteMapping['package'].length; i--; )			{				globalAct[remoteMapping['package'][i]] = row[i];			}			globalAct.learner_id = globalAct.user_id;		}	}		for (i=cmi.data.node.length; i--; )	{		row = cmi.data.node[i];		act = activitiesByCAM[row[remoteMapping.node.cp_node_id]];		for (j=remoteMapping.node.length; j--; ) 		{			if (row[j]===null) {continue;}			//act[remoteMapping.node[j]] = row[j];			setItemValue(j, act, row, remoteMapping.node[j]);		}		activitiesByCMI[act.cmi_node_id] = act;	}	for (i=cmi.data.comment.length; i--; )	{		row = cmi.data.comment[i];		dat = new Comment();		for (j=remoteMapping.comment.length; j--; ) 		{			//dat[remoteMapping.comment[j]] = row[j];			setItemValue(j, dat, row, remoteMapping.comment[j]);		}		act = activitiesByCMI[row[remoteMapping.comment.cmi_node_id]];		act.comments[dat.cmi_comment_id] = dat;	}	var interactions = {};	for (i=cmi.data.interaction.length; i--; )	{		row = cmi.data.interaction[i];		dat = new Interaction();		for (j=remoteMapping.interaction.length; j--; ) 		{			//dat[remoteMapping.interaction[j]] = row[j];			setItemValue(j, dat, row, remoteMapping.interaction[j]);		}		act = activitiesByCMI[row[remoteMapping.comment.cmi_node_id]];		act.interactions[dat.id] = dat;		interactions[dat.cmi_interaction_id] = dat;	}	for (i=cmi.data.correct_response.length; i--; )	{		row = cmi.data.correct_response[i];		dat = new CorrectResponse();		for (j=remoteMapping.correct_response.length; j--; ) 		{			//dat[remoteMapping.correct_response[j]] = row[j];			setItemValue(j, dat, row, remoteMapping.correct_response[j]);		}		act = interactions[row[remoteMapping.correct_response.cmi_interaction_id]];		act.correct_response[dat.cmi_correct_response_id] = dat;	}	for (i=cmi.data.objective.length; i--; )	{		row = cmi.data.objective[i];		id = row[remoteMapping.objective.id];		cmi_interaction_id = row[remoteMapping.objective.cmi_interaction_id];		cmi_node_id = row[remoteMapping.objective.cmi_node_id];		if (cmi_interaction_id===null) // objective to an activity or shared		{			act = activitiesByCMI[cmi_node_id];			if (act && act.objectives[id]) // local objective specified in manifest			{				dat = act.objectives[id];			}			else if (act) // local objective of private use in sco			{				dat = new Objective();				 act.objectives[id] = dat;			}			else if (sharedObjectives[id]) // shared objective			{				dat = sharedObjectives[id];			}			// copy data into internal structure			for (j=remoteMapping.objective.length; j--; ) 			{				dat[remoteMapping.objective[j]] = row[j];			}		}		else // objective id to an interaction		{			interactions[cmi_interaction_id].objectives[id] = {id:id};		}		dat = new Objective();		for (j=remoteMapping.objective.length; j--; ) 		{			//dat[remoteMapping.objective[j]] = row[j];			setItemValue(j, dat, row, remoteMapping.objective[j]);		}		act = activitiesByCMI[row[remoteMapping.objective.cmi_node_id]];		act.objectives[dat.id] = dat;	}}
6251	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6251/ebdb8ea432053e3eed7a5ec32e46f06704042fc4/main.js/clean/Modules/Scorm2004/scripts/main.js