virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 54)
Status: Beta
Brought to you by:
alllee
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(21) |
Aug
(31) |
Sep
(6) |
Oct
(15) |
Nov
(2) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(4) |
Feb
(6) |
Mar
(12) |
Apr
(52) |
May
(14) |
Jun
(19) |
Jul
(81) |
Aug
(115) |
Sep
(36) |
Oct
(88) |
Nov
(46) |
Dec
(58) |
2010 |
Jan
(52) |
Feb
(55) |
Mar
(48) |
Apr
(15) |
May
(5) |
Jun
(38) |
Jul
(27) |
Aug
(24) |
Sep
(28) |
Oct
(1) |
Nov
(2) |
Dec
(29) |
2011 |
Jan
(87) |
Feb
(39) |
Mar
(63) |
Apr
(42) |
May
(26) |
Jun
(53) |
Jul
(23) |
Aug
(43) |
Sep
(37) |
Oct
(25) |
Nov
(4) |
Dec
(7) |
2012 |
Jan
(73) |
Feb
(79) |
Mar
(62) |
Apr
(28) |
May
(12) |
Jun
(2) |
Jul
(9) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
(3) |
Dec
(3) |
2013 |
Jan
(8) |
Feb
(16) |
Mar
(38) |
Apr
(74) |
May
(62) |
Jun
(15) |
Jul
(49) |
Aug
(19) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <see...@us...> - 2010-01-15 23:47:00
|
Revision: 440 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=440&view=rev Author: seematalele Date: 2010-01-15 23:46:54 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 23:40:43 UTC (rev 439) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 23:46:54 UTC (rev 440) @@ -208,21 +208,6 @@ { getLogger().debug("game state is NOT null..."); block = newGameState.getCurrentBlock(); - - //test saving data in communication - //FIXME: Remove this part - if(newGameState.getCurrentBlock().getId() == 1) - { - Communication communication = new Communication(); - communication.setMessage("hello"); - - communication.setRound(newGameState.getCurrentRound()); - communication.setStudent(studentDao.find(1L)); - Timestamp time = null; - communication.setTimestamp(time); - communicationDao.save(communication); - - } initializeGame(newGameState); msgHandler.sendBlock(newGameState); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2010-01-15 23:40:50
|
Revision: 439 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=439&view=rev Author: kjonas Date: 2010-01-15 23:40:43 +0000 (Fri, 15 Jan 2010) Log Message: ----------- added list of locations to the DataModel.as file and updated references to load/save from here. SocioDemographicPage.mxml pre-fills data fields with testing information StrategyDesignQuestionC.mxml has been tested to at least *look* properly. may not function (save to server) Modified Paths: -------------- mentalmodels/trunk/flex/src/actionscript/DataModel.as mentalmodels/trunk/flex/src/actionscript/PageDisplay.as mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/flex/src/custom/InstructionPage.mxml mentalmodels/trunk/flex/src/custom/SocioDemographicPage.mxml mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/OneDay.mxml mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastComponent.mxml mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml Modified: mentalmodels/trunk/flex/src/actionscript/DataModel.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/DataModel.as 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/actionscript/DataModel.as 2010-01-15 23:40:43 UTC (rev 439) @@ -1,12 +1,22 @@ package actionscript { + import mx.collections.ArrayCollection; + public class DataModel { private static const INSTANCE:DataModel = new DataModel(); public var studentObject:actionscript.Student = null; public var gameObject:actionscript.Game = null; + public var locations:ArrayCollection = null; + private function newLocation(maxCapacity:Number,growth:Number):Location + { + var newLoc:Location = new Location(); + newLoc.growthRate = growth; + return newLoc; + } + public function DataModel():void { if (INSTANCE != null) Modified: mentalmodels/trunk/flex/src/actionscript/PageDisplay.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2010-01-15 23:40:43 UTC (rev 439) @@ -29,27 +29,17 @@ public var currentPageNumber:int; public var highestPageReached:int; - public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); - public var currBlock:Block; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - // requires a block, and a list of locations. // the "minimumPagesRead" variable will not let the student finish the block until that // many pages have been viewed. - public function PageDisplay(newBlock:Block, minimumPagesRead:int, locations:ArrayCollection) + public function PageDisplay(newBlock:Block, minimumPagesRead:int) { currBlock = newBlock; minPagesRead = minimumPagesRead; currentPageNumber = 0; highestPageReached = currentPageNumber; - this.locations = locations; // generates the objects that will be displayed on each "page" in the block loadPages(); @@ -116,9 +106,8 @@ else if(tempQuestion.type.toLowerCase() == "strategydesign") { var sdq:StrategyDesignQuestionC = new StrategyDesignQuestionC(); - sdq.locations = locations; - sdq.setRound(gameObject.currentRound); sdq.loadFromQuestion(Question(tempQuestion)); + sdq.setRound(DataModel.instance.gameObject.currentRound); sdq.id = "q"+question; tempBox.addChild(sdq); @@ -126,7 +115,6 @@ else if(tempQuestion.type.toLowerCase() == "daybydaydecisions") { var ddq:DayByDayDecisionsQuestionC = new DayByDayDecisionsQuestionC(); - ddq.locations = locations; ddq.loadFromQuestion(Question(tempQuestion)); ddq.id = "q"+question; @@ -135,7 +123,6 @@ else if(tempQuestion.type.toLowerCase() == "forecastingfishermen") { var fpq:ForecastingPeopleQuestionC = new ForecastingPeopleQuestionC(); - fpq.locations = locations; fpq.loadFromQuestion(tempQuestion); fpq.id = "q"+question; @@ -144,7 +131,6 @@ else if(tempQuestion.type.toLowerCase() == "forecastingfish") { var ffq:ForecastingFishQuestionC = new ForecastingFishQuestionC(); - ffq.locations = locations; ffq.loadFromQuestion(tempQuestion); ffq.id = "q"+question; Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -19,8 +19,7 @@ <!-- This is a temporary state that jumpstarts the "instructions" state for the first time --> <mx:State name="instructionsLoad"> <mx:AddChild relativeTo="{content}"> - <comp:InstructionPage id="instructions" initialize="gotoInstructions()" x="0" y="0" - preinitialize="instructions.setLocations(locations)"/> + <comp:InstructionPage id="instructions" initialize="gotoInstructions()" x="0" y="0"/> </mx:AddChild> </mx:State> @@ -118,7 +117,6 @@ public var gameObject:actionscript.Game = null; public var currentBlock:Block = null; public var currentBlockNumber:int = 0; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); public var instructionsLoaded:Boolean = false; [Bindable] public var studentObject:actionscript.Student; [Bindable] public var roundObject:actionscript.Round; @@ -144,7 +142,7 @@ // Responds to ArrayCollection by assuming it is of Student objects // This code assigns group and student numbers based on the object whose id // matches studentObject - if(event.message.body is actionscript.Game) + if(event.message.body as actionscript.Game != null) { gameObject = event.message.body as actionscript.Game; DataModel.instance.gameObject = gameObject; @@ -154,12 +152,12 @@ instructions.setGameObject(this.gameObject); } } - else if(event.message.body is actionscript.Block) + else if(event.message.body as actionscript.Block != null) { Alert.show("Server sent Block, not Game.",""); setBlock(event.message.body as actionscript.Block); } - else if(event.message.body is ArrayCollection) + else if(event.message.body as ArrayCollection != null) { var students:ArrayCollection = new ArrayCollection(); students = ArrayCollection(event.message.body); @@ -182,7 +180,7 @@ } } } -// Alert.show("Current Student Information is: " + "\n"+SingletonStudent.instance.studentObject.id +"\n"+SingletonStudent.instance.studentObject.gameCode+"\n"+SingletonStudent.instance.studentObject.studentNo); +// Alert.show("Current Student Information is: " + "\n"+DataModel.instance.studentObject.id +"\n"+DataModel.instance.studentObject.gameCode+"\n"+DataModel.instance.studentObject.studentNo); } } @@ -221,15 +219,6 @@ Alert.show("Block received in Instructions (load) state.","Unexpected Block"); } } - - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - //newLoc.maxCapacity = maxCapacity; - //newLoc.initialPopulation = maxCapacity / 2.0; - newLoc.growthRate = growth; - return newLoc; - } public function init():void { @@ -302,7 +291,7 @@ else if(curr.getChildAt(j) is ForecastingPeopleQuestionC) { var forecast1:ForecastingPeopleQuestionC = (curr.getChildAt(j) as ForecastingPeopleQuestionC); - for(row=0; row<locations.length; row++) + for(row=0; row<DataModel.instance.locations.length; row++) { studentResponse = new StudentResponse(); studentResponse.student = studentObject; @@ -325,7 +314,7 @@ else if(curr.getChildAt(j) is ForecastingFishQuestionC) { var forecast2:ForecastingFishQuestionC = (curr.getChildAt(j) as ForecastingFishQuestionC); - for(row=0; row<locations.length-1; row++) + for(row=0; row<DataModel.instance.locations.length-1; row++) { studentResponse = new StudentResponse(); studentResponse.student = studentObject; @@ -357,7 +346,7 @@ for(var k:int=0;k<tempDBObjects.length;k++) { - (tempDBObjects.getItemAt(k) as StudentStrategy).student = studentObject; + (tempDBObjects.getItemAt(k) as StudentStrategy).student = DataModel.instance.studentObject; (tempDBObjects.getItemAt(k) as StudentStrategy).round = roundObject; } @@ -444,11 +433,7 @@ { if(event.result is ArrayCollection) { - locations = event.result as ArrayCollection; - if(instructions != null) - { - instructions.setLocations(locations); - } + DataModel.instance.locations = event.result as ArrayCollection; } } private function strategyResultHandler(event:ResultEvent):void Modified: mentalmodels/trunk/flex/src/custom/InstructionPage.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -25,21 +25,12 @@ [Bindable] public var numPages:int = 1; [Bindable] public var currPage:int = 0; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); - // saved for use in information windows, etc public var savedForecastPeople:ArrayCollection = null; public var savedForecastFish:ArrayCollection = null; public var savedStrategyDesign:ArrayCollection = null; public var savedDayByDayDecisions:ArrayCollection = null; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - // makes sure the pageDisplay has been created // then gives it gameObject public function setGameObject(newGameObject:actionscript.Game):void @@ -87,18 +78,18 @@ if(block != null && block.questionGroups != null) { minPagesRead = block.questionGroups.length - pageDisplay = new PageDisplay(block, minPagesRead,locations); + pageDisplay = new PageDisplay(block, minPagesRead); } if(pageDisplay == null) { debug2.text += "pageDisplay is null\n"; - pageDisplay = new PageDisplay(makeBlock(),0,locations); + pageDisplay = new PageDisplay(makeBlock(),0); } }catch(errObject:Error){ // worst case scenario... still needs to have a pagedisplay debug2.text += "pageDisplay creation failure\n" + errObject.name +"\n"+ errObject.message +"\n"+ errObject.getStackTrace() +"\n"; - pageDisplay = new PageDisplay(makeBlock(),0,locations); + pageDisplay = new PageDisplay(makeBlock(),0); // Alert.show(debug2.text); } setGameObject(this.gameObject); @@ -251,15 +242,6 @@ return block; } - public function setLocations(newLocations:ArrayCollection):void - { - locations = newLocations; - if(pageDisplay != null) - { - pageDisplay.locations = newLocations; - } - } - ]]> </mx:Script> Modified: mentalmodels/trunk/flex/src/custom/SocioDemographicPage.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/SocioDemographicPage.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/SocioDemographicPage.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -1,10 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> -<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle" horizontalAlign="center"> +<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle" horizontalAlign="center" + creationComplete="test_init()"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; + public function test_init():void + { + radioMale.selected = true; + txtYear.text = "2010"; + txtMajor.text = "CSE"; + txtGameCode.text = "test1"; + } + public function getGender():String { if(radioMale.selected) { return "M"; } Modified: mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -22,6 +22,7 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.Location; import mx.controls.Alert; import mx.collections.ArrayCollection; @@ -30,18 +31,10 @@ import actionscript.questions.*; import custom.questions.dayByDayDecisions.OneDay; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); [Bindable] public var deciding:int = 0; [Bindable] public var cumTotal:Number = 0; [Bindable] public var dollarPerLb:Number = 3.99; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { buttons.removeAllChildren(); @@ -64,7 +57,7 @@ txtTemp.text = "Harbor"; labels.addChild(txtTemp); - for(var i:int = 1; i < locations.length; i++) + for(var i:int = 1; i < DataModel.instance.locations.length; i++) { btnTemp = new Button(); btnTemp.label = "Bay" + (i); @@ -125,7 +118,6 @@ } var newDay:OneDay = new OneDay(); - newDay.locations = locations; newDay.initialize(); newDay.day = dayByDayContent.numChildren + 1; newDay.dollarPerLb = dollarPerLb; @@ -149,7 +141,6 @@ var day:OneDay = dayByDayContent.getChildAt(i) as OneDay; var newDay:OneDay = new OneDay(); - newDay.locations = locations; newDay.initialize(); newDay.day = day.day; newDay.dollarPerLb = day.day; Modified: mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/OneDay.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/OneDay.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/OneDay.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -3,12 +3,12 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.Location; import mx.controls.Text; import mx.controls.Label; import mx.collections.ArrayCollection; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); [Bindable] public var decisions:ArrayCollection; public var previousTotal:Number = 0; @@ -16,20 +16,13 @@ public var day:int = 1; public var dollarPerLb:Number = 3.99; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { if(decisions == null) { drawNull(); } - else if(decisions.length < locations.length+1) + else if(decisions.length < DataModel.instance.locations.length+1) { drawPartial(); } @@ -55,7 +48,7 @@ public function drawPartial():void { var temp:OneDecision; - for(var i:int = decisions.length; i < locations.length; i++) + for(var i:int = decisions.length; i < DataModel.instance.locations.length; i++) { temp = new OneDecision(); temp.active = false; @@ -78,7 +71,7 @@ dayText.minWidth = 50; addChild(dayText); - for(var i:int = 0; i < locations.length && i < decisions.length; i++) + for(var i:int = 0; i < DataModel.instance.locations.length && i < decisions.length; i++) { var temp:OneDecision = (decisions.getItemAt(i) as OneDecision); presentTotal += temp.lbsFished; @@ -108,7 +101,7 @@ } else { - for(var i:int = 0; i < locationChosen && i < locations.length; i++) + for(var i:int = 0; i < locationChosen && i < DataModel.instance.locations.length; i++) { var tempInactive:OneDecision = new OneDecision(); tempInactive.active = false; Modified: mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastComponent.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastComponent.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastComponent.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -5,6 +5,7 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.Location; import mx.controls.Alert; import mx.events.FlexEvent; @@ -26,7 +27,7 @@ // Game Data [Bindable] public var style:int = 0; // 0:People, 1:Fish, 2:Calculated // [Bindable] public var numBays:int = 3; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); + [Bindable] public var locations:ArrayCollection = DataModel.instance.locations; [Bindable] public var numColumns:int = -1; [Bindable] public var numFields:int = 15; [Bindable] public var minValue:int = 0; @@ -38,13 +39,6 @@ // for lining up grids [Bindable] public var minimumWidth:int = 160; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - // // public accessible functions // Modified: mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -27,6 +27,7 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.questions.Question; import actionscript.Location; import mx.controls.Alert; @@ -36,17 +37,10 @@ public var loadFish:ArrayCollection = null; public var loadPeople:ArrayCollection = null; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); + [Bindable] public var locations:ArrayCollection = DataModel.instance.locations; [Bindable] public var numColumns:int = 6; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { if(fishEntry == null || peopleDisplay == null || calculated == null) return; Modified: mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -24,6 +24,7 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.questions.Question; import actionscript.Location; import actionscript.questions.ForecastingPeople; @@ -31,17 +32,10 @@ import custom.questions.forecasting.ForecastComponent; public var loadPeople:ArrayCollection = null; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); + [Bindable] public var locations:ArrayCollection = DataModel.instance.locations; [Bindable] public var numColumns:int = 15; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { if(peopleEntry == null) return; Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -12,16 +12,8 @@ public var valueRequired:Boolean = false; public var hasBeenChanged:Boolean = false; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); public var round:Round = null; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { if(valueRequired && grid.numChildren == 0) @@ -40,7 +32,6 @@ { var newRow:PlannerRow = new PlannerRow(); newRow.valueRequired = this.valueRequired; - newRow.locations = locations; newRow.initialize(); newRow.init(); var newNumber:Label = new Label(); Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -3,18 +3,12 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import actionscript.Location; public var valueRequired:Boolean = false; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); + [Bindable] public var locations:ArrayCollection = DataModel.instance.locations; - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { locs.removeAll(); Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-15 23:36:34 UTC (rev 438) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-15 23:40:43 UTC (rev 439) @@ -26,15 +26,6 @@ import actionscript.questions.Question; import mx.collections.ArrayCollection; - [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(0, 0)]); - - private function newLocation(maxCapacity:Number,growth:Number):Location - { - var newLoc:Location = new Location(); - newLoc.growthRate = growth; - return newLoc; - } - public function init():void { } @@ -82,7 +73,6 @@ initialize(); init(); - repeated.locations = locations; repeated.init(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2010-01-15 23:36:40
|
Revision: 438 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=438&view=rev Author: kjonas Date: 2010-01-15 23:36:34 +0000 (Fri, 15 Jan 2010) Log Message: ----------- updated swf files Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf mentalmodels/trunk/src/main/webapp/StartGame.swf 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. |
From: <kj...@us...> - 2010-01-15 22:14:34
|
Revision: 437 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=437&view=rev Author: kjonas Date: 2010-01-15 22:14:28 +0000 (Fri, 15 Jan 2010) Log Message: ----------- updated swf files Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2010-01-15 21:43:53
|
Revision: 436 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=436&view=rev Author: seematalele Date: 2010-01-15 21:43:09 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2010-01-15 21:26:11 UTC (rev 435) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2010-01-15 21:43:09 UTC (rev 436) @@ -26,6 +26,7 @@ private Long id; @Lob + @Column private String message; @Column Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-15 21:26:11 UTC (rev 435) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-15 21:43:09 UTC (rev 436) @@ -1,13 +1,9 @@ package edu.asu.commons.mme.service; -import java.util.ArrayList; import java.util.Iterator; import java.util.List; - - import org.hibernate.Query; - import org.springframework.transaction.annotation.Transactional; import edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao; Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java 2010-01-15 21:26:11 UTC (rev 435) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java 2010-01-15 21:43:09 UTC (rev 436) @@ -28,7 +28,6 @@ { //log the message communication.setMessage(comm.getMessage()); - communication.setRound(roundConfigDao.find(comm.getRound().getId())); communication.setStudent(studentDao.find(comm.getStudent().getId())); communication.setTimestamp(comm.getTimestamp()); @@ -36,12 +35,13 @@ getLogger().debug("timestamp is: '" + comm.getTimestamp() + "' student id is: " + comm.getStudent().getId()); getDao().save(communication); + }catch(Exception e) { e.printStackTrace(); } //send the message to the respective group - try + /*try { msgHandler = new MessageHandler(null); msgHandler.setDestination("mme"); @@ -52,7 +52,7 @@ }catch(Exception e) { e.printStackTrace(); - } + }*/ } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 21:26:11 UTC (rev 435) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 21:43:09 UTC (rev 436) @@ -37,6 +37,7 @@ import edu.asu.commons.mme.entity.Location; import edu.asu.commons.mme.entity.Module; import edu.asu.commons.mme.entity.ModuleRoundConfig; +import edu.asu.commons.mme.entity.PsychometricQuestion; import edu.asu.commons.mme.entity.Question; import edu.asu.commons.mme.entity.QuestionGroup; import edu.asu.commons.mme.entity.Round; @@ -207,23 +208,22 @@ { getLogger().debug("game state is NOT null..."); block = newGameState.getCurrentBlock(); - initializeGame(newGameState); + //test saving data in communication + //FIXME: Remove this part if(newGameState.getCurrentBlock().getId() == 1) { Communication communication = new Communication(); communication.setMessage("hello"); communication.setRound(newGameState.getCurrentRound()); - communication.setStudent(studentDao.find(1)); + communication.setStudent(studentDao.find(1L)); Timestamp time = null; - communication.setTimestamp(time); - - communicationDao.save(communication); } + initializeGame(newGameState); msgHandler.sendBlock(newGameState); } @@ -586,19 +586,19 @@ getLogger().info("Starting of the game...." + game.getGameCode()); currentRound = getNextRound(game); - getLogger().info("Next Round object is "+ currentRound.getId()); + // getLogger().info("Next Round object is "+ currentRound.getId()); currentModuleRoundConfig = getModuleRoundConfig(0, currentRound); - getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); + // getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); Module currentModule = getModuleForCurrentRound(currentModuleRoundConfig); - getLogger().info("Next Module object is "+ currentModule.getId()); + // getLogger().info("Next Module object is "+ currentModule.getId()); currentBlock = getBlock(currentModule,1); } else { - getLogger().debug("Current Round is : " + game.getCurrentRound().getId()); - getLogger().debug("Current block is : " + game.getCurrentBlock().getId()); + // getLogger().debug("Current Round is : " + game.getCurrentRound().getId()); + // getLogger().debug("Current block is : " + game.getCurrentBlock().getId()); currentBlock = game.getCurrentBlock(); currentRound = game.getCurrentRound(); if(isModuleFinished(game.getCurrentBlock())) @@ -618,27 +618,27 @@ { //set the next round currentRound = getNextRound(game); - getLogger().info("Next Round object is "+ currentRound.getId()); + // getLogger().info("Next Round object is "+ currentRound.getId()); currentModuleRoundConfig = getModuleRoundConfig(0, currentRound); - getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); +// getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); Module currentModule = getModuleForCurrentRound(currentModuleRoundConfig); - getLogger().info("Next Module object is "+ currentModule.getId()); + // getLogger().info("Next Module object is "+ currentModule.getId()); currentBlock = getBlock(currentModule,1); } } else { - getLogger().debug("current round is not finished"); + //getLogger().debug("current round is not finished"); //currentRound = getNextRound(game.getCurrentRound()); currentModuleRoundConfig = getModuleRoundConfig(getPreviousModuleConfigSequenceNo(game), currentRound); - getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); + //getLogger().info("Next ModuleRound Config object is "+ currentModuleRoundConfig.getId()); Module currentModule = getModuleForCurrentRound(currentModuleRoundConfig); - getLogger().info("Next Module object is "+ currentModule.getId()); + // getLogger().info("Next Module object is "+ currentModule.getId()); currentBlock = getBlock(currentModule,1); @@ -649,12 +649,12 @@ //get the next block in the module //getLogger().debug("currentmodule is " + game.getCurrentBlock().getModule().getId()); currentBlock = getNextBlock(game.getCurrentBlock()); - getLogger().debug("the next block for the game is: " + game.getCurrentBlock().getDescription()); + // getLogger().debug("the next block for the game is: " + game.getCurrentBlock().getDescription()); } } Game newGame = saveGameState(currentBlock,currentRound,game); - getLogger().debug("question group sizes is : " + newGame.getCurrentBlock().getQuestionGroups().size()); + //getLogger().debug("question group sizes is : " + newGame.getCurrentBlock().getQuestionGroups().size()); //initializeCurrentBlock(newGame.getCurrentBlock()); //initializeGame(newGame); getLogger().debug("Module is " + newGame.getCurrentBlock().getModule().getId() + "Block sent to the server is: " + currentBlock.getDescription()); @@ -771,9 +771,10 @@ // TODO Auto-generated method stub try{ Hibernate.initialize(game); - Hibernate.initialize(game.getCurrentBlock()); + //Hibernate.initialize(game.getCurrentBlock()); + if(game.getCurrentBlock() != null) + initializeBlock(game.getCurrentBlock()); - GameConfig gameconfig = game.getGameConfig(); Hibernate.initialize(gameconfig); @@ -799,6 +800,8 @@ while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); + //initializeBlock(block); + Hibernate.initialize(block); List<BlockInformationWindow> infoWindow = block.getInformationWindows(); for(int j = 0; j < infoWindow.size(); j++) @@ -832,7 +835,7 @@ } - private void initializeCurrentBlock(Block block) { + private void initializeBlock(Block block) { Hibernate.initialize(block); Hibernate.initialize(block.getQuestionGroups()); @@ -854,6 +857,13 @@ Iterator<CategoricalOption> categoricalOption = categoricalQ.getCategoricalOptions().iterator(); Hibernate.initialize(categoricalOption); } + if(questions.get(j).getClass().getName().equalsIgnoreCase("edu.asu.commons.mme.entity.PsychometricQuestion")) + { + PsychometricQuestion psychometricQ = (PsychometricQuestion)questions.get(j); + Hibernate.initialize(psychometricQ); + Iterator<String>choices = psychometricQ.getChoices().iterator(); + Hibernate.initialize(choices); + } } } } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2010-01-15 21:26:11 UTC (rev 435) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2010-01-15 21:43:09 UTC (rev 436) @@ -421,6 +421,13 @@ for(int j = 0; j < questions.size(); j++) { Hibernate.initialize(questions.get(j)); + if(questions.get(j).getClass().getName().equalsIgnoreCase("edu.asu.commons.mme.entity.PsychometricQuestion")) + { + PsychometricQuestion psychometricQ = (PsychometricQuestion)questions.get(j); + Hibernate.initialize(psychometricQ); + Iterator<String>choices = psychometricQ.getChoices().iterator(); + Hibernate.initialize(choices); + } if(questions.get(j).getClass().getName().equalsIgnoreCase("edu.asu.commons.mme.entity.CategoricalQuestion")) { CategoricalQuestion categoricalQ = (CategoricalQuestion)questions.get(j); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2010-01-15 21:26:27
|
Revision: 435 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=435&view=rev Author: seematalele Date: 2010-01-15 21:26:11 +0000 (Fri, 15 Jan 2010) Log Message: ----------- added strategy design question type in the database. Modified Paths: -------------- mentalmodels/trunk/src/main/db/init-mme.sql Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2010-01-15 21:23:07 UTC (rev 434) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2010-01-15 21:26:11 UTC (rev 435) @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.1.33, for Win32 (ia32) +-- MySQL dump 10.13 Distrib 5.1.41, for Win64 (unknown) -- -- Host: localhost Database: mme -- ------------------------------------------------------ --- Server version 5.1.33-community +-- Server version 5.1.41-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -651,7 +651,7 @@ LOCK TABLES `question` WRITE; /*!40000 ALTER TABLE `question` DISABLE KEYS */; -INSERT INTO `question` VALUES (1,0,'Most important goal:',1,'categorical',10),(2,0,'Second most important goal:',2,'categorical',10),(3,0,'Third most important goal:',4,'categorical',10),(4,0,'Compared to the most important goal, this goal is',3,'psychometric',10),(7,0,'An example of a scale would be',1,'psychometric',11),(8,0,'<ul>\r<li>Why did you design the strategy the way you did? What did you consider and why do you think your strategy is an adequate solution?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',12),(9,0,'Compared to the most important goal, this goal is',5,'psychometric',10),(10,0,'<b>Most important goal:</b>',1,'categorical',13),(11,0,'<b>Second most important goal:</b>',2,'categorical',13),(12,0,'Compared to the most important goal, this goal is',3,'psychometric',13),(13,0,'<b>Third most important goal:</b>',4,'categorical',13),(14,0,'Compared to the most important goal, this goal is',5,'psychometric',13),(15,0,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',14),(16,0,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',14),(17,0,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',14),(18,0,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',14),(19,0,'Do you perceive the group as a team or as competing players?',5,'psychometric',14),(20,0,'How much do you trust the others in your group?',1,'psychometric',15),(21,0,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',15),(22,0,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',15),(23,1,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',15),(24,1,'How much do you think <i>the others</i> are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',15),(25,0,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',16),(26,0,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',16),(27,0,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',16),(28,0,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',16),(29,0,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',16),(30,0,'How well did you understand the dynamics of the fish population?',1,'psychometric',17),(31,0,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',17),(32,0,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',17),(33,0,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',17),(34,0,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',17),(37,0,'',1,'daybydaydecisions',9),(39,0,'',1,'daybydaydecisions',24),(40,0,'',1,'psychometric',27),(41,0,'… better understand the dynamics of the fish population.',1,'psychometric',29),(42,0,'… better understand the other fishermen in my group.',2,'psychometric',29),(43,0,'… better understand how to design the strategy.',3,'psychometric',29),(44,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',29),(45,0,'… appraise the other fishermen in my group differently. Now I think about the others…',5,'psychometric',29),(46,0,'… better understand the dynamics of the fish population.',1,'psychometric',30),(47,0,'… better understand the other fishermen.',2,'psychometric',30),(48,0,'… better understand how to design the strategy.',3,'psychometric',30),(49,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',30),(50,0,'… appraise the other fishermen in my group differently. Now I think about the others …',5,'psychometric',30),(51,0,'Did the communication have any form of reference to how to fish or design the strategy?',1,'categorical',31),(54,0,'',1,'psychometric',32),(55,0,'',2,'psychometric',32),(56,0,'',3,'psychometric',32),(57,0,'',4,'psychometric',32),(58,0,'',5,'psychometric',32),(59,0,'How clear is it to you, that you have to fish conforming to this rule, agreement or coordination attempt?',1,'psychometric',33),(60,0,'Do you think the other fishermen understood how they have to act according to this rule?<br>I think the others… ',2,'psychometric',33),(61,0,'Will you follow the rule, agreement, or coordination attempt that emerged from communication?<br>I will follow the rule…',3,'psychometric',33),(62,0,'Do you think, the other fishermen in you group will follow the rule, agreement, or coordination attempt?<br>\rI think, the others will… ',4,'psychometric',33),(63,0,'Considering the effects you expect for following the rule and your expectations of how the group will follow the rule, do you think the group will do better or worse due to the rule?',5,'psychometric',33),(64,0,'New understanding of fish dynamics',1,'text',34),(65,0,'New Expectations on how the others of the group will act',2,'text',34),(66,0,'Ideas for improving your strategy',3,'text',34),(67,0,'How interesting was the experiment for you?',1,'psychometric',35),(68,0,'How would you rate the effort you invested to design your strategy?',2,'psychometric',35),(69,0,'How difficult was it to understand the problem?',3,'psychometric',35),(70,0,'How difficult was it to find a good strategy?',4,'psychometric',35),(71,0,'How clear was it what you had to do?',5,'psychometric',35),(72,0,'How many times have you participated in problem solving experiments similar to this one?',1,'text',36),(73,0,'If you already participated in such experiments, when was the last time?',2,'categorical',36),(74,0,'Comments and Feedback',1,'text',37),(75,0,'',1,'daybydaydecisions',40),(77,0,'',1,'daybydaydecisions',55),(78,0,'',1,'psychometric',58),(79,0,'',2,'psychometric',27),(80,0,'I feel the outcomes are:',3,'psychometric',27),(81,0,'',1,'psychometric',59),(82,0,'',2,'psychometric',59),(83,0,'',3,'psychometric',59),(84,0,'',4,'psychometric',59),(85,0,'',5,'psychometric',59),(86,0,'I did not understand the dynamics of the fish population well enough.',1,'psychometric',60),(87,0,'Some of the other fishermen did not understand the dynamics of the fish population well enough.',2,'psychometric',60),(88,0,'The actions of the others in my group did not help my strategy work well.',3,'psychometric',60),(89,0,'Some of the other fishermen acted too reluctantly (harvested too few).',4,'psychometric',60),(90,0,'Some of the other fishermen acted too aggressively (harvested too much).',5,'psychometric',60),(91,0,'The group was too uncoordinated',6,'psychometric',60),(92,0,'The group did not follow the rules or agreements that emerged from the communication enough.',7,'psychometric',60),(93,0,'The rules or agreements that emerged from the communication did not work out well.',8,'psychometric',60),(94,0,'What were the most important reasons for you to deviate from your strategy during the day-by-day decisions?<br>\rIf you did not deviate from your strategy then please write something like \"No difference\" in the text field.',1,'text',61),(95,0,'New understanding of fish dynamics',1,'text',62),(96,0,'New expectations on how the others of the group will act',2,'text',62),(97,0,'Ideas for improving your strategy',3,'text',62),(98,0,'',2,'psychometric',58),(99,0,'I feel the outcomes are:',3,'psychometric',58),(100,0,'',1,'psychometric',63),(101,0,'',2,'psychometric',63),(102,0,'',3,'psychometric',63),(103,0,'',4,'psychometric',63),(104,0,'',5,'psychometric',63),(105,0,'I did not understand the dynamics of the fish population well enough.',1,'psychometric',64),(106,0,'Some of the other fishermen did not understand the dynamics of the fish population well enough',2,'psychometric',64),(107,0,'The actions of the others in my group did not help my strategy work well.',3,'psychometric',64),(108,0,'Some of the other fishermen acted too reluctantly (harvested too few).',4,'psychometric',64),(109,0,'Some of the other fishermen acted too aggressively (harvested too much).',5,'psychometric',64),(110,0,'The group was too uncoordinated',6,'psychometric',64),(111,0,'The group did not follow the rules or agreements that emerged from the communication enough.',7,'psychometric',64),(112,0,'The rules or agreements that emerged from the communication did not work out well.',8,'psychometric',64),(113,0,'What were the most important reasons for you to deviate from your strategy during the day-by-day decisions?<br>\rIf you did not deviate from your strategy then please write something like \"No difference\" in the text field.',1,'text',65),(114,0,'New understanding of fish dynamics',1,'text',66),(115,0,'New expectations on how the others of the group will act',2,'text',66),(116,0,'Ideas for improving your strategy',3,'text',66),(117,0,'Describe in your own words what the rule, agreement, or other coordination attempt states. Describe how you and the others should act and what would happen if one does not act in this way.<br>\rIf you cannot identify any sort of coordination attempt in the communication, write \"no coordination\" in the field below.<br>\r(The information you write in this field will be available the next time you edit your strategy.)',2,'text',31),(118,0,'How often do you play strategy games (i.e. any games where you have to anticipate the moves of other players and plan your own moves ahead, like computer games, card games, board games, etc)?',3,'categorical',36),(120,0,'<ul>\r<li>Why did you design the strategy the way you did? What did you consider and why do you think your strategy is an adequate solution?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',42),(121,0,'Most important goal:',1,'categorical',43),(122,0,'Second most important goal:',2,'categorical',43),(123,0,'Compared to the most important goal, this goal is',3,'psychometric',43),(124,0,'Third most important goal:',4,'categorical',43),(125,0,'Compared to the most important goal, this goal is',5,'psychometric',43),(126,0,'<b>Most important goal:</b>',1,'categorical',44),(127,0,'<b>Second most important goal:</b>',2,'categorical',44),(128,0,'Compared to the most important goal, this goal is',3,'psychometric',44),(129,0,'<b>Third most important goal:</b>',4,'categorical',44),(130,0,'Compared to the most important goal, this goal is',5,'psychometric',44),(131,0,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',45),(132,0,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',45),(133,0,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',45),(134,0,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',45),(135,0,'Do you perceive the group as a team or as competing players?',5,'psychometric',45),(136,0,'How much do you trust the others in your group?',1,'psychometric',46),(137,0,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',46),(138,0,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',46),(139,0,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',46),(140,0,'How much do you think <i>the others</i> are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',46),(141,0,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',47),(142,0,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',47),(143,0,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',47),(144,0,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',47),(145,0,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',47),(146,0,'How well did you understand the dynamics of the fish population?',1,'psychometric',48),(147,0,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',48),(148,0,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',48),(149,0,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',48),(150,0,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',48),(153,0,'',1,'daybydaydecisions',67),(155,1,'',1,'communication',28); +INSERT INTO `question` VALUES (1,0,'Most important goal:',1,'categorical',10),(2,0,'Second most important goal:',2,'categorical',10),(3,0,'Third most important goal:',4,'categorical',10),(4,0,'Compared to the most important goal, this goal is',3,'psychometric',10),(7,0,'An example of a scale would be',1,'psychometric',11),(8,0,'<ul>\r<li>Why did you design the strategy the way you did? What did you consider and why do you think your strategy is an adequate solution?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',12),(9,0,'Compared to the most important goal, this goal is',5,'psychometric',10),(10,0,'<b>Most important goal:</b>',1,'categorical',13),(11,0,'<b>Second most important goal:</b>',2,'categorical',13),(12,0,'Compared to the most important goal, this goal is',3,'psychometric',13),(13,0,'<b>Third most important goal:</b>',4,'categorical',13),(14,0,'Compared to the most important goal, this goal is',5,'psychometric',13),(15,0,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',14),(16,0,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',14),(17,0,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',14),(18,0,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',14),(19,0,'Do you perceive the group as a team or as competing players?',5,'psychometric',14),(20,0,'How much do you trust the others in your group?',1,'psychometric',15),(21,0,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',15),(22,0,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',15),(23,1,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',15),(24,1,'How much do you think <i>the others</i> are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',15),(25,0,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',16),(26,0,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',16),(27,0,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',16),(28,0,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',16),(29,0,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',16),(30,0,'How well did you understand the dynamics of the fish population?',1,'psychometric',17),(31,0,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',17),(32,0,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',17),(33,0,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',17),(34,0,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',17),(37,0,'',1,'strategydesign',9),(39,0,'',1,'daybydaydecisions',24),(40,0,'',1,'psychometric',27),(41,0,'… better understand the dynamics of the fish population.',1,'psychometric',29),(42,0,'… better understand the other fishermen in my group.',2,'psychometric',29),(43,0,'… better understand how to design the strategy.',3,'psychometric',29),(44,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',29),(45,0,'… appraise the other fishermen in my group differently. Now I think about the others…',5,'psychometric',29),(46,0,'… better understand the dynamics of the fish population.',1,'psychometric',30),(47,0,'… better understand the other fishermen.',2,'psychometric',30),(48,0,'… better understand how to design the strategy.',3,'psychometric',30),(49,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',30),(50,0,'… appraise the other fishermen in my group differently. Now I think about the others …',5,'psychometric',30),(51,0,'Did the communication have any form of reference to how to fish or design the strategy?',1,'categorical',31),(54,0,'',1,'psychometric',32),(55,0,'',2,'psychometric',32),(56,0,'',3,'psychometric',32),(57,0,'',4,'psychometric',32),(58,0,'',5,'psychometric',32),(59,0,'How clear is it to you, that you have to fish conforming to this rule, agreement or coordination attempt?',1,'psychometric',33),(60,0,'Do you think the other fishermen understood how they have to act according to this rule?<br>I think the others… ',2,'psychometric',33),(61,0,'Will you follow the rule, agreement, or coordination attempt that emerged from communication?<br>I will follow the rule…',3,'psychometric',33),(62,0,'Do you think, the other fishermen in you group will follow the rule, agreement, or coordination attempt?<br>\rI think, the others will… ',4,'psychometric',33),(63,0,'Considering the effects you expect for following the rule and your expectations of how the group will follow the rule, do you think the group will do better or worse due to the rule?',5,'psychometric',33),(64,0,'New understanding of fish dynamics',1,'text',34),(65,0,'New Expectations on how the others of the group will act',2,'text',34),(66,0,'Ideas for improving your strategy',3,'text',34),(67,0,'How interesting was the experiment for you?',1,'psychometric',35),(68,0,'How would you rate the effort you invested to design your strategy?',2,'psychometric',35),(69,0,'How difficult was it to understand the problem?',3,'psychometric',35),(70,0,'How difficult was it to find a good strategy?',4,'psychometric',35),(71,0,'How clear was it what you had to do?',5,'psychometric',35),(72,0,'How many times have you participated in problem solving experiments similar to this one?',1,'text',36),(73,0,'If you already participated in such experiments, when was the last time?',2,'categorical',36),(74,0,'Comments and Feedback',1,'text',37),(75,0,'',1,'strategydesign',40),(77,0,'',1,'daybydaydecisions',55),(78,0,'',1,'psychometric',58),(79,0,'',2,'psychometric',27),(80,0,'I feel the outcomes are:',3,'psychometric',27),(81,0,'',1,'psychometric',59),(82,0,'',2,'psychometric',59),(83,0,'',3,'psychometric',59),(84,0,'',4,'psychometric',59),(85,0,'',5,'psychometric',59),(86,0,'I did not understand the dynamics of the fish population well enough.',1,'psychometric',60),(87,0,'Some of the other fishermen did not understand the dynamics of the fish population well enough.',2,'psychometric',60),(88,0,'The actions of the others in my group did not help my strategy work well.',3,'psychometric',60),(89,0,'Some of the other fishermen acted too reluctantly (harvested too few).',4,'psychometric',60),(90,0,'Some of the other fishermen acted too aggressively (harvested too much).',5,'psychometric',60),(91,0,'The group was too uncoordinated',6,'psychometric',60),(92,0,'The group did not follow the rules or agreements that emerged from the communication enough.',7,'psychometric',60),(93,0,'The rules or agreements that emerged from the communication did not work out well.',8,'psychometric',60),(94,0,'What were the most important reasons for you to deviate from your strategy during the day-by-day decisions?<br>\rIf you did not deviate from your strategy then please write something like \"No difference\" in the text field.',1,'text',61),(95,0,'New understanding of fish dynamics',1,'text',62),(96,0,'New expectations on how the others of the group will act',2,'text',62),(97,0,'Ideas for improving your strategy',3,'text',62),(98,0,'',2,'psychometric',58),(99,0,'I feel the outcomes are:',3,'psychometric',58),(100,0,'',1,'psychometric',63),(101,0,'',2,'psychometric',63),(102,0,'',3,'psychometric',63),(103,0,'',4,'psychometric',63),(104,0,'',5,'psychometric',63),(105,0,'I did not understand the dynamics of the fish population well enough.',1,'psychometric',64),(106,0,'Some of the other fishermen did not understand the dynamics of the fish population well enough',2,'psychometric',64),(107,0,'The actions of the others in my group did not help my strategy work well.',3,'psychometric',64),(108,0,'Some of the other fishermen acted too reluctantly (harvested too few).',4,'psychometric',64),(109,0,'Some of the other fishermen acted too aggressively (harvested too much).',5,'psychometric',64),(110,0,'The group was too uncoordinated',6,'psychometric',64),(111,0,'The group did not follow the rules or agreements that emerged from the communication enough.',7,'psychometric',64),(112,0,'The rules or agreements that emerged from the communication did not work out well.',8,'psychometric',64),(113,0,'What were the most important reasons for you to deviate from your strategy during the day-by-day decisions?<br>\rIf you did not deviate from your strategy then please write something like \"No difference\" in the text field.',1,'text',65),(114,0,'New understanding of fish dynamics',1,'text',66),(115,0,'New expectations on how the others of the group will act',2,'text',66),(116,0,'Ideas for improving your strategy',3,'text',66),(117,0,'Describe in your own words what the rule, agreement, or other coordination attempt states. Describe how you and the others should act and what would happen if one does not act in this way.<br>\rIf you cannot identify any sort of coordination attempt in the communication, write \"no coordination\" in the field below.<br>\r(The information you write in this field will be available the next time you edit your strategy.)',2,'text',31),(118,0,'How often do you play strategy games (i.e. any games where you have to anticipate the moves of other players and plan your own moves ahead, like computer games, card games, board games, etc)?',3,'categorical',36),(120,0,'<ul>\r<li>Why did you design the strategy the way you did? What did you consider and why do you think your strategy is an adequate solution?</li>\r<li>What actions do you expect from the other fishermen in your group? Why do you think, they might act this way?</li>\r<li>How do you think your strategy will work? Will the fish population grow or shrink in the different bays? What earnings do you expect?</li>\r</ul>\r',1,'text',42),(121,0,'Most important goal:',1,'categorical',43),(122,0,'Second most important goal:',2,'categorical',43),(123,0,'Compared to the most important goal, this goal is',3,'psychometric',43),(124,0,'Third most important goal:',4,'categorical',43),(125,0,'Compared to the most important goal, this goal is',5,'psychometric',43),(126,0,'<b>Most important goal:</b>',1,'categorical',44),(127,0,'<b>Second most important goal:</b>',2,'categorical',44),(128,0,'Compared to the most important goal, this goal is',3,'psychometric',44),(129,0,'<b>Third most important goal:</b>',4,'categorical',44),(130,0,'Compared to the most important goal, this goal is',5,'psychometric',44),(131,0,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',45),(132,0,'How important is it for you what the others think about you and your behavior (i.e. your reputation in the group)?',2,'psychometric',45),(133,0,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',45),(134,0,'What do you think, how important is it for the others that you can reach your goals (i.e. the outcomes are fair)?',4,'psychometric',45),(135,0,'Do you perceive the group as a team or as competing players?',5,'psychometric',45),(136,0,'How much do you trust the others in your group?',1,'psychometric',46),(137,0,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',46),(138,0,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',46),(139,0,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',46),(140,0,'How much do you think <i>the others</i> are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',46),(141,0,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',47),(142,0,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',47),(143,0,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',47),(144,0,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',47),(145,0,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',47),(146,0,'How well did you understand the dynamics of the fish population?',1,'psychometric',48),(147,0,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',48),(148,0,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',48),(149,0,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',48),(150,0,'Would you classify your strategy as ‘safe’ in the sense of having acceptable but suboptimal results for sure, or rather as ‘risky’ in the sense of having the optimal results if everything runs like expected or very poor results otherwise?',5,'psychometric',48),(153,0,'',1,'daybydaydecisions',67),(155,1,'',1,'communication',28); /*!40000 ALTER TABLE `question` ENABLE KEYS */; UNLOCK TABLES; @@ -906,4 +906,4 @@ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2010-01-12 21:34:16 +-- Dump completed on 2010-01-15 13:56:08 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2010-01-15 21:23:13
|
Revision: 434 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=434&view=rev Author: kjonas Date: 2010-01-15 21:23:07 +0000 (Fri, 15 Jan 2010) Log Message: ----------- updated swf files Modified Paths: -------------- mentalmodels/trunk/pom.xml mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf mentalmodels/trunk/src/main/webapp/StartGame.html mentalmodels/trunk/src/main/webapp/StartGame.swf Modified: mentalmodels/trunk/pom.xml =================================================================== --- mentalmodels/trunk/pom.xml 2010-01-15 21:20:31 UTC (rev 433) +++ mentalmodels/trunk/pom.xml 2010-01-15 21:23:07 UTC (rev 434) @@ -56,6 +56,11 @@ <version>2.5.6</version> </dependency> <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-test</artifactId> + <version>2.5.6.SEC01</version> +</dependency> + <dependency> <groupId>org.springframework.flex</groupId> <artifactId>spring-flex</artifactId> <version>1.0.0.RC2</version> Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html =================================================================== --- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html 2010-01-15 21:20:31 UTC (rev 433) +++ mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html 2010-01-15 21:23:07 UTC (rev 434) @@ -28,15 +28,6 @@ <style> body { margin: 0px; overflow:hidden } </style> - -<script language="JavaScript"> - window.onbeforeunload = confirmExit; - function confirmExit() - { - return "If you are connected to the server, you will be disconnected if the page closes. Students in the experiment will be removed if the window closes."; - } -</script> - <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- @@ -53,12 +44,8 @@ </head> <body scroll="no"> - <script language="JavaScript" type="text/javascript"> <!-- - -var clientIP = '<!--#echo var="REMOTE_ADDR"-->'; - // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); @@ -70,12 +57,12 @@ // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; var MMredirectURL = window.location; - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var MMdoctitle = document.title; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; AC_FL_RunContent( "src", "playerProductInstall", - "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'&ip=test'+clientIP+"", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", "width", "100%", "height", "100%", "align", "middle", @@ -95,30 +82,27 @@ "width", "100%", "height", "100%", "align", "middle", - "valign", "middle", "id", "FisheryExperimentShell", "quality", "high", "bgcolor", "#869ca7", "name", "FisheryExperimentShell", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer", - "FlashVars", "ip=test"+clientIP+"" + "pluginspage", "http://www.adobe.com/go/getflashplayer" ); -} else { // flash is too old or we can't detect the plugin - var alternateContent = 'Alternate HTML content should be placed here. ' - + 'This content requires the Adobe Flash Player. ' - + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; - document.write(alternateContent); // insert non-flash content + } else { // flash is too old or we can't detect the plugin + var alternateContent = 'Alternate HTML content should be placed here. ' + + 'This content requires the Adobe Flash Player. ' + + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; + document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> - <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="FisheryExperimentShell" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="FisheryExperimentShell.swf" /> - <PARAM NAME=FlashVars VALUE="ip=test${clientIP}"> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html =================================================================== --- mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html 2010-01-15 21:20:31 UTC (rev 433) +++ mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html 2010-01-15 21:23:07 UTC (rev 434) @@ -28,15 +28,6 @@ <style> body { margin: 0px; overflow:hidden } </style> - -<script language="JavaScript"> - window.onbeforeunload = confirmExit; - function confirmExit() - { - return "If you are connected to the server, you will be disconnected if the page closes. Students in the experiment will be removed if the window closes."; - } -</script> - <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- @@ -53,12 +44,8 @@ </head> <body scroll="no"> - <script language="JavaScript" type="text/javascript"> <!-- - -var clientIP = '<!--#echo var="REMOTE_ADDR"-->'; - // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); @@ -70,12 +57,12 @@ // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; var MMredirectURL = window.location; - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var MMdoctitle = document.title; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; AC_FL_RunContent( "src", "playerProductInstall", - "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'&ip=test'+clientIP+"", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", "width", "100%", "height", "100%", "align", "middle", @@ -95,30 +82,27 @@ "width", "100%", "height", "100%", "align", "middle", - "valign", "middle", "id", "InitialiseDatabase", "quality", "high", "bgcolor", "#869ca7", "name", "InitialiseDatabase", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer", - "FlashVars", "ip=test"+clientIP+"" + "pluginspage", "http://www.adobe.com/go/getflashplayer" ); -} else { // flash is too old or we can't detect the plugin - var alternateContent = 'Alternate HTML content should be placed here. ' - + 'This content requires the Adobe Flash Player. ' - + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; - document.write(alternateContent); // insert non-flash content + } else { // flash is too old or we can't detect the plugin + var alternateContent = 'Alternate HTML content should be placed here. ' + + 'This content requires the Adobe Flash Player. ' + + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; + document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> - <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="InitialiseDatabase" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="InitialiseDatabase.swf" /> - <PARAM NAME=FlashVars VALUE="ip=test${clientIP}"> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/StartGame.html =================================================================== --- mentalmodels/trunk/src/main/webapp/StartGame.html 2010-01-15 21:20:31 UTC (rev 433) +++ mentalmodels/trunk/src/main/webapp/StartGame.html 2010-01-15 21:23:07 UTC (rev 434) @@ -28,15 +28,6 @@ <style> body { margin: 0px; overflow:hidden } </style> - -<script language="JavaScript"> - window.onbeforeunload = confirmExit; - function confirmExit() - { - return "If you are connected to the server, you will be disconnected if the page closes. Students in the experiment will be removed if the window closes."; - } -</script> - <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- @@ -53,12 +44,8 @@ </head> <body scroll="no"> - <script language="JavaScript" type="text/javascript"> <!-- - -var clientIP = '<!--#echo var="REMOTE_ADDR"-->'; - // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); @@ -70,12 +57,12 @@ // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; var MMredirectURL = window.location; - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var MMdoctitle = document.title; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; AC_FL_RunContent( "src", "playerProductInstall", - "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'&ip=test'+clientIP+"", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", "width", "100%", "height", "100%", "align", "middle", @@ -95,30 +82,27 @@ "width", "100%", "height", "100%", "align", "middle", - "valign", "middle", "id", "StartGame", "quality", "high", "bgcolor", "#869ca7", "name", "StartGame", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer", - "FlashVars", "ip=test"+clientIP+"" + "pluginspage", "http://www.adobe.com/go/getflashplayer" ); -} else { // flash is too old or we can't detect the plugin - var alternateContent = 'Alternate HTML content should be placed here. ' - + 'This content requires the Adobe Flash Player. ' - + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; - document.write(alternateContent); // insert non-flash content + } else { // flash is too old or we can't detect the plugin + var alternateContent = 'Alternate HTML content should be placed here. ' + + 'This content requires the Adobe Flash Player. ' + + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; + document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> - <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="StartGame" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="StartGame.swf" /> - <PARAM NAME=FlashVars VALUE="ip=test${clientIP}"> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> 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. |
From: <kj...@us...> - 2010-01-15 21:20:38
|
Revision: 433 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=433&view=rev Author: kjonas Date: 2010-01-15 21:20:31 +0000 (Fri, 15 Jan 2010) Log Message: ----------- error-testing in progress in InstructionPage.mxml changed planner, strategy design to new specs Modified Paths: -------------- mentalmodels/trunk/flex/src/custom/CommunicationC.mxml mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/flex/src/custom/InstructionPage.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml mentalmodels/trunk/flex/src/test.mxml Modified: mentalmodels/trunk/flex/src/custom/CommunicationC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/CommunicationC.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/custom/CommunicationC.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -42,10 +42,13 @@ tempCommunication.timestamp = new Date(); tempCommunication.message = txtMessage.text; tempCommunication.student = DataModel.instance.studentObject; - tempCommunication.round = DataModel.instance.gameObject.currentRound; + if(DataModel.instance.gameObject != null) + { + tempCommunication.round = DataModel.instance.gameObject.currentRound; + communicationService.saveCommunication(tempCommunication); + } txtMessage.text = ""; - communicationService.saveCommunication(tempCommunication); } public function btnSelfComm_click():void { Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -353,7 +353,7 @@ var strategy:StrategyDesignQuestionC = StrategyDesignQuestionC(curr.getChildAt(j)); var tempDBObjects:ArrayCollection = strategy.toDatabaseObject(); - roundObject = strategy.notRepeated.round; + roundObject = strategy.repeated.round; for(var k:int=0;k<tempDBObjects.length;k++) { Modified: mentalmodels/trunk/flex/src/custom/InstructionPage.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -97,7 +97,7 @@ }catch(errObject:Error){ // worst case scenario... still needs to have a pagedisplay debug2.text += "pageDisplay creation failure\n" + - errObject.message +"\n"+ errObject.getStackTrace() +"\n"; + errObject.name +"\n"+ errObject.message +"\n"+ errObject.getStackTrace() +"\n"; pageDisplay = new PageDisplay(makeBlock(),0,locations); // Alert.show(debug2.text); } Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/Planner.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:comp="custom.*" - width="350" height="200" - borderStyle="solid" verticalScrollPolicy="off" horizontalScrollPolicy="off"> + borderStyle="solid" verticalScrollPolicy="off" horizontalScrollPolicy="off" + width="350" height="200" creationComplete="init()"> <mx:Script> <![CDATA[ Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -9,30 +9,8 @@ ]]> </mx:Script> - <mx:HBox> - <mx:VBox> - <mx:Label text="Not Repeated decisions (start-up)" fontSize="18"/> - <qComp:Planner id="notRepeated"/> - </mx:VBox> - <mx:VBox> - <mx:Label text="Repeated decisions (after start-up)" fontSize="18"/> - <qComp:Planner id="repeated" valueRequired="true"/> - </mx:VBox> - </mx:HBox> + <qComp:Planner id="repeated" valueRequired="true"/> - <mx:HBox> - <mx:Label text="Suspend repetition:" fontWeight="bold" width="130"/> - <mx:Label text="If during one repetition"/> - <mx:NumericStepper id="suspendWeight" value="5" minimum="0.1" maximum="100" stepSize="0.1" height="20" width="50"/> - <mx:Label text="lbs could not be fished,"/> - </mx:HBox> - <mx:HBox> - <mx:Label width="113"/> - <mx:Label text="then stay in the harbor for"/> - <mx:NumericStepper id="suspendDays" value="1" minimum="0" maximum="30" stepSize="1" height="20" width="50"/> - <mx:Label text="days before starting the next repetition."/> - </mx:HBox> - <mx:RemoteObject id="GameService" destination="gameService" fault="faultHandler(event)"> <mx:method name="getCurrentRoundNo" result="roundResultHandler(event)"/> </mx:RemoteObject> @@ -68,42 +46,33 @@ } public function setRound(newRound:Round):void { - repeated.round = notRepeated.round = newRound; + repeated.round = newRound; } public function faultHandler(event:FaultEvent):void { Alert.show("Error finding round for Strategy Design!"); - repeated.round = notRepeated.round = null; + repeated.round = null; } - public function getNotRepeated():ArrayCollection - { return notRepeated.save(); } - public function getRepeated():ArrayCollection { return repeated.save(); } public function accept():Boolean { - return repeated.hasBeenChanged || notRepeated.hasBeenChanged; + return repeated.hasBeenChanged; } public function save():ArrayCollection { var saveArray:ArrayCollection = new ArrayCollection(); - saveArray.addItem(notRepeated.save()); saveArray.addItem(repeated.save()); - saveArray.addItem(suspendWeight.value); - saveArray.addItem(suspendDays.value); return saveArray; } public function load(loadArray:ArrayCollection):void { - if(notRepeated == null || repeated == null || loadArray == null) return; - notRepeated.load(loadArray.getItemAt(0) as ArrayCollection); + if(repeated == null || loadArray == null) return; repeated.load(loadArray.getItemAt(1) as ArrayCollection); - suspendWeight.value = loadArray.getItemAt(2) as Number; - suspendDays.value = loadArray.getItemAt(3) as Number; } public function loadFromQuestion(question:Question):void @@ -113,9 +82,7 @@ initialize(); init(); - notRepeated.locations = locations; repeated.locations = locations; - notRepeated.init(); repeated.init(); } @@ -124,26 +91,10 @@ var array:ArrayCollection = new ArrayCollection(); var tempObject:StudentStrategy; - var notRepeatedArray:ArrayCollection = notRepeated.save(); var repeatedArray:ArrayCollection = repeated.save(); var i:int; var tempArray:ArrayCollection; - - for(i=0;i<notRepeatedArray.length;i++) - { - tempArray = notRepeatedArray.getItemAt(i) as ArrayCollection; - tempObject = new StudentStrategy(); - tempObject.location = strToLocation(tempArray.getItemAt(0) as String); - tempObject.days = int(tempArray.getItemAt(1) as Number); - tempObject.threshold = (tempArray.getItemAt(2) as Number); - tempObject.round = notRepeated.round; - - tempObject.allocationSeqNo = i; - tempObject.repeatedDecision = false; - - array.addItem(tempObject); - } for(i=0;i<repeatedArray.length;i++) { tempArray = repeatedArray.getItemAt(i) as ArrayCollection; @@ -153,7 +104,7 @@ tempObject.threshold = (tempArray.getItemAt(2) as Number); tempObject.round = repeated.round; - tempObject.allocationSeqNo = i+notRepeatedArray.length; + tempObject.allocationSeqNo = i; tempObject.repeatedDecision = true; array.addItem(tempObject); Modified: mentalmodels/trunk/flex/src/test.mxml =================================================================== --- mentalmodels/trunk/flex/src/test.mxml 2010-01-15 20:38:59 UTC (rev 432) +++ mentalmodels/trunk/flex/src/test.mxml 2010-01-15 21:20:31 UTC (rev 433) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:actionscript="actionscript.*" xmlns:custom="custom.*"> +<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:actionscript="actionscript.*" xmlns:custom="custom.*" xmlns:strategyDesign="custom.questions.strategyDesign.*"> <custom:CommunicationC/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2010-01-15 21:13:42
|
return from lunch at 14:15pm On Fri, Jan 15, 2010 at 1:41 PM, Kalin Jonas <kj...@as...> wrote: > lunch at 13:45pm (2.25hr) > > > On Fri, Jan 15, 2010 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: > >> Coming in to work today at 11:30am >> I will be working on modifying the Strategy design component as per my >> last discussion with Seema on the topic. >> >> >> On Wed, Jan 13, 2010 at 4:47 PM, Kalin Jonas <kj...@as...> wrote: >> >>> checking out at 16:45pm (3.5hr) >>> Working on resolving communication problem. the messages are being >>> sent to the server, just not pushed back to all clients. >>> >>> On 1/13/10, Kalin Jonas <kj...@as...> wrote: >>> > coming in to work today at 13:15 pm >>> > I'm still trying to get the laptop at home set up for working in flex. >>> > also working on fixing the errors that I left behind yesterday >>> > >>> > On 1/12/10, Kalin Jonas <kj...@as...> wrote: >>> >> Leaving at 16:15(1.5hr) >>> >> worked with seema on the communication problem, making headway >>> >> must fix problem - communication component does not keep track of >>> student >>> >> yet. >>> >> >>> >> On Tue, Jan 12, 2010 at 2:47 PM, Kalin Jonas <kj...@as...> wrote: >>> >> >>> >>> Returning at 14:45 >>> >>> working on second laptop via remote desktop to set it up for flex >>> work. >>> >>> >>> >>> >>> >>> On Tue, Jan 12, 2010 at 2:15 PM, Kalin Jonas <kj...@as...> wrote: >>> >>> >>> >>>> checking out for lunch at 14:15pm (4hr) >>> >>>> linux trial has expired, and therefore no progress has been made. >>> >>>> working >>> >>>> on another computer to try and set it up for use. >>> >>>> >>> >>>> >>> >>>> On Tue, Jan 12, 2010 at 10:10 AM, Kalin Jonas <kj...@as...> >>> wrote: >>> >>>> >>> >>>>> Coming in to work today at 10:15am. >>> >>>>> I will be working on the new Strategy Design component as Seema and >>> I >>> >>>>> discussed: it will have only one list of actions (repeated) and I >>> will >>> >>>>> be >>> >>>>> removing the SuspendRepetition functionality. >>> >>>>> I will begin by backing up the old component now. >>> >>>>> >>> >>>> >>> >>>> >>> >>> >>> >> >>> > >>> >> >> > |
From: Kalin J. <kj...@as...> - 2010-01-15 20:41:17
|
lunch at 13:45pm (2.25hr) On Fri, Jan 15, 2010 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: > Coming in to work today at 11:30am > I will be working on modifying the Strategy design component as per my last > discussion with Seema on the topic. > > > On Wed, Jan 13, 2010 at 4:47 PM, Kalin Jonas <kj...@as...> wrote: > >> checking out at 16:45pm (3.5hr) >> Working on resolving communication problem. the messages are being >> sent to the server, just not pushed back to all clients. >> >> On 1/13/10, Kalin Jonas <kj...@as...> wrote: >> > coming in to work today at 13:15 pm >> > I'm still trying to get the laptop at home set up for working in flex. >> > also working on fixing the errors that I left behind yesterday >> > >> > On 1/12/10, Kalin Jonas <kj...@as...> wrote: >> >> Leaving at 16:15(1.5hr) >> >> worked with seema on the communication problem, making headway >> >> must fix problem - communication component does not keep track of >> student >> >> yet. >> >> >> >> On Tue, Jan 12, 2010 at 2:47 PM, Kalin Jonas <kj...@as...> wrote: >> >> >> >>> Returning at 14:45 >> >>> working on second laptop via remote desktop to set it up for flex >> work. >> >>> >> >>> >> >>> On Tue, Jan 12, 2010 at 2:15 PM, Kalin Jonas <kj...@as...> wrote: >> >>> >> >>>> checking out for lunch at 14:15pm (4hr) >> >>>> linux trial has expired, and therefore no progress has been made. >> >>>> working >> >>>> on another computer to try and set it up for use. >> >>>> >> >>>> >> >>>> On Tue, Jan 12, 2010 at 10:10 AM, Kalin Jonas <kj...@as...> >> wrote: >> >>>> >> >>>>> Coming in to work today at 10:15am. >> >>>>> I will be working on the new Strategy Design component as Seema and >> I >> >>>>> discussed: it will have only one list of actions (repeated) and I >> will >> >>>>> be >> >>>>> removing the SuspendRepetition functionality. >> >>>>> I will begin by backing up the old component now. >> >>>>> >> >>>> >> >>>> >> >>> >> >> >> > >> > > |
From: <kj...@us...> - 2010-01-15 20:39:10
|
Revision: 432 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=432&view=rev Author: kjonas Date: 2010-01-15 20:38:59 +0000 (Fri, 15 Jan 2010) Log Message: ----------- Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 20:19:26 UTC (rev 431) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 20:38:59 UTC (rev 432) @@ -154,20 +154,21 @@ public boolean startGame(Game game) { boolean flag = false; - - if(isSufficientStudents(game)) + Game hibernateGame = getDao().find(game.getId()); + if(isSufficientStudents(hibernateGame)) { - assignGroups(game); + assignGroups(hibernateGame); getLogger().debug("system has assigned groups. "); - pushBlock(game); + pushBlock(hibernateGame); flag = true; } else { flag = false; } - + return flag; + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-15 20:31:16
|
close / open gate button bugged ------------------------------- Key: COMMONS-14 URL: http://opensource.asu.edu/jira/browse/COMMONS-14 Project: The Virtual Commons Issue Type: Bug Components: irrigation Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 Reporter: Allen Lee Assignee: Allen Lee Fix For: irrigation.asu.fall.2009 Occasionally in the practice round it seems that the open gate / close gate button doesn't actually close the gate (though it changes the text of the button properly). No stack trace or other error messages pop up in the console or on the server side though. Mysterious.. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-01-15 20:19:33
|
Revision: 431 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=431&view=rev Author: alllee Date: 2010-01-15 20:19:26 +0000 (Fri, 15 Jan 2010) Log Message: ----------- removing defunct PauseRequest, fixing http://opensource.asu.edu/jira/browse/COMMONS-6 removing send button from chat panel Modified Paths: -------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalAnimationPanel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/EndRoundEvent.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/ClientData.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml Removed Paths: ------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/PauseRequest.java Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalAnimationPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalAnimationPanel.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalAnimationPanel.java 2010-01-15 20:19:26 UTC (rev 431) @@ -490,16 +490,15 @@ public void openGates(int priority) { gate[priority].setGateOpen(true); // set the height of all the canal panels depending on the state of the game - repaint(); } public void closeGates(int priority) { gate[priority].setGateOpen(false); - gate[priority].setx1(gate[priority].getdefaultx1()); - gate[priority].sety1(gate[priority].getdefaulty1()); +// gate[priority].setx1(gate[priority].getdefaultx1()); +// gate[priority].sety1(gate[priority].getdefaulty1()); /*if(!(priority == 0)) gate[priority].setHeight(gate[priority-1].getHeight());*/ - repaint(); +// repaint(); } public void endRound() { Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-01-15 20:19:26 UTC (rev 431) @@ -398,17 +398,14 @@ public void openGate(int priority) { gate[priority].setGateOpen(true); // paintComponent(graphics2D); - repaint(); - +// repaint(); } public void closeGate(int priority) { gate[priority].setGateOpen(false); - gate[priority].setx1(gate[priority].getdefaultx1()); - gate[priority].sety1(gate[priority].getdefaulty1()); - /*if(!(priority == 0)) - gate[priority].setHeight(gate[priority-1].getHeight());*/ - repaint(); +// gate[priority].setx1(gate[priority].getdefaultx1()); +// gate[priority].sety1(gate[priority].getdefaulty1()); +// repaint(); } public void startRound() { Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java 2010-01-15 20:19:26 UTC (rev 431) @@ -2,15 +2,12 @@ import java.awt.BorderLayout; import java.awt.Color; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.swing.JButton; import javax.swing.JEditorPane; import javax.swing.JPanel; import javax.swing.JProgressBar; @@ -77,12 +74,12 @@ } } }); - final JButton sendButton = new JButton("Send"); - sendButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - sendMessage(); - } - }); +// final JButton sendButton = new JButton("Send"); +// sendButton.addActionListener(new ActionListener() { +// public void actionPerformed(ActionEvent event) { +// sendMessage(); +// } +// }); JPanel timeLeftPanel = new JPanel(); timeLeftProgressBar = new JProgressBar(0, 60); timeLeftProgressBar.setStringPainted(true); @@ -91,7 +88,7 @@ add(timeLeftPanel, BorderLayout.PAGE_START); add(chatField, BorderLayout.CENTER); - add(sendButton, BorderLayout.PAGE_END); +// add(sendButton, BorderLayout.PAGE_END); } private void sendMessage() { Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java 2010-01-15 20:19:26 UTC (rev 431) @@ -1,8 +1,9 @@ package edu.asu.commons.irrigation.client; /** + * FIXME: Refactor this class. + * * @author Sanket - * */ public class Gate { @@ -143,6 +144,10 @@ public void setGateOpen(boolean gateOpen) { this.gateOpen = gateOpen; + if (! gateOpen) { + setx1(getdefaultx1()); + sety1(getdefaulty1()); + } } public int getOpeningsHeight() { Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java 2010-01-15 20:19:26 UTC (rev 431) @@ -19,7 +19,6 @@ import edu.asu.commons.irrigation.events.InfrastructureUpdateEvent; import edu.asu.commons.irrigation.events.InvestedTokensEvent; import edu.asu.commons.irrigation.events.OpenGateEvent; -import edu.asu.commons.irrigation.events.PauseRequest; import edu.asu.commons.irrigation.events.RegistrationEvent; import edu.asu.commons.irrigation.events.RoundStartedEvent; import edu.asu.commons.irrigation.events.ShowGameScreenshotRequest; @@ -126,12 +125,6 @@ transmit(investedTokensEvent); } - /** - * Transmitting the file string , that is the file chosen for the current - * file download - * - * @param fileNo - */ public void openGate() { OpenGateEvent openGateEvent = new OpenGateEvent(getId()); transmit(openGateEvent); @@ -141,11 +134,6 @@ CloseGateEvent closeGateEvent = new CloseGateEvent(getId()); transmit(closeGateEvent); } - - public void pause() { - PauseRequest pauseRequest = new PauseRequest(getId()); - transmit(pauseRequest); - } public void transmit(Event event) { clientDispatcher.transmit(event); @@ -181,7 +169,7 @@ }); channel.add(this, new EventTypeProcessor<EndRoundEvent>(EndRoundEvent.class) { public void handle(EndRoundEvent event) { - clientDataModel.setGroupDataModel(event.getClientData().getGroupDataModel()); + clientDataModel.setGroupDataModel(event.getGroupDataModel()); experimentGameWindow.endRound(event); } }); Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/MainIrrigationGameWindow.java 2010-01-15 20:19:26 UTC (rev 431) @@ -397,12 +397,9 @@ if (clientData.isGateOpen()) { canalPanel.openGate(clientData.getPriority()); } - else if(clientData.isPaused()){ + else { canalPanel.closeGate(clientData.getPriority()); } - else if(clientData.isGateClosed()){ - canalPanel.closeGate(clientData.getPriority()); - } } ClientData clientData = clientDataModel.getClientData(); // getWaterCollectedTextField().setText("" + clientData.getWaterCollected()); Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/EndRoundEvent.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/EndRoundEvent.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/EndRoundEvent.java 2010-01-15 20:19:26 UTC (rev 431) @@ -1,17 +1,12 @@ package edu.asu.commons.irrigation.events; -import java.util.Map; - import edu.asu.commons.event.AbstractEvent; import edu.asu.commons.event.ExperimentUpdateEvent; -import edu.asu.commons.irrigation.server.ClientData; import edu.asu.commons.irrigation.server.GroupDataModel; import edu.asu.commons.net.Identifier; /** - * @author Sanket - * carries all the information till the end of the round. - * + * Conveys the GroupDataModel and a lastRound boolean flag to the relevant clients. */ public class EndRoundEvent extends AbstractEvent implements ExperimentUpdateEvent { @@ -26,17 +21,9 @@ this.lastRound = lastRound; this.groupDataModel = groupDataModel; } - /** - * returns all the clients in this group - * @return - */ - - public Map<Identifier, ClientData> getClientDataMap(){ - return groupDataModel.getClientDataMap(); - } - public ClientData getClientData() { - return getClientDataMap().get(id); + public GroupDataModel getGroupDataModel() { + return groupDataModel; } public boolean isLastRound(){ Deleted: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/PauseRequest.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/PauseRequest.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/PauseRequest.java 2010-01-15 20:19:26 UTC (rev 431) @@ -1,32 +0,0 @@ -package edu.asu.commons.irrigation.events; - -import edu.asu.commons.event.AbstractPersistableEvent; -import edu.asu.commons.net.Identifier; - -/** - * $Id$ - * - * Client request to pause flow. Not always allowed. - * - * - * @author <a href='mailto:All...@as...'>Allen Lee</a> - * @version $Rev$ - */ -public class PauseRequest extends AbstractPersistableEvent { - - private static final long serialVersionUID = 5080329943962617402L; - - public PauseRequest(Identifier id) { - super(id); - } - - /** - * Copy constructor - used to reconstruct on the server-side and guarantee uniqueness / sort-order. - * - * @param pauseRequest - */ - public PauseRequest(PauseRequest pauseRequest) { - super(pauseRequest.id); - } - -} Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/ClientData.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/ClientData.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/ClientData.java 2010-01-15 20:19:26 UTC (rev 431) @@ -39,18 +39,12 @@ private int totalTokens; - private boolean paused = false; - private boolean gateOpen = false; public ClientData(Identifier id) { this.id = id; } - public boolean isPaused(){ - return paused; - } - public boolean isGateClosed(){ return ! gateOpen; } @@ -86,35 +80,16 @@ return "Position not found"; } - /** - * here the parameters isPaused, isStopped and isStartDownload would change. - * The server every time would check the clients queue. It would be a queue of clients requests. - * and it then would check these bits...and then act accordingly. These would be the operations - * that the users are allowed to do. - */ - public void openGate(){ gateOpen = true; - paused = false; } - public void pause(){ - paused = true; - gateOpen = false; - } - - public void unpause() { - paused = false; - gateOpen = true; - } - public void closeGate(){ gateOpen = false; - paused = false; } /** - * get and set the TOkens that are contributed by this client. + * get and set the Tokens that are contributed by this client. * * @param contributedTokens */ public void setInvestedTokens(int investedTokens) { @@ -142,19 +117,19 @@ public void setRoundConfiguration(RoundConfiguration roundConfiguration) { this.roundConfiguration = roundConfiguration; } -/** - * clearing the clientData at the end of each round - * - */ - public void endRound() { + + /** + * Resets this client data's instance variables at the end of the round. + * + */ + public void resetEndRound() { closeGate(); investedTokens = 0; - //adding number of files to be downloaded = 0 per round waterCollected = 0; } public void resetAllTokens() { - endRound(); + resetEndRound(); totalTokens = 0; } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java 2010-01-15 20:19:26 UTC (rev 431) @@ -26,7 +26,6 @@ import edu.asu.commons.irrigation.events.InfrastructureUpdateEvent; import edu.asu.commons.irrigation.events.InvestedTokensEvent; import edu.asu.commons.irrigation.events.OpenGateEvent; -import edu.asu.commons.irrigation.events.PauseRequest; import edu.asu.commons.irrigation.events.QuizResponseEvent; import edu.asu.commons.irrigation.events.RegistrationEvent; import edu.asu.commons.irrigation.events.RoundStartedEvent; @@ -287,11 +286,6 @@ clients.get(event.getId()).closeGate(); } }); - addEventProcessor(new EventTypeProcessor<PauseRequest>(PauseRequest.class) { - public void handle(PauseRequest event) { - clients.get(event.getId()).pause(); - } - }); } private boolean isTokenInvestmentComplete() { @@ -344,13 +338,9 @@ if (clientData.isGateOpen()) { group.allocateWater(clientData); } - else if (clientData.isGateClosed()) { + else { clientData.init(group.getAvailableClientFlowCapacity()); } - // right now the clients cannot be paused. - else if (clientData.isPaused()) { - - } } for (Identifier id: group.getClientIdentifiers()) { ClientUpdateEvent clientUpdateEvent = new ClientUpdateEvent(id, group, timeLeft); @@ -441,9 +431,17 @@ //Send the end round event to the facilitator //Send the end round event to all the clients synchronized (clients) { + // add collected tokens to total if this isn't a practice round. + if (! getRoundConfiguration().isPracticeRound()) { + // first add tokens + for (ClientData data : clients.values()) { + data.addTokensEarnedThisRoundToTotal(); + } + } for (ClientData data : clients.values()) { - data.addTokensEarnedThisRoundToTotal(); - transmit(new EndRoundEvent(data.getId(), data.getGroupDataModel(), getConfiguration().isLastRound())); + transmit(new EndRoundEvent(data.getId(), + data.getGroupDataModel(), + getConfiguration().isLastRound())); } } transmit(new FacilitatorEndRoundEvent(facilitatorId, serverDataModel)); @@ -458,12 +456,7 @@ // reset client data values synchronized (clients) { for (ClientData clientData: clients.values()) { - if (getConfiguration().getCurrentParameters().isPracticeRound()) { - clientData.resetAllTokens(); - } - else { - clientData.endRound(); - } + clientData.resetEndRound(); } } submittedClients = 0; Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml 2010-01-15 19:27:15 UTC (rev 430) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/irrigation.xml 2010-01-15 20:19:26 UTC (rev 431) @@ -304,9 +304,8 @@ </p> <p> You can send messages by typing in the text field at the bottom of the screen -and then pressing the return key or clicking the send button. The time left -for the discussion is displayed with a progress bar above the text field at -the bottom of the screen. +and then pressing the return key. The time left for the discussion is displayed with +a progress bar above the text field at the bottom of the screen. </p> ]]> </entry> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-15 19:54:21
|
[ http://opensource.asu.edu/jira/browse/COMMONS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee resolved COMMONS-6. ----------------------------- Resolution: Fixed Was caused by sending notifications to participants before updating all of their tokens > inaccurate total earnings for other participants in debriefing > -------------------------------------------------------------- > > Key: COMMONS-6 > URL: http://opensource.asu.edu/jira/browse/COMMONS-6 > Project: The Virtual Commons > Issue Type: Bug > Reporter: Allen Lee > Assignee: Allen Lee > > The debriefing information isn't getting updated properly. Specifically, the total earnings isn't accurate for the other participants (but is accurate for the current participant). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <kj...@us...> - 2010-01-15 19:27:23
|
Revision: 430 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=430&view=rev Author: kjonas Date: 2010-01-15 19:27:15 +0000 (Fri, 15 Jan 2010) Log Message: ----------- 1) Removed the unwanted getlogger().debug messages from QuestionCreatorService.java Bugs - 1) Due to some reason saveCommunication() in Communication Service is no working. Data base insert is not working properly. Getting Assertion failure. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/PsychometricQuestion.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2010-01-15 19:27:15 UTC (rev 430) @@ -4,6 +4,7 @@ import java.io.Serializable; import java.sql.Timestamp; +import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @@ -27,7 +28,7 @@ @Lob private String message; - + @Column private Timestamp timestamp; @ManyToOne Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/PsychometricQuestion.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/PsychometricQuestion.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/PsychometricQuestion.java 2010-01-15 19:27:15 UTC (rev 430) @@ -23,7 +23,7 @@ @Column(name="max_slider_value",nullable=false) private Integer maxSliderValue; - @CollectionOfElements(fetch = FetchType.EAGER) + @CollectionOfElements private List<String> choices = new ArrayList<String>(); public void setChoices(List<String> choices) { Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-15 19:27:15 UTC (rev 430) @@ -49,9 +49,9 @@ for(int i = 0; i < studentResponses.size(); i++ ) { clientStudentResponse = (StudentResponse) studentResponses.get(i); - getLogger().debug("Question is: " + clientStudentResponse.getQuestion()); - getLogger().debug("Response is: " + clientStudentResponse.getResponse()); - getLogger().debug("Student is: " + clientStudentResponse.getStudent()); + //getLogger().debug("Question is: " + clientStudentResponse.getQuestion()); + //getLogger().debug("Response is: " + clientStudentResponse.getResponse()); + //getLogger().debug("Student is: " + clientStudentResponse.getStudent()); studentResponse = new StudentResponse(); studentResponse.setQuestion(clientStudentResponse.getQuestion()); studentResponse.setResponse(clientStudentResponse.getResponse()); Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/CommunicationService.java 2010-01-15 19:27:15 UTC (rev 430) @@ -1,12 +1,25 @@ package edu.asu.commons.mme.service; +import org.springframework.transaction.annotation.Transactional; + import edu.asu.commons.mme.dao.HibernateCommunicationDao; +import edu.asu.commons.mme.dao.HibernateRoundConfigDao; +import edu.asu.commons.mme.dao.HibernateStudentDao; import edu.asu.commons.mme.entity.Communication; import edu.asu.commons.mme.utility.MessageHandler; +@Transactional public class CommunicationService extends Service.Base<Communication, HibernateCommunicationDao> { + private HibernateStudentDao studentDao; + public void setStudentDao(HibernateStudentDao studentDao) { + this.studentDao = studentDao; + } + private HibernateRoundConfigDao roundConfigDao; + public void setRoundConfigDao(HibernateRoundConfigDao roundConfigDao) { + this.roundConfigDao = roundConfigDao; + } MessageHandler msgHandler; public void saveCommunication(Communication comm) { @@ -15,9 +28,12 @@ { //log the message communication.setMessage(comm.getMessage()); - communication.setRound(comm.getRound()); - communication.setStudent(comm.getStudent()); + + communication.setRound(roundConfigDao.find(comm.getRound().getId())); + communication.setStudent(studentDao.find(comm.getStudent().getId())); communication.setTimestamp(comm.getTimestamp()); + + getLogger().debug("timestamp is: '" + comm.getTimestamp() + "' student id is: " + comm.getStudent().getId()); getDao().save(communication); }catch(Exception e) Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/GameService.java 2010-01-15 19:27:15 UTC (rev 430) @@ -1,5 +1,6 @@ package edu.asu.commons.mme.service; +import java.sql.Timestamp; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -12,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional; import edu.asu.commons.mme.dao.HibernateBlockDao; +import edu.asu.commons.mme.dao.HibernateCommunicationDao; import edu.asu.commons.mme.dao.HibernateGameConfigDao; import edu.asu.commons.mme.dao.HibernateGameDao; import edu.asu.commons.mme.dao.HibernateGameRoundDao; @@ -26,6 +28,7 @@ import edu.asu.commons.mme.entity.BlockInformationWindow; import edu.asu.commons.mme.entity.CategoricalOption; import edu.asu.commons.mme.entity.CategoricalQuestion; +import edu.asu.commons.mme.entity.Communication; import edu.asu.commons.mme.entity.Game; import edu.asu.commons.mme.entity.GameConfig; import edu.asu.commons.mme.entity.GameRound; @@ -55,7 +58,14 @@ private HibernateStudentDao studentDao; private HibernateLocationDao locationDao; private HibernateGroupLocationDao groupLocationDao; + + private HibernateCommunicationDao communicationDao; + public void setCommunicationDao(HibernateCommunicationDao communicationDao) { + this.communicationDao = communicationDao; + } + + private int blockSeqNo; @@ -197,6 +207,22 @@ getLogger().debug("game state is NOT null..."); block = newGameState.getCurrentBlock(); initializeGame(newGameState); + + if(newGameState.getCurrentBlock().getId() == 1) + { + Communication communication = new Communication(); + communication.setMessage("hello"); + + communication.setRound(newGameState.getCurrentRound()); + communication.setStudent(studentDao.find(1)); + Timestamp time = null; + + communication.setTimestamp(time); + + + communicationDao.save(communication); + + } msgHandler.sendBlock(newGameState); } @@ -1039,7 +1065,6 @@ private Game saveGameState(Block currentBlock, Round currentRound, Game game) { - //FIXME: Game id 1 is hard coded but needs to make it dynamic getLogger().info(" Game id to SAVE is: " + game.getId()); Game newGame = null; newGame = getDao().find(game.getId()); Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2010-01-15 19:27:15 UTC (rev 430) @@ -43,6 +43,7 @@ private HibernatePsychometricQuestionDao psychometricQuestionDao; private HibernateCategoricalQuestionDao categoricalQuestionDao; private HibernateCategoricalOptionDao categoricalOptionDao; + private HibernateQuestionDao questionDao; Module module; Block block; @@ -407,6 +408,7 @@ Hibernate.initialize(infoWindow.get(j)); Hibernate.initialize(infoWindow.get(j).getInfoWindow()); } + Hibernate.initialize(block.getQuestionGroups()); Iterator<QuestionGroup> iteratorquestionGrp = block.getQuestionGroups().iterator(); { while(iteratorquestionGrp.hasNext()) @@ -551,7 +553,7 @@ initializeModule(module); question.setQuestionGroup(questionGroup); - save(question); + questionDao.save(question); returnQuestion = question; @@ -669,7 +671,7 @@ initializeModule(module); categoricalQ.setQuestionGroup(questionGroup); - save(categoricalQ); + categoricalQuestionDao.save(categoricalQ); returnQuestion = categoricalQ; @@ -678,7 +680,7 @@ } else if(questionInfo.getClass().getName().equalsIgnoreCase("edu.asu.commons.mme.entity.Question")) { - question = getDao().find(questionId); + /*question = getDao().find(questionId); Hibernate.initialize(question); questionGroup = question.getQuestionGroup(); Hibernate.initialize(questionGroup); @@ -708,6 +710,30 @@ save(question); + returnQuestion = question;*/ + + question = getQuestionDao().find(questionId); + + Question otherTypeQuestionInfo = (Question)questionInfo; + getLogger().debug("Question from client is: " + otherTypeQuestionInfo.getQuestion()); + question.setQuestion(otherTypeQuestionInfo.getQuestion()); + question.setSequenceNo(otherTypeQuestionInfo.getSequenceNo()); + question.setType(otherTypeQuestionInfo.getType().toLowerCase()); + question.setCommunicationQ(otherTypeQuestionInfo.isCommunicationQ()); + + questionGroup = questionGroupDao.findByProperty("id",questionGroupId); + question.setQuestionGroup(questionGroup); + getQuestionDao().save(question); + getLogger().debug("question is saved with id: " + question.getId()); + Hibernate.initialize(question); + questionGroup = question.getQuestionGroup(); + Hibernate.initialize(questionGroup); + block = questionGroup.getBlock(); + Hibernate.initialize(block); + Hibernate.initialize(block.getQuestionGroups()); + module = block.getModule(); + Hibernate.initialize(module); + initializeModule(module); returnQuestion = question; } @@ -879,4 +905,14 @@ return categoricalOptionDao; } + + public void setQuestionDao(HibernateQuestionDao questionDao) { + this.questionDao = questionDao; + } + + + public HibernateQuestionDao getQuestionDao() { + return questionDao; + } + } Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2010-01-15 19:12:57 UTC (rev 429) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2010-01-15 19:27:15 UTC (rev 430) @@ -142,6 +142,7 @@ <property name='blockDao' ref='blockDao'/> <property name='studentDao' ref='studentDao'/> <property name='groupDao' ref='groupDao'/> + <property name='communicationDao' ref='communicationDao'/> </bean> @@ -174,7 +175,9 @@ <property name='psychometricQuestionDao' ref='psychometricQuestionDao'/> <property name='categoricalQuestionDao' ref='categoricalQuestionDao'/> <property name='categoricalOptionDao' ref='categoricalOptionDao'/> + <property name='questionDao' ref='questionDao'/> + </bean> <bean id='locationService' class='edu.asu.commons.mme.service.LocationService'> @@ -195,6 +198,8 @@ <bean id='communicationService' class="edu.asu.commons.mme.service.CommunicationService"> <property name='dao' ref='communicationDao'/> + <property name='studentDao' ref='studentDao'/> + <property name='roundConfigDao' ref='roundConfigDao'/> </bean> <!-- <bean id="testService" class="edu.asu.commons.mme.service.TestService"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2010-01-15 19:13:15
|
Revision: 429 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=429&view=rev Author: kjonas Date: 2010-01-15 19:12:57 +0000 (Fri, 15 Jan 2010) Log Message: ----------- working on CommunicationC, Seema has an error to resolve with the server (messages sent to server, but not pushed to clients) DataModel.as made to store Singleton variables. Modified Paths: -------------- mentalmodels/trunk/flex/src/StartGame.mxml mentalmodels/trunk/flex/src/actionscript/Communication.as mentalmodels/trunk/flex/src/actionscript/PageDisplay.as mentalmodels/trunk/flex/src/actionscript/Student.as mentalmodels/trunk/flex/src/custom/CommunicationC.mxml mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/flex/src/custom/InstructionPage.mxml mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml Added Paths: ----------- mentalmodels/trunk/flex/src/actionscript/DataModel.as Modified: mentalmodels/trunk/flex/src/StartGame.mxml =================================================================== --- mentalmodels/trunk/flex/src/StartGame.mxml 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/StartGame.mxml 2010-01-15 19:12:57 UTC (rev 429) @@ -137,9 +137,8 @@ // Server Response Events public function gameObjectResultHandler(event:ResultEvent):void { - if(event.result != null) + if(event.result as Game != null) { - var description:String = (event.result as Game).gameCode; btnStartGame.enabled = true; game = event.result as Game; @@ -197,10 +196,7 @@ { Alert.show((event.message.body as int).toString()); } - - - - + } ]]> Modified: mentalmodels/trunk/flex/src/actionscript/Communication.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Communication.as 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/actionscript/Communication.as 2010-01-15 19:12:57 UTC (rev 429) @@ -6,7 +6,7 @@ { public var id:Number; public var message:String; - public var date:Date; + public var timestamp:Date; public var student:actionscript.Student; public var round:Round; } Added: mentalmodels/trunk/flex/src/actionscript/DataModel.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/DataModel.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/DataModel.as 2010-01-15 19:12:57 UTC (rev 429) @@ -0,0 +1,34 @@ +package actionscript +{ + public class DataModel + { + private static const INSTANCE:DataModel = new DataModel(); + + public var studentObject:actionscript.Student = null; + public var gameObject:actionscript.Game = null; + + public function DataModel():void + { + if (INSTANCE != null) + { + //Flash forces constructors to be public + //An error is thrown to prevent any new instances from being created. + throw new Error("An instance of DataModel already exists."); + } + else + { + initialize(); + } + } + + private function initialize():void + { + trace("DataModel created"); + } + + public static function get instance():DataModel + { + return INSTANCE; + } + } +} \ No newline at end of file Modified: mentalmodels/trunk/flex/src/actionscript/PageDisplay.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2010-01-15 19:12:57 UTC (rev 429) @@ -23,6 +23,7 @@ public var msg:String = ""; public var gameObject:actionscript.Game = null; + public var studentObject:actionscript.Student = null; public var pages:ArrayCollection; public var minPagesRead:int; public var currentPageNumber:int; @@ -149,6 +150,16 @@ tempBox.addChild(ffq); } + else if(tempQuestion.type.toLowerCase() == "communication") + { + var coq:CommunicationC = new CommunicationC(); + coq.id = "q"+question; + + coq.initialize(); + coq.init(); + + tempBox.addChild(coq); + } // when all else fails, text question else { Modified: mentalmodels/trunk/flex/src/actionscript/Student.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Student.as 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/actionscript/Student.as 2010-01-15 19:12:57 UTC (rev 429) @@ -8,7 +8,7 @@ public class Student { public var id:int; - public var group:int; + public var group:Group; public var studentNo:int; public var birthYear:int; public var major:String; @@ -17,6 +17,7 @@ public var gender:String; public var gameCode:String; public var game:Game; + public var money:Number; /** * input: @@ -30,7 +31,7 @@ * returns: * modified list of students */ - public static function assignGroups(students:ArrayCollection, maxGroupSize:int=5):ArrayCollection + /* public static function assignGroups(students:ArrayCollection, maxGroupSize:int=5):ArrayCollection { var groupSize:int = 0; var groupNum:int = 1; @@ -49,6 +50,6 @@ } return students; - } + } */ } } \ No newline at end of file Modified: mentalmodels/trunk/flex/src/custom/CommunicationC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/CommunicationC.mxml 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/custom/CommunicationC.mxml 2010-01-15 19:12:57 UTC (rev 429) @@ -3,6 +3,9 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; + import actionscript.DataModel; + import mx.controls.Alert; import mx.messaging.events.MessageEvent; import mx.rpc.events.FaultEvent; import actionscript.Communication; @@ -10,15 +13,24 @@ import mx.controls.Label; import mx.controls.Text; - public var student:Student = null; + public function init():void + { + Alert.show("commCons:"+(communicationConsumer == null) + +"\nstudent:"+(DataModel.instance.studentObject == null) + +"\ngroup:"+(DataModel.instance.studentObject==null || DataModel.instance.studentObject.group == null),"Null = true"); + + communicationConsumer.subtopic = DataModel.instance.studentObject.gameCode + "." + DataModel.instance.studentObject.group.id; + Alert.show(communicationConsumer.subtopic,"subtopic is"); + communicationConsumer.subscribe(); + } - public function faultHandler(event:FaultEvent):void + public function faultHandler(event:Object):void { // Silent Failure } public function messageHandler(event:MessageEvent):void { - if(event.message.body is actionscript.Communication) + if(event.message.body != null && event.message.body is actionscript.Communication) { commReceived(event.message.body as actionscript.Communication); } @@ -27,18 +39,19 @@ public function btnSend_click():void { var tempCommunication:actionscript.Communication = new actionscript.Communication(); - tempCommunication.date = new Date(); + tempCommunication.timestamp = new Date(); tempCommunication.message = txtMessage.text; - tempCommunication.student = this.student; + tempCommunication.student = DataModel.instance.studentObject; + tempCommunication.round = DataModel.instance.gameObject.currentRound; txtMessage.text = ""; - //<service>.<method>(tempCommunication); + communicationService.saveCommunication(tempCommunication); } public function btnSelfComm_click():void { var comm:actionscript.Communication = new actionscript.Communication(); comm.message = txtMessage.text; - comm.date = new Date(); + comm.timestamp = new Date(); comm.student = new actionscript.Student(); comm.student.id = 1; txtMessage.text = ""; @@ -61,7 +74,7 @@ private function commToText(comm:actionscript.Communication):Text { var newText:Text = new Text(); - newText.text = "["+comm.date.toLocaleTimeString()+"] "+comm.student.id+": "+comm.message; + newText.text = "["+comm.timestamp.toLocaleTimeString()+"] "+comm.student.id+": "+comm.message; return newText; } @@ -69,15 +82,16 @@ </mx:Script> <mx:RemoteObject id="communicationService" destination="communicationService" fault="faultHandler(event)"> - <mx:method name="sendCommunication" result="messageHandler(event)"/> + <mx:method name="saveCommunication" result="messageHandler(event)"/> </mx:RemoteObject> + <mx:Consumer id="communicationConsumer" destination="mme" fault="faultHandler(event)" message="messageHandler(event)"/> <mx:VBox id="vbxMessages" width="500" height="300" verticalScrollPolicy="on"/> <mx:HBox> - <mx:TextInput id="txtMessage" width="500"/> - <mx:Button id="btnSend" label="Send" click="btnSend_click()" visible="false"/> + <mx:TextInput id="txtMessage" width="400"/> + <mx:Button id="btnSend" label="Send" click="btnSend_click()" visible="true"/> <mx:Button id="btnSelfComm" label="SelfComm" click="btnSelfComm_click()" visible="false"/> </mx:HBox> Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2010-01-15 19:12:57 UTC (rev 429) @@ -144,19 +144,21 @@ // Responds to ArrayCollection by assuming it is of Student objects // This code assigns group and student numbers based on the object whose id // matches studentObject - if(event.message.body is actionscript.Block) + if(event.message.body is actionscript.Game) { - setBlock(event.message.body as actionscript.Block); - } - else if(event.message.body is actionscript.Game) - { gameObject = event.message.body as actionscript.Game; + DataModel.instance.gameObject = gameObject; setBlock(gameObject.currentBlock); if(instructions != null) { instructions.setGameObject(this.gameObject); } } + else if(event.message.body is actionscript.Block) + { + Alert.show("Server sent Block, not Game.",""); + setBlock(event.message.body as actionscript.Block); + } else if(event.message.body is ArrayCollection) { var students:ArrayCollection = new ArrayCollection(); @@ -170,10 +172,17 @@ { studentObject.group = actionscript.Student(students.getItemAt(i)).group; studentObject.studentNo = actionscript.Student(students.getItemAt(i)).studentNo; + + DataModel.instance.studentObject = studentObject; + + if(DataModel.instance.studentObject.group == null) + { + Alert.show("student group is null. Student ID is"+DataModel.instance.studentObject.id,"Error!"); + } } } } -// Alert.show("Current Student Information is: " + "\n"+studentObject.id +"\n"+studentObject.gameCode+"\n"+studentObject.studentNo); +// Alert.show("Current Student Information is: " + "\n"+SingletonStudent.instance.studentObject.id +"\n"+SingletonStudent.instance.studentObject.gameCode+"\n"+SingletonStudent.instance.studentObject.studentNo); } } @@ -285,7 +294,7 @@ studentResponse.response += ", "; studentResponse.response += (curr.getChildAt(j) as CategoricalQuestionC).comboSpecific.selectedItem as String; } - else if(curr.getChildAt(j) is DayByDayDecisionsQuestionC) + else if(curr.getChildAt(j) is DayByDayDecisionsQuestionC || curr.getChildAt(j) is CommunicationC) { //SKIP IT studentResponse.question = null; @@ -460,7 +469,7 @@ { consumer.subtopic = studentObject.gameCode; consumer.subscribe(); - //Alert.show("GameCode is '" + studentObject.gameCode + "'"); +// Alert.show("GameCode is '" + studentObject.gameCode + "'"); //Alert.show("subscribed to destination: " + consumer.destination); } } Modified: mentalmodels/trunk/flex/src/custom/InstructionPage.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2010-01-15 19:12:57 UTC (rev 429) @@ -16,6 +16,7 @@ import mx.collections.ArrayCollection; [Bindable] public var gameObject:actionscript.Game = null; + public var studentObject:actionscript.Student = null; //[Bindable] public var moduleNumber:int = 1; //[Bindable] public var module:Module; [Bindable] public var blockNumber:int = 0; Modified: mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2010-01-14 06:30:33 UTC (rev 428) +++ mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2010-01-15 19:12:57 UTC (rev 429) @@ -100,6 +100,7 @@ public function clicked(event:MouseEvent):void { + //event.currentTarget. try { deciding = 0; @@ -136,6 +137,7 @@ dayByDayContent.validateNow(); dayByDayContent.verticalScrollPosition = dayByDayContent.maxVerticalScrollPosition; + } public function save():ArrayCollection This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2010-01-15 18:26:20
|
Coming in to work today at 11:30am I will be working on modifying the Strategy design component as per my last discussion with Seema on the topic. On Wed, Jan 13, 2010 at 4:47 PM, Kalin Jonas <kj...@as...> wrote: > checking out at 16:45pm (3.5hr) > Working on resolving communication problem. the messages are being > sent to the server, just not pushed back to all clients. > > On 1/13/10, Kalin Jonas <kj...@as...> wrote: > > coming in to work today at 13:15 pm > > I'm still trying to get the laptop at home set up for working in flex. > > also working on fixing the errors that I left behind yesterday > > > > On 1/12/10, Kalin Jonas <kj...@as...> wrote: > >> Leaving at 16:15(1.5hr) > >> worked with seema on the communication problem, making headway > >> must fix problem - communication component does not keep track of > student > >> yet. > >> > >> On Tue, Jan 12, 2010 at 2:47 PM, Kalin Jonas <kj...@as...> wrote: > >> > >>> Returning at 14:45 > >>> working on second laptop via remote desktop to set it up for flex work. > >>> > >>> > >>> On Tue, Jan 12, 2010 at 2:15 PM, Kalin Jonas <kj...@as...> wrote: > >>> > >>>> checking out for lunch at 14:15pm (4hr) > >>>> linux trial has expired, and therefore no progress has been made. > >>>> working > >>>> on another computer to try and set it up for use. > >>>> > >>>> > >>>> On Tue, Jan 12, 2010 at 10:10 AM, Kalin Jonas <kj...@as...> wrote: > >>>> > >>>>> Coming in to work today at 10:15am. > >>>>> I will be working on the new Strategy Design component as Seema and I > >>>>> discussed: it will have only one list of actions (repeated) and I > will > >>>>> be > >>>>> removing the SuspendRepetition functionality. > >>>>> I will begin by backing up the old component now. > >>>>> > >>>> > >>>> > >>> > >> > > > |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-15 00:47:33
|
[ http://opensource.asu.edu/jira/browse/COMMONS-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-6 started by Allen Lee. > inaccurate total earnings for other participants in debriefing > -------------------------------------------------------------- > > Key: COMMONS-6 > URL: http://opensource.asu.edu/jira/browse/COMMONS-6 > Project: The Virtual Commons > Issue Type: Bug > Reporter: Allen Lee > Assignee: Allen Lee > > The debriefing information isn't getting updated properly. Specifically, the total earnings isn't accurate for the other participants (but is accurate for the current participant). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-01-14 06:30:40
|
Revision: 428 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=428&view=rev Author: alllee Date: 2010-01-14 06:30:33 +0000 (Thu, 14 Jan 2010) Log Message: ----------- adding freemarker dependency and starting to implement freemarker support for experiment and round configuration Modified Paths: -------------- csidex/trunk/ivy.xml csidex/trunk/pom.xml csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentConfiguration.java csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentRoundParameters.java Modified: csidex/trunk/ivy.xml =================================================================== --- csidex/trunk/ivy.xml 2010-01-12 21:42:47 UTC (rev 427) +++ csidex/trunk/ivy.xml 2010-01-14 06:30:33 UTC (rev 428) @@ -5,9 +5,10 @@ <ivy-module version="2.0"> <info organisation="edu.asu.commons" module="csidex"/> <dependencies> - <dependency org='junit' name='junit' rev='4.4'/> + <dependency org='org.freemarker' name='freemarker' rev='4.5'/> + <dependency org='junit' name='junit' rev='4.5'/> <dependency org='xpp3' name='xpp3' rev='1.1.4c'/> - <dependency org='com.thoughtworks.xstream' name='xstream' rev='1.3'/> + <dependency org='com.thoughtworks.xstream' name='xstream' rev='1.3.1'/> </dependencies> </ivy-module> Modified: csidex/trunk/pom.xml =================================================================== --- csidex/trunk/pom.xml 2010-01-12 21:42:47 UTC (rev 427) +++ csidex/trunk/pom.xml 2010-01-14 06:30:33 UTC (rev 428) @@ -41,6 +41,11 @@ </repositories> <dependencies> <dependency> + <groupId>org.freemarker</groupId> + <artifactId>freemarker</artifactId> + <version>2.3.16</version> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.5</version> Modified: csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java 2010-01-12 21:42:47 UTC (rev 427) +++ csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java 2010-01-14 06:30:33 UTC (rev 428) @@ -3,9 +3,15 @@ import java.io.IOException; import java.io.InputStream; import java.io.Serializable; +import java.io.StringWriter; import java.util.Properties; import edu.asu.commons.util.ResourceLoader; +import freemarker.cache.StringTemplateLoader; +import freemarker.template.Configuration; +import freemarker.template.DefaultObjectWrapper; +import freemarker.template.Template; +import freemarker.template.TemplateException; /** * $Id$ @@ -22,12 +28,19 @@ private final Properties properties; + private final Configuration freemarkerConfiguration; + private final StringTemplateLoader templateLoader; + public ConfigurationAssistant() { this(new Properties()); } public ConfigurationAssistant(Properties properties) { this.properties = properties; + this.freemarkerConfiguration = new Configuration(); + this.templateLoader = new StringTemplateLoader(); + freemarkerConfiguration.setObjectWrapper(new DefaultObjectWrapper()); + freemarkerConfiguration.setTemplateLoader(templateLoader); } public Properties getProperties() { @@ -47,6 +60,27 @@ } } + public void addTemplate(String templateName, String templateSource) { + templateLoader.putTemplate(templateName, templateSource); + } + + public String transform(String templateName, Object data) { + try { + Template template = freemarkerConfiguration.getTemplate(templateName); + StringWriter writer = new StringWriter(); + template.process(data, writer); + return writer.toString(); + } + catch (IOException exception) { + exception.printStackTrace(); + } + catch (TemplateException exception) { + exception.printStackTrace(); + } + return ""; + } + + public String getProperty(String key) { return getStringProperty(key, ""); } Modified: csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentConfiguration.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentConfiguration.java 2010-01-12 21:42:47 UTC (rev 427) +++ csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentConfiguration.java 2010-01-14 06:30:33 UTC (rev 428) @@ -9,11 +9,15 @@ * $Id$ * * All experiment server configurations should follow this contract. + * + * FIXME: properly genericize ExperimentRoundParameters circular types... + * something like + * ExperimentConfiguration<T extends ExperimentRoundParameters<this-type>> * * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Revision$ */ - +@SuppressWarnings("unchecked") public interface ExperimentConfiguration<T extends ExperimentRoundParameters> extends Serializable { public List<T> getAllParameters(); @@ -86,7 +90,12 @@ loadServerProperties(); } - protected abstract E createConfiguration(String roundConfigurationResource); + @Deprecated + protected E createConfiguration(String roundConfigurationResource) { + return createRoundConfiguration(roundConfigurationResource); + } + + protected abstract E createRoundConfiguration(String roundConfigurationResource); /** * Override if you want to use a different server configuration file. */ @@ -104,10 +113,10 @@ for (int roundNumber = 0; roundNumber < getNumberOfRounds(); roundNumber++) { String roundConfigurationResource = getConfigurationDirectory() + getRoundParametersFile(roundNumber); if (roundConfigurationResource == null || "".equals(roundConfigurationResource)) { - System.err.println("invalid experiment: " + roundNumber); + System.err.println("no round configuration available: " + roundNumber); continue; } - E configuration = createConfiguration(roundConfigurationResource); + E configuration = createRoundConfiguration(roundConfigurationResource); configuration.setParentConfiguration(this); allParameters.add(configuration); } @@ -190,6 +199,10 @@ String persistenceType = assistant.getStringProperty("persistence-type", "ALL"); return PersistenceType.valueOf(persistenceType); } + + public String getTemplate(String templateName) { + return assistant.transform(templateName, this); + } } Modified: csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentRoundParameters.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentRoundParameters.java 2010-01-12 21:42:47 UTC (rev 427) +++ csidex/trunk/src/main/java/edu/asu/commons/conf/ExperimentRoundParameters.java 2010-01-14 06:30:33 UTC (rev 428) @@ -141,5 +141,9 @@ public boolean isLastRound() { return parentConfiguration.isLastRound(); } + + public String getTemplate(String templateName) { + return assistant.transform(templateName, this); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 01:56:49
|
verify save file integrity -------------------------- Key: COMMONS-13 URL: http://opensource.asu.edu/jira/browse/COMMONS-13 Project: The Virtual Commons Issue Type: Task Components: irrigation Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 Reporter: Allen Lee Assignee: Allen Lee Fix For: irrigation.asu.fall.2009 Verify save file integrity for November 09 irrigation pretests. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 00:10:17
|
[ http://opensource.asu.edu/jira/browse/COMMONS-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee updated COMMONS-12: ----------------------------- Component/s: infrastructure > prepare online recruitment for irrigation experiments > ----------------------------------------------------- > > Key: COMMONS-12 > URL: http://opensource.asu.edu/jira/browse/COMMONS-12 > Project: The Virtual Commons > Issue Type: Task > Components: infrastructure > Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 > Reporter: Allen Lee > Assignee: Allen Lee > Fix For: irrigation.asu.fall.2009 > > > Customize orsee or patch the carllab.asu.edu software to handle a new batch of recruits for the spring irrigation experiments (need to be done before Marty leaves on sabbatical). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 00:10:16
|
[ http://opensource.asu.edu/jira/browse/COMMONS-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-12 started by Allen Lee. > prepare online recruitment for irrigation experiments > ----------------------------------------------------- > > Key: COMMONS-12 > URL: http://opensource.asu.edu/jira/browse/COMMONS-12 > Project: The Virtual Commons > Issue Type: Task > Components: infrastructure > Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 > Reporter: Allen Lee > Assignee: Allen Lee > Fix For: irrigation.asu.fall.2009 > > > Customize orsee or patch the carllab.asu.edu software to handle a new batch of recruits for the spring irrigation experiments (need to be done before Marty leaves on sabbatical). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 00:10:16
|
prepare online recruitment for irrigation experiments ----------------------------------------------------- Key: COMMONS-12 URL: http://opensource.asu.edu/jira/browse/COMMONS-12 Project: The Virtual Commons Issue Type: Task Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 Reporter: Allen Lee Assignee: Allen Lee Fix For: irrigation.asu.fall.2009 Customize orsee or patch the carllab.asu.edu software to handle a new batch of recruits for the spring irrigation experiments (need to be done before Marty leaves on sabbatical). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 00:08:17
|
[ http://opensource.asu.edu/jira/browse/COMMONS-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-11 started by Allen Lee. > freemarker template support > --------------------------- > > Key: COMMONS-11 > URL: http://opensource.asu.edu/jira/browse/COMMONS-11 > Project: The Virtual Commons > Issue Type: Improvement > Components: csidex > Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 > Reporter: Allen Lee > Assignee: Allen Lee > Fix For: irrigation.asu.spring.2010 > > > Add freemarker template support to virtual commons experiments so that we can support instructions with interpolated data values (i.e., duration, rules, etc.) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-14 00:06:16
|
freemarker template support --------------------------- Key: COMMONS-11 URL: http://opensource.asu.edu/jira/browse/COMMONS-11 Project: The Virtual Commons Issue Type: Improvement Components: csidex Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 Reporter: Allen Lee Assignee: Allen Lee Fix For: irrigation.asu.spring.2010 Add freemarker template support to virtual commons experiments so that we can support instructions with interpolated data values (i.e., duration, rules, etc.) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |