if( !setPrimaryObjScore ) 
if( setPrimaryObjScore==false ) 
function syncCMIADLTree(){	//get global status		var mPRIMARY_OBJ_ID = null;	var masteryStatus = null;	var sessionTime = null;	var entry = null;	var normalScore=-1.0;	var completionStatus=null;	var SCOEntry=null; 		// Get the current completion_status		SCOEntry = currentAPI.GetValueIntern("cmi.exit");		    completionStatus = currentAPI.GetValueIntern("cmi.completion_status");		if (completionStatus == "not attempted") {		completionStatus = "incomplete";	}		// Get the current success_status    masteryStatus = currentAPI.GetValueIntern("cmi.success_status");	//alert(masteryStatus);    // Get the current entry	SCOEntry = currentAPI.GetValueIntern("cmi.entry");		// Get the current scaled score    score = currentAPI.GetValueIntern("cmi.score.scaled");    // Get the current session time    sessionTime = currentAPI.GetValueIntern("cmi.session_time");	//get current activity	var act = msequencer.mSeqTree.getActivity(mlaunch.mActivityID);		var primaryObjID = null;    var foundPrimaryObj = false;    var setPrimaryObjSuccess = false;    var setPrimaryObjScore = false;		objs = act.getObjectives();	if( objs != null ) {		for(var j = 0; j < objs.length; j++ ) {			obj = objs[j];			if( obj.mContributesToRollup ) {				if( obj.mObjID != null ){                      primaryObjID = obj.mObjID;         		}                break;			}		}	}		//get Objective List	var numObjs= currentAPI.GetValueIntern("cmi.objectives._count");    for( var i = 0; i < numObjs; i++ ) {		var obj = "cmi.objectives." + i + ".id";        var objID= currentAPI.GetValueIntern(obj);		if( primaryObjID != null && objID==primaryObjID )	    {	        foundPrimaryObj = true;		    } else {		    foundPrimaryObj = false;	    		}		obj = "cmi.objectives." + i + ".success_status";        objMS= currentAPI.GetValueIntern(obj);		if( objMS=="passed" ) {            msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, objID, "satisfied");            if( foundPrimaryObj )            {               setPrimaryObjSuccess = true;            }        }		else if( objMS=="failed" )        {             msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, objID, "notSatisfied");             if( foundPrimaryObj )             {                setPrimaryObjSuccess = true;             }        }		else        {           	msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, objID, "unknown");        }		obj = "cmi.objectives." + i + ".score.scaled";        objScore= currentAPI.GetValueIntern(obj);        if( objScore!="" && objScore!="unknown" ) {			normalScore = objScore; 			msequencer.setAttemptObjMeasure(mlaunch.mActivityID, objID, normalScore);			if( foundPrimaryObj ){ 				setPrimaryObjScore = true;			}					}     		else         {            msequencer.clearAttemptObjMeasure(mlaunch.mActivityID, objID);         }      	}		// Report the completion status    msequencer.setAttemptProgressStatus(mlaunch.mActivityID, completionStatus);    	if (SCOEntry=="resume" ) {         msequencer.reportSuspension(mlaunch.mActivityID, true);    } else {         msequencer.reportSuspension(mlaunch.mActivityID, false);    }			// Report the success status      if( masteryStatus=="passed" )      {		//alert("SET");		//alert("Set passed"+" "+mPRIMARY_OBJ_ID);		         msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, mPRIMARY_OBJ_ID, "satisfied");      }      else if( masteryStatus=="failed" )      {         msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, mPRIMARY_OBJ_ID, "notSatisfied");      }      else      {         if( !setPrimaryObjSuccess )         {            msequencer.setAttemptObjSatisfied(mlaunch.mActivityID, mPRIMARY_OBJ_ID, "unknown");         }      }	  // Report the measure	  if( score!="" && score!="unknown" ) {			normalScore = score;			//alert("Set score"+score+" "+mPRIMARY_OBJ_ID);        	msequencer.setAttemptObjMeasure(mlaunch.mActivityID, mPRIMARY_OBJ_ID, normalScore);       }	   else{            if( !setPrimaryObjScore )            {               msequencer.clearAttemptObjMeasure(mlaunch.mActivityID, mPRIMARY_OBJ_ID);            }       }	        }
6251	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6251/c77e9bee8507b0af7032871e743544ad896c1635/main.js/clean/Modules/Scorm2004/scripts/main.js