Index: lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as =================================================================== diff -u -r764fac63aac6ba73d6f561c09831cff02052c8d9 -rc376af8abcb3c64ee70e3e476d5c3c537e526fad --- lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as (.../MonitorTabView.as) (revision 764fac63aac6ba73d6f561c09831cff02052c8d9) +++ lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as (.../MonitorTabView.as) (revision c376af8abcb3c64ee70e3e476d5c3c537e526fad) @@ -136,11 +136,12 @@ mm.getMonitor().getMV().getMonitorSequenceScp()._visible = true; hideMainExp(mm); mm.broadcastViewUpdate("JOURNALSSHOWHIDE", false); - + if (mm.activitiesDisplayed.isEmpty() || mm.transitionsDisplayed.isEmpty()){ + redrawCanvas(o.hasChanged()); mm.getMonitor().openLearningDesign(mm.getSequence()); - } else { - + } else { + if (drawDesignCalled == undefined){ drawDesignCalled = "called"; mm.drawDesign(infoObj.tabID); @@ -149,11 +150,11 @@ if(mm.getIsProgressChangedSequence()){ reloadProgress(o.hasChanged(), mm); } - } + } - LFMenuBar.getInstance().setDefaults(); - - }else { + LFMenuBar.getInstance().setDefaults(); + } + else { mm.getMonitor().getMV().getMonitorSequenceScp()._visible = false; //this._visible = false; } @@ -265,79 +266,71 @@ mm.broadcastViewUpdate("EXPORTSHOWHIDE", true); mm.broadcastViewUpdate("EDITFLYSHOWHIDE", true); } - - /** - * Reloads the learner Progress and - * @Param isChanged Boolean Value to pass it to setIsProgressChanged in monitor model so that it sets it to true if refresh button is clicked and sets it to fasle as soon as latest data is loaded and design is redrawn. - * @usage - * @return nothing - */ - private function reloadProgress(isChanged:Boolean){ + + private function redrawCanvas(isChanged:Boolean):Void { var s:Object = mm.getSize(); //var openBranchingActivity:Object = mm.currentBranchingActivity; drawDesignCalled = undefined; - /** - if(openBranchingActivity && (mm.activeView instanceof CanvasBranchView)) { // learner has been force-completed - showAssets(false); - mm.getMonitor().getProgressData(mm.getSequence()); - mm.activeView.removeMovieClip(); - mm.getMonitor().openBranchView(openBranchingActivity, true); - } - else { - */ - showAssets(true); - - mm.activeView = this; - mm.currentBranchingActivity = null; - - //mm.openBranchingActivity = mm.currentBranchingActivity.activity.activityUIID; - - //Remove all the movies drawn on the transition and activity movieclip holder - - this._learnerContainer_mc.removeMovieClip(); - this.transitionLayer.removeMovieClip(); - this.activityLayer.removeMovieClip(); - this.transparentCover.removeMovieClip(); - - this.branchContent.removeMovieClip(); - this.complexViewer.removeMovieClip(); + showAssets(true); - //Recreate both Transition holder and Activity holder Movieclips - transitionLayer = this.createEmptyMovieClip("_transitionLayer_mc", this.getNextHighestDepth()); - - activityLayer = this.createEmptyMovieClip("_activityLayer_mc", this.getNextHighestDepth(),{_y:learnerMenuBar._height}); - - _learnerContainer_mc = this.createEmptyMovieClip("_learnerContainer_mc", this.getNextHighestDepth()); - - transparentCover = this.attachMovie("Panel", "_transparentCover_mc", this.getNextHighestDepth(), {_visible: false, enabled: true, _alpha: 50}); - transparentCover.onPress = Proxy.create(this, onTransparentCoverClick); + //mm.openBranchingActivity = mm.currentBranchingActivity.activity.activityUIID; + mm.activeView = this; + mm.currentBranchingActivity = null; + //Remove all the movies drawn on the transition and activity movieclip holder - complexViewer = this.createEmptyMovieClip("_complex_viewer_mc", this.getNextHighestDepth()); - branchContent = this.createEmptyMovieClip("_branch_content_mc", DepthManager.kTopmost); + this._learnerContainer_mc.removeMovieClip(); + this.transitionLayer.removeMovieClip(); + this.activityLayer.removeMovieClip(); + this.transparentCover.removeMovieClip(); - if (isChanged == false){ - mm.setIsProgressChangedSequence(false); - - } else { - mm.setIsProgressChangedLesson(true); - mm.setIsProgressChangedLearner(true); - } + this.branchContent.removeMovieClip(); + this.complexViewer.removeMovieClip(); + + //Recreate both Transition holder and Activity holder Movieclips + transitionLayer = this.createEmptyMovieClip("_transitionLayer_mc", this.getNextHighestDepth()); + + activityLayer = this.createEmptyMovieClip("_activityLayer_mc", this.getNextHighestDepth(),{_y:learnerMenuBar._height}); + + _learnerContainer_mc = this.createEmptyMovieClip("_learnerContainer_mc", this.getNextHighestDepth()); + + transparentCover = this.attachMovie("Panel", "_transparentCover_mc", this.getNextHighestDepth(), {_visible: false, enabled: true, _alpha: 50}); + transparentCover.onPress = Proxy.create(this, onTransparentCoverClick); + + complexViewer = this.createEmptyMovieClip("_complex_viewer_mc", this.getNextHighestDepth()); + branchContent = this.createEmptyMovieClip("_branch_content_mc", DepthManager.kTopmost); + + if (isChanged == false){ + mm.setIsProgressChangedSequence(false); - mm.branchesDisplayed.clear(); - mm.transitionsDisplayed.clear(); - mm.activitiesDisplayed.clear(); - - mm.getMonitor().getProgressData(mm.getSequence()); - //} + } else { + mm.setIsProgressChangedLesson(true); + mm.setIsProgressChangedLearner(true); + } + + mm.branchesDisplayed.clear(); + mm.transitionsDisplayed.clear(); + mm.activitiesDisplayed.clear(); + + } + + /** + * Reloads the learner Progress and + * @Param isChanged Boolean Value to pass it to setIsProgressChanged in monitor model so that it sets it to true if refresh button is clicked and sets it to fasle as soon as latest data is loaded and design is redrawn. + * @usage + * @return nothing + */ + private function reloadProgress(isChanged:Boolean){ + + redrawCanvas(isChanged); + mm.getMonitor().getProgressData(mm.getSequence()); } public function showAssets(v:Boolean) { this._learnerContainer_mc._visible = v; this.transitionLayer._visible = v; this.activityLayer._visible = v; - this.transparentCover._visible = v; } /** @@ -400,7 +393,7 @@ } else if(a.activityTypeID==Activity.OPTIONAL_ACTIVITY_TYPE || a.activityTypeID==Activity.OPTIONS_WITH_SEQUENCES_TYPE){ var children:Array = mm.getMonitor().ddm.getComplexActivityChildren(a.activityUIID); newActivity_mc = activityLayer.createChildAtDepth("CanvasOptionalActivity", DepthManager.kTop, {_activity:a, _children:children, _monitorController:mc, _monitorTabView:mtv, fromModuleTab:"monitorMonitorTab", learnerContainer:_learnerContainer_mc}); - } else if(a.isBranchingActivity()){ + } else if(a.isBranchingActivity()){ a.branchView = null; newActivity_mc = activityLayer.createChildAtDepth("CanvasActivity", DepthManager.kBottom, {_activity:a,_monitorController:mc, _monitorView:mtv, _module:"monitoring", learnerContainer:_learnerContainer_mc, setupBranchView:false}); } else { Index: lams_monitoring/web/lams_monitoring.swf =================================================================== diff -u -rfdb001148922ea9c0662f9e91fa9e2ee68b23845 -rc376af8abcb3c64ee70e3e476d5c3c537e526fad Binary files differ Index: lams_monitoring/web/lams_monitoring_library.swf =================================================================== diff -u -rfdb001148922ea9c0662f9e91fa9e2ee68b23845 -rc376af8abcb3c64ee70e3e476d5c3c537e526fad Binary files differ