Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as =================================================================== diff -u -rc1774bfa6a2989cf32fc39f5f0fe7f3e8bfc9787 -r09d8f1bb25cdac8e00eeb6ce0e50ff5aca85ba20 --- lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as (.../LearnerTabView.as) (revision c1774bfa6a2989cf32fc39f5f0fe7f3e8bfc9787) +++ lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as (.../LearnerTabView.as) (revision 09d8f1bb25cdac8e00eeb6ce0e50ff5aca85ba20) @@ -215,10 +215,10 @@ //learnerMenuBar.refresh_btn.onRelease = Proxy.create (this, reloadProgress); trace("Help layer path: "+ learnerMenuBar.refresh_btn.label) - //setSize (mm) + //setSize (mm) + + setStyles(); - setStyles(); - dispatchEvent({type:'load',target:this}); } @@ -381,9 +381,14 @@ var mc = getController(); //take action depending on act type - if(a.activityTypeID==Activity.TOOL_ACTIVITY_TYPE || a.isGateActivity() || a.isGroupActivity() ){ - var newActivity_mc = _activityLayer_mc.createChildAtDepth("LearnerActivity", DepthManager.kTop,{_activity:a,_controller:mc,_view:ltv, _x:ACT_X, _y:ACT_Y+40, actLabel:a.title, learner:learner}); + if(a.activityTypeID==Activity.TOOL_ACTIVITY_TYPE || a.isGroupActivity()){ + var newActivity_mc = _activityLayer_mc.createChildAtDepth("LearnerActivity", DepthManager.kTop,{_activity:a,_controller:mc,_view:ltv, _x:ACT_X, _y:ACT_Y+40, learner:learner}); ACT_X = newActivity_mc._x + newActivity_mc._width; + }else if(a.isGateActivity()){ + var actLabel:String = gateTitle(a); + trace("Title to pass for Gate Activity: "+actLabel) + var newActivity_mc = _activityLayer_mc.createChildAtDepth("LearnerGateActivity", DepthManager.kTop,{_activity:a,_controller:mc,_view:ltv, _x:ACT_X, _y:ACT_Y+40, actLabel:actLabel, learner:learner}); + ACT_X = newActivity_mc._x + newActivity_mc._width; }else if(a.activityTypeID==Activity.PARALLEL_ACTIVITY_TYPE || a.activityTypeID==Activity.OPTIONAL_ACTIVITY_TYPE){ //get the children var children:Array = mm.getMonitor().ddm.getComplexActivityChildren(a.activityUIID); @@ -403,17 +408,36 @@ //mm.getMonitor().getMV().getMonitorScp().redraw(true); return s; } - - /** - * Get the CSSStyleDeclaration objects for each component and apply them - * directly to the instance - */ - private function setStyles():Void{ - var styleObj = _tm.getStyleObject('BGPanel'); - bkg_pnl.setStyle('styleName',styleObj); - } - + /** + * Get the CSSStyleDeclaration objects for each component and apply them + * directly to the instance + */ + private function setStyles():Void{ + var styleObj = _tm.getStyleObject('BGPanel'); + bkg_pnl.setStyle('styleName',styleObj); + } + + private function gateTitle(a:Activity):String{ + var titleToReturn:String + switch(String(a.activityTypeID)){ + case '3' : + titleToReturn = "Synchronise Gate" + return titleToReturn; + break; + case '4' : + titleToReturn = "Schedule Gate" + return titleToReturn; + break; + case '5' : + titleToReturn = "Permission Gate" + return titleToReturn; + break; + default: + Debugger.log('not defined yet',Debugger.GEN,'drawActivity','LearnerTabView'); + } + } + /** * Sets the size of the canvas on stage, called from update */ private function setSize(mm:MonitorModel):Void{