Index: lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonController.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonController.as,v diff -u -r1.2 -r1.3 --- lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonController.as 9 Jul 2007 03:39:55 -0000 1.2 +++ lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonController.as 29 Oct 2007 05:17:34 -0000 1.3 @@ -85,7 +85,7 @@ Debugger.log('activityDoubleClick CanvasActivity:'+ca.activity.activityID + ' status: ' + ca.activityStatus + 'type id: ' + ca.activity.activityTypeID,Debugger.GEN,'activityDoubleClick','LessonController'); - if(ca.activity.activityTypeID == Activity.TOOL_ACTIVITY_TYPE || ca.activity.activityTypeID == Activity.OPTIONAL_ACTIVITY_TYPE || ca.activity.activityTypeID == Activity.PARALLEL_ACTIVITY_TYPE || ca.activity.isGroupActivity()){ + if(ca.activity.activityTypeID == Activity.TOOL_ACTIVITY_TYPE || ca.activity.activityTypeID == Activity.OPTIONAL_ACTIVITY_TYPE || ca.activity.activityTypeID == Activity.PARALLEL_ACTIVITY_TYPE || ca.activity.isGroupActivity() || ca.activity.isBranchingActivity() || ca.activity.isSequenceActivity()) { if(ca.activityStatus != undefined){ var URLToSend:String = 'learning/learner.do?method=forwardToLearnerActivityURL&activityID='+ca.activity.activityID+'&userID='+_root.userID+'&lessonID='+_root.lessonID; Index: lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonModel.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonModel.as,v diff -u -r1.5 -r1.6 --- lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonModel.as 26 Oct 2007 09:35:25 -0000 1.5 +++ lams_flash/src/central/flash/org/lamsfoundation/lams/learner/ls/LessonModel.as 29 Oct 2007 05:17:34 -0000 1.6 @@ -69,6 +69,7 @@ private var _currentActivityOpen:Object; private var _active:Boolean; + private var _activeSeq:Array; /** * Constructor. @@ -82,6 +83,8 @@ ddmActivity_keys = new Array(); ddmTransition_keys = new Array(); + _activeSeq = new Array(); + _activitiesDisplayed = new Hashtable("_activitiesDisplayed"); } @@ -307,10 +310,13 @@ return _active; } - private function orderDesign(activity:Activity, order:Array):Boolean{ + private function orderDesign(activity:Activity, order:Array, backtrack:Boolean):Boolean{ Debugger.log("order design activity: " + activity.title, Debugger.CRITICAL, "orderDesign", "LessonModel"); + if(backtrack == null || backtrack == undefined) + backtrack = false; - order.push(activity); + if(backtrack) order.pop(); + else order.push(activity); if(activity.isBranchingActivity()) { Debugger.log("branching activity found: " + activity.activityUIID, Debugger.CRITICAL, "orderDesign", "LessonModel"); @@ -319,31 +325,71 @@ Debugger.log("seq children length: " + children.length, Debugger.CRITICAL, "orderDesign", "LessonModel"); for(var i=0; i=0; j--) { + if(!orderDesignChildren(children, j, order, true)) return false; + } + + _activeSeq[children[i].parentUIID] = Activity(children[i]); + + if(!orderDesign(firstActivitySeq, order, backtrack)) return false; + broadcastViewUpdate("REMOVE_ACTIVITY_ALL"); + } + + if(_activeSeq[children[i].parentUIID] == Activity(children[i])) { + if(!orderDesign(firstActivitySeq, order, backtrack)) return false; + if(children[i].stopAfterActivity && !backtrack) return false; + } + + } + + } + + return true; + } + private function setDesignOrder():Array { ddmActivity_keys = learningDesignModel.activities.keys(); ddmTransition_keys = learningDesignModel.transitions.keys(); Index: lams_learning/web/lams_learner.swf =================================================================== RCS file: /usr/local/cvsroot/lams_learning/web/Attic/lams_learner.swf,v diff -u -r1.70 -r1.71 Binary files differ