[virtualcommons-svn] SF.net SVN: virtualcommons:[248] mentalmodels/trunk
Status: Beta
Brought to you by:
alllee
From: <kj...@us...> - 2009-08-12 22:36:05
|
Revision: 248 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=248&view=rev Author: kjonas Date: 2009-08-12 22:35:58 +0000 (Wed, 12 Aug 2009) Log Message: ----------- added some code to submit strategy design updated swf files new compiled files show no difference on kalin's machine for some reason. Modified Paths: -------------- mentalmodels/trunk/flex/src/FisheryExperimentShell.mxml mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf mentalmodels/trunk/src/main/webapp/StartGame.swf Modified: mentalmodels/trunk/flex/src/FisheryExperimentShell.mxml =================================================================== --- mentalmodels/trunk/flex/src/FisheryExperimentShell.mxml 2009-08-11 22:08:09 UTC (rev 247) +++ mentalmodels/trunk/flex/src/FisheryExperimentShell.mxml 2009-08-12 22:35:58 UTC (rev 248) @@ -17,7 +17,6 @@ } public function progressBarInit():void { - progressTimer = new Timer(100, repetitions); // 21600 * 1000 = 6hrs progressTimer.addEventListener(TimerEvent.TIMER, timerTick); progressTimer.start(); Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-08-11 22:08:09 UTC (rev 247) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-08-12 22:35:58 UTC (rev 248) @@ -66,6 +66,7 @@ <mx:method name="getFirstModule" result="moduleResultHandler(event)"/> </mx:RemoteObject> <mx:RemoteObject id="answeringService" destination="answeringService" fault="faultHandler(event)"> + <mx:method name="saveStrategy" result="strategyResultHandler(event)"/> </mx:RemoteObject> <mx:RemoteObject id="locationService" destination="locationService" fault="faultHandler(event)"> <mx:method name="getAllLocations" result="locationResultHandler(event)"/> @@ -239,12 +240,14 @@ } else if(curr.getChildAt(j) is StrategyDesignQuestionC) { - studentResponse.question = (curr.getChildAt(j) as StrategyDesignQuestionC).question; + Alert.show("Strategy Saving"); studentResponse.response = null; + studentResponse.question = null; - //SKIP IT FOR NOW - studentResponse.question = null; + var strategy:StrategyDesignQuestionC = StrategyDesignQuestionC(curr.getChildAt(j)); + answeringService.saveStrategy(strategy.toDatabaseObject()); } + Alert.show(""+(curr.getChildAt(j) is StrategyDesignQuestionC)); if(studentResponse.question != null) { @@ -253,19 +256,19 @@ } } - var str:String = ""; - for(var q:int=0;q<responseList.length;q++) - { - str += "null:"; - str += (responseList.getItemAt(q) == null); - str += "\n"; - str += "response:"; - str += (responseList.getItemAt(q) as StudentResponse).response; - - str += "\n"; - str += "\n"; - } - Alert.show(str); +// var str:String = ""; +// for(var q:int=0;q<responseList.length;q++) +// { +// str += "null:"; +// str += (responseList.getItemAt(q) == null); +// str += "\n"; +// str += "response:"; +// str += (responseList.getItemAt(q) as StudentResponse).response; +// +// str += "\n"; +// str += "\n"; +// } +// Alert.show(str); answeringService.saveQuestion(responseList); } @@ -342,6 +345,10 @@ // Alert.show("locations received: "+locations.length); } } + private function strategyResultHandler(event:ResultEvent):void + { +// Alert.show("Strategy Saved"); + } private function studentResultHandler(event:ResultEvent):void { Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/StartGame.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |