Index: lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as =================================================================== RCS file: /usr/local/cvsroot/lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as,v diff -u -r1.31 -r1.32 --- lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as 7 Mar 2008 06:09:55 -0000 1.31 +++ lams_flash/src/central/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as 10 Mar 2008 06:02:43 -0000 1.32 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/Attic/lams_monitoring.swf,v diff -u -r1.173 -r1.174 Binary files differ Index: lams_monitoring/web/lams_monitoring_library.swf =================================================================== RCS file: /usr/local/cvsroot/lams_monitoring/web/Attic/lams_monitoring_library.swf,v diff -u -r1.141 -r1.142 Binary files differ