Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as =================================================================== diff -u -r05449d549cd1e43d815a4164b70a93c6cf798557 -rf1865be54adc3406a8602c5c53f7e3eb06a1e15f --- lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as (.../LearnerTabView.as) (revision 05449d549cd1e43d815a4164b70a93c6cf798557) +++ lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LearnerTabView.as (.../LearnerTabView.as) (revision f1865be54adc3406a8602c5c53f7e3eb06a1e15f) @@ -136,7 +136,8 @@ break; case 'TABCHANGE' : if (infoObj.tabID == _tabID){ - this._visible = true; + this._visible = true; + hideMainExp(mm); trace("TabID for Selected tab is (TABCHANGE): "+infoObj.tabID) if (mm.activitiesDisplayed.isEmpty()){ mm.getMonitor().openLearningDesign(mm.getSequence()); @@ -222,8 +223,11 @@ dispatchEvent({type:'load',target:this}); } + private function hideMainExp(mm:MonitorModel):Void{ + //var mcontroller = getController(); + mm.broadcastViewUpdate("EXPORTSHOWHIDE", false) + } - //private function initEventListeners(){ //refresh_btn.addEventListener("click", Delegate.create(this, reloadProgress)); //} @@ -345,7 +349,44 @@ r.removeMovieClip(); var s:Boolean = (r==null) ? false : true; - } + } + + private function printLearner(a:Activity,mm:MonitorModel, learner:Object){ + var z:Object = mm.getSize(); + var styleObj = _tm.getStyleObject('button'); + var EP_btn_label:String = Dictionary.getValue('learner_exportPortfolio_btn') + var nameTextFormat = new TextFormat(); + var exp_url = _root.serverURL+"learning/exportWaitingPage.jsp?mode=learner&lessonID="+_root.lessonID+"&userID="+learner.getLearnerId(); + trace("Monitor Tab Grid Width: "+z.w+" Monitor Tab Grid Height: "+z.h); + + _activityLayer_mc.createTextField("learnerName"+learner.getLearnerId(), _activityLayer_mc.getNextHighestDepth(), ACT_X, ACT_Y, z.w-20, 20); + _activityLayer_mc.attachMovie("Button", "learnerName"+learner.getLearnerId()+"_btn", _activityLayer_mc.getNextHighestDepth(),{label:EP_btn_label, _x:z.w-110, _y:ACT_Y+2} ) + var learnerName_txt = _activityLayer_mc["learnerName"+learner.getLearnerId()]; + + var learnerExp_btn = _activityLayer_mc["learnerName"+learner.getLearnerId()+"_btn"]; + learnerExp_btn.setSize(90, 17); + learnerExp_btn.setStyle('styleName',styleObj); + learnerExp_btn.onRelease = function (){ + //trace("Contribute Type is: "+o.taskURL); + JsPopup.getInstance().launchPopupWindow(exp_url, 'ExportPortfolio', 300, 400, true, true, false, false, false); + + //getURL(String(o.taskURL), "_blank"); + //getURL("http://localhost:8080/lams/monitoring/monitoring.do?method=getAllContributeActivities&lessonID=4", "_blank"); + } + + nameTextFormat.bold = true; + nameTextFormat.font = "Verdana"; + nameTextFormat.size = 11; + learnerName_txt.border = true; + learnerName_txt.selectable = false; + learnerName_txt.background = true; + learnerName_txt.backgroundColor = 0xCCCCCC; + learnerName_txt.setNewTextFormat(nameTextFormat); + learnerName_txt.text = "\t"+learner.getLearnerFirstName() + " "+learner.getLearnerLastName() + trace("Ypos for name field is: "+ACT_Y) + } + + /** * Draws new activity to monitor tab view stage. * @usage @@ -357,7 +398,8 @@ Debugger.log('The activity:'+a.title+','+a.activityTypeID+' is now be drawn',Debugger.CRITICAL,'drawActivity','LearnerTabView'); if (ACT_X == 0){ - var z:Object = mm.getSize(); + printLearner(a, mm, learner) + /*var z:Object = mm.getSize(); trace("Monitor Tab Grid Width: "+s.w+" Monitor Tab Grid Height: "+s.h); _activityLayer_mc.createTextField("learnerName"+learner.getLearnerId(), _activityLayer_mc.getNextHighestDepth(), ACT_X, ACT_Y, z.w-20, 20); var learnerName_txt = _activityLayer_mc["learnerName"+learner.getLearnerId()]; @@ -372,7 +414,7 @@ learnerName_txt.backgroundColor = 0xCCCCCC; learnerName_txt.setNewTextFormat(nameTextFormat); learnerName_txt.text = "\t"+learner.getLearnerFirstName() + " "+learner.getLearnerLastName() - trace("Ypos for name field is: "+ACT_Y) + trace("Ypos for name field is: "+ACT_Y)*/ } var s:Boolean = false; Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LessonTabView.as =================================================================== diff -u -rb202b78d9de322413da016d90295ef8a8e16a6c8 -rf1865be54adc3406a8602c5c53f7e3eb06a1e15f --- lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LessonTabView.as (.../LessonTabView.as) (revision b202b78d9de322413da016d90295ef8a8e16a6c8) +++ lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/LessonTabView.as (.../LessonTabView.as) (revision f1865be54adc3406a8602c5c53f7e3eb06a1e15f) @@ -163,6 +163,7 @@ if (infoObj.tabID == _tabID){ trace("TabID for Selected tab is (LessonTab TABCHANGE): "+infoObj.tabID) this._visible = true; + hideMainExp(mm); //mm.setDirty(); //MovieClipUtils.doLater(Proxy.create(this,draw)); if(mm.getIsProgressChanged()){ @@ -176,7 +177,8 @@ case 'SEQUENCE' : if (infoObj.tabID == _tabID){ trace("TabID for Selected tab is (LessonTab): "+infoObj.tabID) - this._visible = true; + this._visible = true; + hideMainExp(mm); MovieClipUtils.doLater(Proxy.create(this,draw)); }else { @@ -230,6 +232,11 @@ } + private function hideMainExp(mm:MonitorModel):Void{ + //var mcontroller = getController(); + mm.broadcastViewUpdate("EXPORTSHOWHIDE", false) + } + /** * 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. Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as =================================================================== diff -u -r37e1febf9d49b02e43ff9ee4ebcf0783bc6ed09f -rf1865be54adc3406a8602c5c53f7e3eb06a1e15f --- lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as (.../MonitorTabView.as) (revision 37e1febf9d49b02e43ff9ee4ebcf0783bc6ed09f) +++ lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/MonitorTabView.as (.../MonitorTabView.as) (revision f1865be54adc3406a8602c5c53f7e3eb06a1e15f) @@ -126,6 +126,7 @@ trace("isChanged value in monitorModel is: "+mm.getIsProgressChanged()) if (infoObj.tabID == _tabID){ this._visible = true; + hideMainExp(mm); trace("TabID for Selected tab is (TABCHANGE): "+infoObj.tabID) if (mm.activitiesDisplayed.isEmpty()){ mm.getMonitor().openLearningDesign(mm.getSequence()); @@ -218,6 +219,12 @@ dispatchEvent({type:'load',target:this}); } + + private function hideMainExp(mm:MonitorModel):Void{ + //var mcontroller = getController(); + mm.broadcastViewUpdate("EXPORTSHOWHIDE", 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. Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/TodoTabView.as =================================================================== diff -u -rb202b78d9de322413da016d90295ef8a8e16a6c8 -rf1865be54adc3406a8602c5c53f7e3eb06a1e15f --- lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/TodoTabView.as (.../TodoTabView.as) (revision b202b78d9de322413da016d90295ef8a8e16a6c8) +++ lams_central/src/flash/org/lamsfoundation/lams/monitoring/mv/tabviews/TodoTabView.as (.../TodoTabView.as) (revision f1865be54adc3406a8602c5c53f7e3eb06a1e15f) @@ -116,6 +116,7 @@ if (infoObj.tabID == _tabID){ trace("TabID for Selected tab is (LessonTab TABCHANGE): "+infoObj.tabID) this._visible = true; + hideMainExp(mm); //mm.setDirty(); MovieClipUtils.doLater(Proxy.create(this,draw)); }else { @@ -127,6 +128,11 @@ } } + + private function hideMainExp(mm:MonitorModel):Void{ + //var mcontroller = getController(); + mm.broadcastViewUpdate("EXPORTSHOWHIDE", false) + } /** * layout visual elements on the canvas on initialisation