virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 70)
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: <kj...@us...> - 2009-07-24 23:11:33
|
Revision: 207 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=207&view=rev Author: kjonas Date: 2009-07-24 23:11:25 +0000 (Fri, 24 Jul 2009) Log Message: ----------- Added Entities as .as classes for all known entities Removed modules from FisheryExperimentCore.mxml, now fetching block-by-block. Modified Paths: -------------- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/flex/src/custom/InstructionPage.mxml Added Paths: ----------- mentalmodels/trunk/flex/src/actionscript/CategoricalOption.as mentalmodels/trunk/flex/src/actionscript/Communication.as mentalmodels/trunk/flex/src/actionscript/Game.as mentalmodels/trunk/flex/src/actionscript/Group.as mentalmodels/trunk/flex/src/actionscript/ModuleRoundConfig.as mentalmodels/trunk/flex/src/actionscript/Persistable.as mentalmodels/trunk/flex/src/actionscript/PersistableSequence.as mentalmodels/trunk/flex/src/actionscript/Round.as mentalmodels/trunk/flex/src/actionscript/StudentRoundConfig.as mentalmodels/trunk/flex/src/actionscript/SuspendRepetition.as mentalmodels/trunk/flex/src/custom/questions/DayByDayOutput.mxml Removed Paths: ------------- mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as Property Changed: ---------------- mentalmodels/trunk/flex/src/ Property changes on: mentalmodels/trunk/flex/src ___________________________________________________________________ Added: svn:ignore + messaging-config.xml proxy-config.xml remoting-config.xml services-config.xml Added: mentalmodels/trunk/flex/src/actionscript/CategoricalOption.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/CategoricalOption.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/CategoricalOption.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,14 @@ +package actionscript +{ + + import mx.collections.ArrayCollection; + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.CategoricalOption")] + public class CategoricalOption + { + public var optionKey:String; + public var choices:ArrayCollection = new ArrayCollection(); + + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Communication.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Communication.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Communication.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,13 @@ +package actionscript +{ + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Communication")] + public class Communication + { + public var id:Number; + public var message:String; + public var timestamp:Timestamp; + public var student:Student; + public var round:Round; + } +} \ No newline at end of file Deleted: mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as 2009-07-24 21:29:16 UTC (rev 206) +++ mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as 2009-07-24 23:11:25 UTC (rev 207) @@ -1,20 +0,0 @@ -package actionscript -{ - import mx.controls.NumericStepper; - - public class CustomNumericStepper extends mx.controls.NumericStepper - { - - public function CustomNumericStepper() - { - super(); - super.stepSize = 1; - super.maximum = 3; - super.minimum = 0; - - } - - - - } -} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Game.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Game.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Game.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,21 @@ +package actionscript +{ + import mx.collections.ArrayCollection; + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Game")] + public class Game + { + public var id:Number; + public var numberOfRounds:int; + public var numberOfLocations:int; + public var maxDays:int; + public var maxFishHarvest:int; + public var timestamp:Timestamp; + public var title:String; + public var description:String; + public var money:Number; + public var imageLocation:String; + public var rounds:ArrayCollection; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Group.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Group.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Group.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,11 @@ +package actionscript +{ + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Group")] + public class Group + { + public var id:Number; + public var number:int; + public var game:Game; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/ModuleRoundConfig.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/ModuleRoundConfig.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/ModuleRoundConfig.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,12 @@ +package actionscript +{ + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.ModuleRoundConfig")] + public class ModuleRoundConfig + { + public var id:Number; + public var sequenceNo:int; + public var module:Module; + public var round:Round; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Persistable.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Persistable.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Persistable.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,9 @@ +package actionscript +{ + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Persistable")] + public class Persistable + { + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/PersistableSequence.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/PersistableSequence.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/PersistableSequence.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,10 @@ +package actionscript +{ + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.PersistableSequence")] + public class PersistableSequence + { + public var sequenceNumber:int; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Round.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Round.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Round.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,13 @@ +package actionscript +{ + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Round")] + public class Round + { + public var id:Number; + public var roundNo:int; + public var game:Game; + public var communicationFlag:Boolean; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/StudentRoundConfig.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/StudentRoundConfig.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/StudentRoundConfig.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,14 @@ +package actionscript +{ + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.StudentRoundConfig")] + public class StudentRoundConfig + { + public var id:Number; + public var student:Student; + public var roundconfig:Round; + public var currentAllocationNo:int; + public var currentDayNo:int; + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/SuspendRepetition.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/SuspendRepetition.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/SuspendRepetition.as 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,14 @@ +package actionscript +{ + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.SuspendRepetition")] + public class SuspendRepetition + { + public var id:Number; + public var roundConfig:Round; + public var student:Student; + public var daysInHarbor:int; + public var fishingThreshold:Number; + } +} \ No newline at end of file Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-24 21:29:16 UTC (rev 206) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-24 23:11:25 UTC (rev 207) @@ -21,7 +21,7 @@ </mx:AddChild> </mx:State> - <mx:State name="instructions" enterState="instructions.initModule(currModule)"> + <mx:State name="instructions" enterState="instructions.init(currentBlock)"> <mx:RemoveChild target="{instructions}"/> <mx:AddChild relativeTo="{content}" target="{instructions}"/> <mx:SetProperty target="{instructions}" name="visible" value="true"/> @@ -29,7 +29,7 @@ <mx:State name="wait"> <mx:AddChild relativeTo="{content}"> - <mx:Label id="lblWaiting" text="Waiting for next Module from server..." fontSize="16"/> + <mx:Label id="lblWaiting" text="Waiting for next Block from server..." fontSize="16"/> </mx:AddChild> </mx:State> @@ -64,6 +64,8 @@ <mx:method name="createStudent" result="studentResultHandler(event)"/> <mx:method name="getFirstModule" result="moduleResultHandler(event)"/> </mx:RemoteObject> + <mx:RemoteObject id="answeringService" destination="answeringService" fault="faultHandler(event)"> + </mx:RemoteObject> <mx:Producer id="producer" destination="DataPush" acknowledge="ack(event)"/> <mx:Consumer id="consumer" destination="DataPush" message="messageHandler(event.message)" /> @@ -95,10 +97,10 @@ // // Important Variables // - public var currModule:Module = null; - public var currModuleNumber:int = 0; - public var currBlock:Block = null; - public var currBlockNumber:int = 0; + public var currentModule:Module = null; + public var currentModuleNumber:int = 0; + public var currentBlock:Block = null; + public var currentBlockNumber:int = 0; [Bindable] public var locations:ArrayCollection = new ArrayCollection([newLocation(10, 0.50),newLocation(20, 0.15),newLocation(30, 0.05)]); public var blockLoader:Function = null; @@ -108,7 +110,7 @@ public var instructionsLoaded:Boolean = false; - [Bindable] public var studentObject:Student; + [Bindable] public var studentObject:actionscript.Student; private function newLocation(maxCapacity:Number,growth:Number):Location { @@ -136,13 +138,14 @@ { btnForward.enabled = btnBack.enabled = btnReset.enabled = true; instructionsLoaded = true; - instructions.moduleNumber = currModuleNumber; + instructions.moduleNumber = currentModuleNumber; currentState = "instructions"; } private function sendBlockQuestions():void { if(instructions == null) return; + var responseList:ArrayCollection = new ArrayCollection(); var studentResponse:StudentResponse; var pages:ArrayCollection = instructions.pageDisplay.pages; @@ -197,7 +200,8 @@ studentResponse.response += ", "; } } - // server: submit the response + + responseList.addItem(studentResponse); } studentResponse = new StudentResponse(); studentResponse.question = null; @@ -219,7 +223,8 @@ studentResponse.response += ", "; } } - // server: submit the response + + responseList.addItem(studentResponse); } studentResponse = new StudentResponse(); studentResponse.question = null; @@ -232,10 +237,12 @@ if(studentResponse.question != null) { - // server: submit the response + responseList.addItem(studentResponse); } } } + + answeringService.saveQuestion(responseList); } private function reportBlockFinished():void { @@ -246,23 +253,31 @@ private function getNextModule():void { if(instructions != null) reportBlockFinished(); - currModule = null; - currModuleNumber++; + currentModule = null; + currentModuleNumber++; - roundService.getNextModule(currModuleNumber); + roundService.getNextModule(currentModuleNumber); } + private function getNextBlock():void + { + if(instructions != null) reportBlockFinished(); + currentBlock = null; + currentBlockNumber++; + + //server request + } private function moduleResultHandler(event:ResultEvent):void { - currModule = (event.result as actionscript.Module); + currentModule = (event.result as actionscript.Module); - if(currModule == null) + if(currentModule == null) { currentState = "none"; } - else if(currModule.blocks == null || currModule.blocks.length < 1 || - (currModule.blocks.getItemAt(0) as Block) == null || - (currModule.blocks.getItemAt(0) as Block).questionGroups == null || - (currModule.blocks.getItemAt(0) as Block).questionGroups.length < 1) + else if(currentModule.blocks == null || currentModule.blocks.length < 1 || + (currentModule.blocks.getItemAt(0) as Block) == null || + (currentModule.blocks.getItemAt(0) as Block).questionGroups == null || + (currentModule.blocks.getItemAt(0) as Block).questionGroups.length < 1) { currentState = "none"; } @@ -290,7 +305,7 @@ private function studentResultHandler(event:ResultEvent):void { - studentObject = event.result as Student; + studentObject = event.result as actionscript.Student; consumer.disconnect(); } private function faultHandler(event:FaultEvent):void @@ -369,26 +384,17 @@ { try { - var instructionPageAcceptValue:int = (InstructionPage)(obj).accept(); - if( instructionPageAcceptValue == 2 ) + var instructionPageAcceptValue:Boolean = (InstructionPage)(obj).accept(); + if( (InstructionPage)(obj).accept() ) { obj.visible = false; expiredContent.addChild(obj); currentState = "wait"; //consumer.subscribe(); - getNextModule(); + getNextBlock(); //TK returnValue = true; } - else if( instructionPageAcceptValue == 1 ) - { - currBlock = (InstructionPage)(obj).block; - currBlockNumber++; - blockLoader.call(); - - reportBlockFinished(); - returnValue = true; - } } catch(err:Error) { Modified: mentalmodels/trunk/flex/src/custom/InstructionPage.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2009-07-24 21:29:16 UTC (rev 206) +++ mentalmodels/trunk/flex/src/custom/InstructionPage.mxml 2009-07-24 23:11:25 UTC (rev 207) @@ -26,6 +26,7 @@ public var savedForecastFish:ArrayCollection = null; public var savedStrategyDesign:ArrayCollection = null; public var savedDayByDayDecisions:ArrayCollection = null; +// public var savedDayByDayDecisions:ArrayCollection = null; private function newLocation(maxCapacity:Number,growth:Number):Location { @@ -36,27 +37,27 @@ return newLoc; } - public function initModule(newModule:actionscript.Module):void - { - module = newModule; - blockNumber = 0; - if(module == null) - { - debug2.text += "module is null\n"; - return; - } - if(module.blocks == null) - { - debug2.text += "module.blocks is null\n"; - return; - } - if(module.blocks.length < 1) - { - debug2.text += "module.blocks.length is less than 1\n"; - return; - } - init(module.blocks.getItemAt(blockNumber) as Block); - } +// public function initModule(newModule:actionscript.Module):void +// { +// module = newModule; +// blockNumber = 0; +// if(module == null) +// { +// debug2.text += "module is null\n"; +// return; +// } +// if(module.blocks == null) +// { +// debug2.text += "module.blocks is null\n"; +// return; +// } +// if(module.blocks.length < 1) +// { +// debug2.text += "module.blocks.length is less than 1\n"; +// return; +// } +// init(module.blocks.getItemAt(blockNumber) as Block); +// } public function init(newBlock:Block):void { @@ -128,7 +129,7 @@ currPage = pageDisplay.currentPageNumber; currPageLabel.htmlText = "Module: "+moduleNumber+ - "<br>Block: "+(blockNumber+1)+" / "+module.blocks.length+ + "<br>Block: "+(blockNumber+1)+ "<br>Page: "+(currPage+1)+" / "+numPages; content.removeAllChildren(); @@ -145,47 +146,28 @@ } - public function accept():int // 0: not finished, 1: finished block, 2: finished module + public function accept():Boolean { try { if(pageDisplay.componentsNotFinished()) { - Alert.show("Go back and complete all required sections of the Block.","Cannot Advance"); - return 0; + Alert.show("You must complete all required sections of the Block.","Cannot Advance"); } else if(pageDisplay.finished()) { - //switch blocks within module - var nextBlock:int = blockNumber+1; - if(nextBlock < module.blocks.length) - { - content.removeAllChildren(); - - blockNumber = nextBlock; - init(module.blocks.getItemAt(blockNumber) as Block); - numPages = pageDisplay.pages.length; - - return 1; - } - else - { - //server stuff goes here (in FisheryExperiment,actually) - - return 2; // module finished - } + return true; } else { Alert.show("Try looking at every page.","Cannot Advance"); } - return 0; } catch(err:Error) { - Alert.show("accepterror"+err.message+err.getStackTrace()); + Alert.show(err.message+"\n"+err.getStackTrace(),"Accept Error"); } - return 0; + return false; } public function reset():void @@ -220,7 +202,7 @@ ]]> </mx:Script> - <mx:Text id="currPageLabel" htmlText="Module: {moduleNumber}<br>Block: {(blockNumber+1)} / {module.blocks.length}<br>Page: {(currPage+1)} / {numPages}"/> + <mx:Text id="currPageLabel" htmlText="Module: {moduleNumber}<br>Block: {(blockNumber+1)}<br>Page: {(currPage+1)} / {numPages}"/> <mx:VBox id="content"/> <mx:Text id="debug" text="{pageDisplay.msg}" width="300"/> Added: mentalmodels/trunk/flex/src/custom/questions/DayByDayOutput.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/DayByDayOutput.mxml (rev 0) +++ mentalmodels/trunk/flex/src/custom/questions/DayByDayOutput.mxml 2009-07-24 23:11:25 UTC (rev 207) @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:dbd="custom.questions.dayByDayDecisions.*"> + <dbd:DayByDayDecisionsQuestionC id="dayByDay"/> + + <mx:Script> + <![CDATA[ + import mx.collections.ArrayCollection; + + public var savedStrategy:ArrayCollection = null; + public var savedDayByDay:ArrayCollection = null; + + public function init():void + { + dayByDay.removeChild(dayByDay.buttons); +// dayByDay.removeChild(dayByDay.timer); + + if(savedStrategy != null) + { + dayByDay.loadFromStrategy(savedStrategy); + } + else if(savedDayByDay != null) + { + dayByDay.load(savedDayByDay); + } + + } + + ]]> + </mx:Script> + +</mx:VBox> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-24 22:20:23
|
At 15:15 I am checking out of work Today: Added Entities as .as classes for all known entities Removed modules from FisheryExperimentCore.mxml, now fetching block-by-block. Discussed the functionality of this way of executing with Seema On Fri, Jul 24, 2009 at 2:00 PM, Kalin Jonas <kj...@as...> wrote: > at 1:30 I return from lunch break > I spoke with Seema about what we need to do before she leaves for vacation. > I will be working on completing the database as per specifications, After I > create .as classes for all entities. > > > On Fri, Jul 24, 2009 at 12:38 PM, Kalin Jonas <kj...@as...> wrote: > >> at 12:30 I am taking a lunch break >> I have changed the core of the experiment so that it should be fetching >> module by module (once the service is set up) >> When I return, I will work on creating skeletons for the methods that send >> and receive data from the server. >> >> >> On Fri, Jul 24, 2009 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: >> >>> Today I arrive at 11:15am >>> I will be focusing today on the changes that Seema and I have been >>> discussing. >>> Mostly I will be working on getting the program back to fetching >>> block-by-block, and the communication which is involved in doing so. >>> After this, I will probably work on creating .as files for entities, >>> followed by work on DayByDayOutput, unless instructed otherwise. >>> >> >> > |
From: <see...@us...> - 2009-07-24 21:29:24
|
Revision: 206 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=206&view=rev Author: seematalele Date: 2009-07-24 21:29:16 +0000 (Fri, 24 Jul 2009) Log Message: ----------- Created DayByDayDecisionService.java and EarningService.java DayByDayDecisionService.java --> this will be used for keeping track of day by day decision of students and also executing those decisions. EarningService.java --> This will be used for keep track of the input from student in day by day decision game interface. This can be extended for keeping track of time for blocks. Modified Paths: -------------- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml Added Paths: ----------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java Modified: mentalmodels/trunk/flex/src/InitialiseDatabase.mxml =================================================================== --- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-23 21:15:18 UTC (rev 205) +++ mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-24 21:29:16 UTC (rev 206) @@ -943,15 +943,15 @@ if(isQuestionFormValid) { - Alert.show("Parent id: " + node.@id); + //Alert.show("Parent id: " + node.@id); //check the sequence number first, if sequence number already exists throw an error, otherwise create Question var questionGroup:XMLList = survey.module.block.questiongroup.(@id == node.@id); - Alert.show("Parent children length: " + questionGroup.children().length()); + //Alert.show("Parent children length: " + questionGroup.children().length()); if(questionGroup.length() > 0 ) { var checkSeqNoQuestion:XMLList = questionGroup.question.(@sequenceNo == questionInfo.getSequenceNo()); - Alert.show("checkSeqNoQuestion length: " + checkSeqNoQuestion.length()); + //Alert.show("checkSeqNoQuestion length: " + checkSeqNoQuestion.length()); if(currentState == "psychometric") { var psychobj:DisplayObject = pnlComponent.getChildAt(2); @@ -1137,9 +1137,9 @@ if(question_Object != null) { var newQuestionNode:XML = createQuestionNode(question_Object); - Alert.show("question_Object.questionGroup.id " + question_Object.questionGroup.id); + //Alert.show("question_Object.questionGroup.id " + question_Object.questionGroup.id); var questionGroup:XMLList = survey.module.block.questiongroup.(@id == question_Object.questionGroup.id); - Alert.show("question_Object.questionGroup.length " + questionGroup.length()); + //Alert.show("question_Object.questionGroup.length " + questionGroup.length()); if( questionGroup.length() > 0 ) { questionGroup[0].appendChild(newQuestionNode); Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-23 21:15:18 UTC (rev 205) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-24 21:29:16 UTC (rev 206) @@ -1,16 +1,20 @@ package edu.asu.commons.mme.entity; import java.io.Serializable; +import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; +import org.hibernate.annotations.CollectionOfElements; + @Entity @Table(name="day_by_day_decision") public class DaybyDayDecision implements Serializable { @@ -40,6 +44,9 @@ @JoinColumn(nullable=false) private Student student; + @CollectionOfElements(fetch = FetchType.EAGER) + private List<Student> otherStudents; + public void setId(Long id) { this.id = id; } @@ -87,6 +94,13 @@ public Integer getDayNumber() { return dayNumber; } - + public void setOtherStudents(List<Student> otherStudents) { + this.otherStudents = otherStudents; + } + + public List<Student> getOtherStudents() { + return otherStudents; + } + } 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 2009-07-23 21:15:18 UTC (rev 205) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2009-07-24 21:29:16 UTC (rev 206) @@ -5,6 +5,9 @@ import edu.asu.commons.mme.dao.HibernateDaybyDayDecisionDao; import edu.asu.commons.mme.dao.HibernateStudentDao; import edu.asu.commons.mme.dao.HibernateStudentResponseDao; +import edu.asu.commons.mme.entity.Block; +import edu.asu.commons.mme.entity.DaybyDayDecision; +import edu.asu.commons.mme.entity.Location; import edu.asu.commons.mme.entity.Student; import edu.asu.commons.mme.entity.StudentResponse; @@ -12,13 +15,15 @@ private HibernateStudentResponseDao studentResponseDao; private HibernateStudentDao studentDao; - private HibernateDaybyDayDecisionDao dayBydayDecisionDao; + //private HibernateDaybyDayDecisionDao dayBydayDecisionDao; + private DayByDayDecisionService daybydayDecisionService; + private ModuleService moduleService; StudentResponse studentResponse; Student student; - public void saveQuestion(List<StudentResponse> studentResponses) + public Block saveQuestion(List<StudentResponse> studentResponses) { for(int i = 0; i < studentResponses.size(); i++ ) { @@ -31,16 +36,29 @@ studentResponse.setStudent(clientStudentResponse.getStudent()); save(studentResponse); } + + return moduleService.getNextBlock(); } - //public void daybyday + public void daybydayOutput(DaybyDayDecision studentDecision) + { + daybydayDecisionService.saveStudentDecision(studentDecision); + } public void setStudentDao(HibernateStudentDao studentDao) { this.studentDao = studentDao; } - public void setDayBydayDecisionDao(HibernateDaybyDayDecisionDao dayBydayDecisionDao) { + /*public void setDayBydayDecisionDao(HibernateDaybyDayDecisionDao dayBydayDecisionDao) { this.dayBydayDecisionDao = dayBydayDecisionDao; + }*/ + + public void setDaybydayDecisionService(DayByDayDecisionService daybydayDecisionService) { + this.daybydayDecisionService = daybydayDecisionService; } + public DayByDayDecisionService getDaybydayDecisionService() { + return daybydayDecisionService; + } + } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java 2009-07-24 21:29:16 UTC (rev 206) @@ -0,0 +1,46 @@ +package edu.asu.commons.mme.service; + +import java.util.ArrayList; +import java.util.List; + +import edu.asu.commons.mme.dao.HibernateDaybyDayDecisionDao; +import edu.asu.commons.mme.entity.DaybyDayDecision; +import edu.asu.commons.mme.entity.Question; +import edu.asu.commons.mme.entity.Student; + +public class DayByDayDecisionService extends Service.Base<DaybyDayDecision, HibernateDaybyDayDecisionDao> { + + private List<DaybyDayDecision> studentdecisions = new ArrayList<DaybyDayDecision>(); + + public void setStudentdecisions(List<DaybyDayDecision> studentdecisions) { + this.studentdecisions = studentdecisions; + } + + public List<DaybyDayDecision> getStudentdecisions() { + return studentdecisions; + } + + public void saveStudentDecision(DaybyDayDecision studentDecision) + { + if (studentdecisions == null) { + studentdecisions = new ArrayList<DaybyDayDecision>(); + studentdecisions.add(studentDecision); + + } + else + { + if(!this.studentdecisions.contains(studentDecision)) + { + studentdecisions.add(studentDecision); + + } + else + { + System.out.println("Student Decision already exists!!"); + } + } + + + } + +} Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java 2009-07-24 21:29:16 UTC (rev 206) @@ -0,0 +1,37 @@ +package edu.asu.commons.mme.service; + +import java.util.List; + +import edu.asu.commons.mme.entity.DaybyDayDecision; +import flex.messaging.MessageBroker; +import flex.messaging.messages.AsyncMessage; +import flex.messaging.util.UUIDUtils; + +public class EarningService extends Thread +{ + + public EarningService(List<DaybyDayDecision> studentDecisions) + { + + } + + public void run() + { + + MessageBroker msgBroker = MessageBroker.getMessageBroker(null); + String clientID = UUIDUtils.createUUID(); + + AsyncMessage msg = new AsyncMessage(); + msg.setDestination("DataPush"); + //msg.setHeader("DSSubtopic", "hello"); + msg.setClientId(clientID); + msg.setMessageId(UUIDUtils.createUUID()); + msg.setTimestamp(System.currentTimeMillis()); + msg.setBody("Sorry time is expired!!! You have to proceed further."); + System.out.println("Message broker is: "+ msgBroker); + System.out.println("Message is: "+ msg); + msgBroker.routeMessageToService(msg, null); + + } +} + Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java 2009-07-23 21:15:18 UTC (rev 205) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java 2009-07-24 21:29:16 UTC (rev 206) @@ -60,5 +60,20 @@ } return module; } + + public Block getNextBlock() { + /* + *1) Find out the current round number + *2) Find out the current module number + *3)Find out the current block number + *4)return the next block + */ + // TODO Auto-generated method stub + + + Block block = new Block(); + + return block; + } } Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-23 21:15:18 UTC (rev 205) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-24 21:29:16 UTC (rev 206) @@ -79,6 +79,11 @@ <!-- spring managed service layer --> + +<bean id='dayBydayDecisionService' class='edu.asu.commons.mme.service.DayByDayDecisionService'> + <property name='dao' ref='dayBydayDecisionDao'/> + </bean> + <bean id='roundService' class='edu.asu.commons.mme.service.RoundService'> <property name='dao' ref='roundConfigDao'/> <property name='moduleService' ref='moduleService'/> @@ -89,7 +94,7 @@ <bean id='answeringService' class='edu.asu.commons.mme.service.AnsweringService'> <property name='dao' ref='studentResponseDao'/> <property name='studentDao' ref='studentDao'/> - <property name='dayBydayDecisionDao' ref='dayBydayDecisionDao'/> + <property name='dayBydayDecisionService' ref='dayBydayDecisionService'/> </bean> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-24 21:00:46
|
at 1:30 I return from lunch break I spoke with Seema about what we need to do before she leaves for vacation. I will be working on completing the database as per specifications, After I create .as classes for all entities. On Fri, Jul 24, 2009 at 12:38 PM, Kalin Jonas <kj...@as...> wrote: > at 12:30 I am taking a lunch break > I have changed the core of the experiment so that it should be fetching > module by module (once the service is set up) > When I return, I will work on creating skeletons for the methods that send > and receive data from the server. > > > On Fri, Jul 24, 2009 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: > >> Today I arrive at 11:15am >> I will be focusing today on the changes that Seema and I have been >> discussing. >> Mostly I will be working on getting the program back to fetching >> block-by-block, and the communication which is involved in doing so. >> After this, I will probably work on creating .as files for entities, >> followed by work on DayByDayOutput, unless instructed otherwise. >> > > |
From: Kalin J. <kj...@as...> - 2009-07-24 19:38:14
|
at 12:30 I am taking a lunch break I have changed the core of the experiment so that it should be fetching module by module (once the service is set up) When I return, I will work on creating skeletons for the methods that send and receive data from the server. On Fri, Jul 24, 2009 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: > Today I arrive at 11:15am > I will be focusing today on the changes that Seema and I have been > discussing. > Mostly I will be working on getting the program back to fetching > block-by-block, and the communication which is involved in doing so. > After this, I will probably work on creating .as files for entities, > followed by work on DayByDayOutput, unless instructed otherwise. > |
From: Kalin J. <kj...@as...> - 2009-07-24 18:26:27
|
Today I arrive at 11:15am I will be focusing today on the changes that Seema and I have been discussing. Mostly I will be working on getting the program back to fetching block-by-block, and the communication which is involved in doing so. After this, I will probably work on creating .as files for entities, followed by work on DayByDayOutput, unless instructed otherwise. |
From: Kalin J. <kj...@as...> - 2009-07-23 23:23:09
|
Today I worked from 11:00 to 16:00 (5hr) I spoke extensively with Seema regarding the program and prospective changes. I began the DayByDayOutput.mxml file, which will be used to display daybydaydecisions - style results from either daybydaydecisions or strategydesign. I also discussed with Seema how I would be entering things into the database, and how they would be returned to the client. I now know basically how to populate the database when it comes time to load module 2B and Module 3 and Module 4 into the database. My work today has helped Seema and I to be able to work separately more easily when she takes a vacation next week, and I work. On Thu, Jul 23, 2009 at 11:19 AM, Kalin Jonas <kj...@as...> wrote: > Today I come into work at 11:00am. > I will be working on the list of tasks that Seema has given me, alongside > the tasks that I have planned out myself. > > I will begin by finding several browsers, and examining how mme displays on > each of them > I will then try to figure out how to format the page to look the same on > each browser. > > After that, I will create actionscript classes for each entity that we have > so far. > > Then I will work on formatting module 3 so that it can be put into > database. > |
From: <kj...@us...> - 2009-07-23 21:15:26
|
Revision: 205 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=205&view=rev Author: kjonas Date: 2009-07-23 21:15:18 +0000 (Thu, 23 Jul 2009) Log Message: ----------- added a few question groups adding InitialiseDatabase.html and .swf for database editing Modified Paths: -------------- mentalmodels/trunk/src/main/db/init-mme.sql mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf Added Paths: ----------- mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-23 19:03:10 UTC (rev 204) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-23 21:15:18 UTC (rev 205) @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.1.35, for Win32 (ia32) +-- MySQL dump 10.13 Distrib 5.1.36, for Win32 (ia32) -- -- Host: localhost Database: mme -- ------------------------------------------------------ --- Server version 5.1.35-community +-- Server version 5.1.36-community /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -15,7 +15,25 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +-- +-- Table structure for table `block` +-- +DROP TABLE IF EXISTS `block`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `block` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` varchar(255) NOT NULL, + `duration` int(11) NOT NULL, + `sequence_no` int(11) NOT NULL, + `module_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK597C48D4D4A8AF3` (`module_id`), + CONSTRAINT `FK597C48D4D4A8AF3` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Dumping data for table `block` -- @@ -30,6 +48,15 @@ -- Table structure for table `categorical_option` -- +DROP TABLE IF EXISTS `categorical_option`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorical_option` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `optionKey` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option` @@ -45,6 +72,16 @@ -- Table structure for table `categorical_option_choices` -- +DROP TABLE IF EXISTS `categorical_option_choices`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorical_option_choices` ( + `categorical_option_id` bigint(20) NOT NULL, + `element` varchar(255) DEFAULT NULL, + KEY `FKA2D77727CC2EF222` (`categorical_option_id`), + CONSTRAINT `FKA2D77727CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option_choices` @@ -60,6 +97,18 @@ -- Table structure for table `categorical_options_pivot` -- +DROP TABLE IF EXISTS `categorical_options_pivot`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorical_options_pivot` ( + `categorical_question_id` bigint(20) NOT NULL, + `categorical_option_id` bigint(20) NOT NULL, + KEY `FK315C55828A4F6E82` (`categorical_question_id`), + KEY `FK315C5582CC2EF222` (`categorical_option_id`), + CONSTRAINT `FK315C5582CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`), + CONSTRAINT `FK315C55828A4F6E82` FOREIGN KEY (`categorical_question_id`) REFERENCES `categorical_question` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_options_pivot` @@ -75,6 +124,16 @@ -- Table structure for table `categorical_question` -- +DROP TABLE IF EXISTS `categorical_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `categorical_question` ( + `id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKB9D69D254A96BF7A` (`id`), + CONSTRAINT `FKB9D69D254A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_question` @@ -90,6 +149,22 @@ -- Table structure for table `communication` -- +DROP TABLE IF EXISTS `communication`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `communication` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `message` longtext, + `timestamp` datetime DEFAULT NULL, + `round_id` bigint(20) NOT NULL, + `student_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKC24ACFD647CF2321` (`round_id`), + KEY `FKC24ACFD6992B5A41` (`student_id`), + CONSTRAINT `FKC24ACFD6992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`), + CONSTRAINT `FKC24ACFD647CF2321` FOREIGN KEY (`round_id`) REFERENCES `round_config` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `communication` @@ -101,9 +176,51 @@ UNLOCK TABLES; -- +-- Table structure for table `day_by_day_decision` +-- + +DROP TABLE IF EXISTS `day_by_day_decision`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `day_by_day_decision` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `dayNumber` int(11) NOT NULL, + `earnings` double NOT NULL, + `money` double NOT NULL, + `location_id` bigint(20) NOT NULL, + `student_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK5B92B164224FD013` (`location_id`), + KEY `FK5B92B164992B5A41` (`student_id`), + CONSTRAINT `FK5B92B164992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`), + CONSTRAINT `FK5B92B164224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `day_by_day_decision` +-- + +LOCK TABLES `day_by_day_decision` WRITE; +/*!40000 ALTER TABLE `day_by_day_decision` DISABLE KEYS */; +/*!40000 ALTER TABLE `day_by_day_decision` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `forecasting_question` -- +DROP TABLE IF EXISTS `forecasting_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `forecasting_question` ( + `day_no` int(11) NOT NULL, + `id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKD0793D1E4A96BF7A` (`id`), + CONSTRAINT `FKD0793D1E4A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `forecasting_question` @@ -118,6 +235,23 @@ -- Table structure for table `game` -- +DROP TABLE IF EXISTS `game`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `game` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` longtext, + `image_location` varchar(255) DEFAULT NULL, + `max_days` int(11) NOT NULL, + `max_fish_harvest` int(11) NOT NULL, + `money` double DEFAULT NULL, + `no_of_locations` int(11) NOT NULL, + `no_of_rounds` int(11) NOT NULL, + `timestamp` datetime NOT NULL, + `title` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `game` @@ -133,6 +267,18 @@ -- Table structure for table `grp` -- +DROP TABLE IF EXISTS `grp`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grp` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `grp_number` int(11) NOT NULL, + `game_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK190E57AC42F73` (`game_id`), + CONSTRAINT `FK190E57AC42F73` FOREIGN KEY (`game_id`) REFERENCES `game` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `grp` @@ -144,9 +290,48 @@ UNLOCK TABLES; -- +-- Table structure for table `information_window` +-- + +DROP TABLE IF EXISTS `information_window`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `information_window` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `sequence_no` int(11) NOT NULL, + `title` varchar(255) NOT NULL, + `block_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK349B7A631F51CEC1` (`block_id`), + CONSTRAINT `FK349B7A631F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `information_window` +-- + +LOCK TABLES `information_window` WRITE; +/*!40000 ALTER TABLE `information_window` DISABLE KEYS */; +/*!40000 ALTER TABLE `information_window` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `location` -- +DROP TABLE IF EXISTS `location`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `growth_rate` double NOT NULL, + `initial_population` int(11) NOT NULL, + `location_name` varchar(255) NOT NULL, + `max_capacity` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location` @@ -162,6 +347,19 @@ -- Table structure for table `location_round_config` -- +DROP TABLE IF EXISTS `location_round_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `location_round_config` ( + `location_id` bigint(20) NOT NULL, + `rounds_id` bigint(20) NOT NULL, + PRIMARY KEY (`location_id`,`rounds_id`), + KEY `FK979C4B5D224FD013` (`location_id`), + KEY `FK979C4B5D479268AA` (`rounds_id`), + CONSTRAINT `FK979C4B5D479268AA` FOREIGN KEY (`rounds_id`) REFERENCES `round_config` (`id`), + CONSTRAINT `FK979C4B5D224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location_round_config` @@ -177,6 +375,17 @@ -- Table structure for table `module` -- +DROP TABLE IF EXISTS `module`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `module` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` varchar(255) NOT NULL, + `duration` int(11) NOT NULL, + `sequence_no` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `module` @@ -188,7 +397,26 @@ /*!40000 ALTER TABLE `module` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `module_round_config` +-- +DROP TABLE IF EXISTS `module_round_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `module_round_config` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `sequence_no` int(11) NOT NULL, + `module_id` bigint(20) NOT NULL, + `round_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK2A6526064D4A8AF3` (`module_id`), + KEY `FK2A65260647CF2321` (`round_id`), + CONSTRAINT `FK2A65260647CF2321` FOREIGN KEY (`round_id`) REFERENCES `round_config` (`id`), + CONSTRAINT `FK2A6526064D4A8AF3` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Dumping data for table `module_round_config` -- @@ -199,11 +427,22 @@ /*!40000 ALTER TABLE `module_round_config` ENABLE KEYS */; UNLOCK TABLES; - -- -- Table structure for table `psychometric_question` -- +DROP TABLE IF EXISTS `psychometric_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `psychometric_question` ( + `max_slider_value` int(11) NOT NULL, + `scale` varchar(255) NOT NULL, + `id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK87559D014A96BF7A` (`id`), + CONSTRAINT `FK87559D014A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `psychometric_question` @@ -211,7 +450,7 @@ LOCK TABLES `psychometric_question` WRITE; /*!40000 ALTER TABLE `psychometric_question` DISABLE KEYS */; -INSERT INTO `psychometric_question` VALUES (10,'Unipolar',4),(10,'unipolar',7),(10,'unipolar',9),(10,'unipolar',12),(10,'unipolar',14),(10,'bipolar',15),(10,'unipolar',16),(10,'unipolar',17),(10,'unipolar',18),(10,'bipolar',19),(10,'unipolar',20),(10,'unipolar',21),(10,'unipolar',22),(10,'unipolar',23),(10,'unipolar',24),(10,'unipolar',25),(10,'unipolar',26),(10,'unipolar',27),(10,'unipolar',28),(10,'unipolar',29),(10,'unipolar',30),(10,'bipolar',31),(10,'unipolar',32),(10,'unipolar',33),(10,'bipolar',34); +INSERT INTO `psychometric_question` VALUES (10,'Unipolar',4),(10,'unipolar',7),(10,'unipolar',9),(10,'unipolar',12),(10,'unipolar',14),(10,'bipolar',15),(10,'unipolar',16),(10,'unipolar',17),(10,'unipolar',18),(10,'bipolar',19),(10,'unipolar',20),(10,'unipolar',21),(10,'unipolar',22),(10,'unipolar',23),(10,'unipolar',24),(10,'unipolar',25),(10,'unipolar',26),(10,'unipolar',27),(10,'unipolar',28),(10,'unipolar',29),(10,'unipolar',30),(10,'bipolar',31),(10,'unipolar',32),(10,'unipolar',33),(10,'bipolar',34),(10,'unipolar',40); /*!40000 ALTER TABLE `psychometric_question` ENABLE KEYS */; UNLOCK TABLES; @@ -219,13 +458,24 @@ -- Table structure for table `psychometric_question_choices` -- +DROP TABLE IF EXISTS `psychometric_question_choices`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `psychometric_question_choices` ( + `psychometric_question_id` bigint(20) NOT NULL, + `element` varchar(255) DEFAULT NULL, + KEY `FKA80B09B4FBB83ADC` (`psychometric_question_id`), + CONSTRAINT `FKA80B09B4FBB83ADC` FOREIGN KEY (`psychometric_question_id`) REFERENCES `psychometric_question` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Dumping data for table `psychometric_question_choices` -- LOCK TABLES `psychometric_question_choices` WRITE; /*!40000 ALTER TABLE `psychometric_question_choices` DISABLE KEYS */; -INSERT INTO `psychometric_question_choices` VALUES (4,'nearly as important'),(4,'not important at all'),(7,'very important'),(7,'not important at all'),(9,'nearly as important'),(9,'not important at all'),(12,'nearly as important'),(12,'not important at all'),(14,'nearly as important'),(14,'not important at all'),(15,'I like my group very much'),(15,'neutral'),(15,'I do not like my group at all'),(16,'very important'),(16,'not important at all'),(17,'very important'),(17,'not important at all'),(18,'very important'),(18,'not important at all'),(19,'completely as a team'),(19,'neutral'),(19,'completely as competing players'),(20,'very much'),(20,'not at all'),(21,'very important'),(21,'not important at all'),(22,'very much'),(22,'not at all'),(23,'very much'),(23,'not at all'),(24,'very much'),(24,'not at all'),(25,'very much'),(25,'not at all'),(26,'very much'),(27,'very much'),(27,'not at all'),(28,'very much'),(28,'not at all'),(29,'very much'),(29,'not at all'),(30,'perfectly'),(30,'not at all'),(31,'much better'),(31,'same as me'),(31,'much worse'),(32,'very confident'),(32,'not at all confident'),(33,'totally'),(33,'not at all'),(34,'completely ‘safe’'),(34,'balancing risk and outcomes'),(34,'completely ‘risky’'),(26,'not at all'); +INSERT INTO `psychometric_question_choices` VALUES (4,'nearly as important'),(4,'not important at all'),(7,'very important'),(7,'not important at all'),(9,'nearly as important'),(9,'not important at all'),(12,'nearly as important'),(12,'not important at all'),(14,'nearly as important'),(14,'not important at all'),(15,'I like my group very much'),(15,'neutral'),(15,'I do not like my group at all'),(16,'very important'),(16,'not important at all'),(17,'very important'),(17,'not important at all'),(18,'very important'),(18,'not important at all'),(19,'completely as a team'),(19,'neutral'),(19,'completely as competing players'),(20,'very much'),(20,'not at all'),(21,'very important'),(21,'not important at all'),(22,'very much'),(22,'not at all'),(23,'very much'),(23,'not at all'),(24,'very much'),(24,'not at all'),(25,'very much'),(25,'not at all'),(26,'very much'),(27,'very much'),(27,'not at all'),(28,'very much'),(28,'not at all'),(29,'very much'),(29,'not at all'),(30,'perfectly'),(30,'not at all'),(31,'much better'),(31,'same as me'),(31,'much worse'),(32,'very confident'),(32,'not at all confident'),(33,'totally'),(33,'not at all'),(34,'completely ‘safe’'),(34,'balancing risk and outcomes'),(34,'completely ‘risky’'),(26,'not at all'),(40,'I am very surprised'),(40,'I am not surprised at all'); /*!40000 ALTER TABLE `psychometric_question_choices` ENABLE KEYS */; UNLOCK TABLES; @@ -233,6 +483,21 @@ -- Table structure for table `question` -- +DROP TABLE IF EXISTS `question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `question` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `communicationQ` tinyint(1) DEFAULT '0', + `question` longtext NOT NULL, + `sequence_no` int(11) NOT NULL, + `type` varchar(255) NOT NULL, + `question_group_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FKBA823BE6CA626674` (`question_group_id`), + CONSTRAINT `FKBA823BE6CA626674` FOREIGN KEY (`question_group_id`) REFERENCES `question_group` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question` @@ -240,7 +505,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),(6,0,'',1,'daybydaydecisions',6),(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),(35,0,'',1,'forecastingfishermen',18),(36,0,'',1,'forecastingfish',19),(37,0,'',1,'strategydesign',9),(38,0,'',1,'strategydesign',22),(39,0,'',1,'daybydaydecisions',24); +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),(6,0,'',1,'daybydaydecisions',6),(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),(35,0,'',1,'forecastingfishermen',18),(36,0,'',1,'forecastingfish',19),(37,0,'',1,'strategydesign',9),(38,0,'',1,'strategydesign',22),(39,0,'',1,'daybydaydecisions',24),(40,0,'',1,'psychometric',27); /*!40000 ALTER TABLE `question` ENABLE KEYS */; UNLOCK TABLES; @@ -248,6 +513,21 @@ -- Table structure for table `question_group` -- +DROP TABLE IF EXISTS `question_group`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `question_group` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `description` longtext, + `duration` int(11) NOT NULL, + `header` longtext, + `sequence_no` int(11) NOT NULL, + `block_id` bigint(20) NOT NULL, + PRIMARY KEY (`id`), + KEY `FK8F8090E61F51CEC1` (`block_id`), + CONSTRAINT `FK8F8090E61F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question_group` @@ -255,7 +535,7 @@ LOCK TABLES `question_group` WRITE; /*!40000 ALTER TABLE `question_group` DISABLE KEYS */; -INSERT INTO `question_group` VALUES (1,'In this experiment you will design a strategy to fish in an abstract fishing ground together with three other persons. As we are mainly interested in the reasons <i>why</i> you choose a certain strategy, we will ask you a number of questions. For the same reason, there are no correct or wrong strategies and no correct or wrong answers. However, since for each pound of fish you get during the experiment you will receive $1.00 US, you might be interested in finding a strategy that fits your goals well. For this, you will need to understand the dynamics of the (simulated) fish population and anticipate well the behavior of the other persons of your group.',30,'<b>Welcome to the E-Fishery Experiment</b>',1,1),(2,'<p>The experiment will run as follows:</p> <ul> <li><b>Introduction</b>: We will explain the interface and how the dynamics of the fish population are modeled. We will also ask you some questions about you and you will have the opportunity to make your decisions on how to fish on a (simulated) day-by-day basis to get a feeling for the dynamics of the fish population. </li> <li><b>Strategy design 1</b>: You will design a fishing strategy that will be simulated together with the strategies of the other persons in your group, and we ask you a larger amount of questions to understand your decisions and to help you reflect on those decisions. </li> <li><b>Fishing and evaluation 1</b>: Besides simulating the strategies you will decide on how to fish on a (simulated) day-by-day basis. Then, we will ask you some questions on your evaluation of the results. </li> <li><b>Communication</b>:You will have the opportunity to chat with the other persons in your group. After the chat we will ask some questions to asses your evaluation of the communication. </li> <li><b>Strategy design, fishing and evaluation 2</b>: The strategy design, fishing and evaluation are repeated as described above. </li> <li><b>Finishing the experiment</b>: The experiment closes with some final questions and more information on the experiment, and you will have the opportunity to give a feedback if you wish to do so. </li> </ul> <p> In the <b>information bar above the main window</b> you can see which part of the experiment you are in, your progress and how you are doing with the time. </p>',30,'<b>Experimental procedure</b>',2,1),(3,'<p>The <b>information window "Fishing Ground"</b> gives you an overview that will be explained here.</p> <p> Imagine you are living on an island and your only income is from a species of fish that only survives in the shallow bays formed by the island. The fish can leave crowed bays and move to less crowded bays, but they cannot survive in the ocean. Nor can new fish arrive from the ocean. </p> <p> The fish population grows at a constant rate. Thus, the more fish are in a bay the faster the population grows. However, the population a bay can sustain is limited and fish leave crowed bays to find less crowded bays. The more crowded a bay, the more fish leave and the less fish enter the bay (the movement is directly proportional to the percentage to which a bay is filled up). The number of fish leaving the bay is proportional to the rate of growth, and the number of fish entering the bay is also proportional to the amount of fish leaving the three bays (i.e. fish in the ocean). </p> <p> The equations of these dynamics are given in the information windows. It is, however, not necessary to know them for designing a strategy. For this, you only have to <b>understand the following five principles</b>: </p> <ul> <li>If all bays are <b>filled up</b> with fish, then the total growth is highest, but all additional lbs of fish are lost to the ocean and the amount of fish in the bays stops growing.</li> <li>If the bays are <b>half filled</b>, then the amount of fish in the bays grows fastest.</li> <li>If the bays are <b>nearly empty</b>, the population grows very slowly.</li> <li>If there is <b>no fish</b> in any of the bays, there will be never any fish again.</li> <li>If there are both <b>crowded and empty</b> bays, a lot of fish move from the crowded to the empty bays.</li> </ul> ',120,'<b>How the dynamics of the fish population are modeled</b>',3,1),(4,'<p>The three bays are different in size and characteristics leading to different growth rates and capacities (i.e. the maximal amount of fish the bay can sustain). At the start of the simulation each bay is half filled.</p> <table> <thead> <th></th><th>Bay 1</th><th>Bay 2</th><th>Bay 3</th> </thead> <tbody> <tr> <td>Capacity:</td><td>10 lb</td><td>20 lb</td><td>30 lb</td> </tr> <tr> <td>Starts with:</td><td>5 lb</td><td>10 lb</td><td>15 lb</td> </tr> <tr> <td>Growth rate:</td><td>50% per day</td><td>15% per day</td><td>5% per day</td> </tr> </tbody> </table> <p> <b>How much fish</b> you take out in a day is <b>directly proportional with the extent that the bay is filled up with fish</b>. Your fishing gear allows you to harvest a maximum of 5 lbs. Thus, if the bay is completely filled up you get 5 lb of fish. If the bay is half filled, you get 2.5 lb of fish. If the bay is filled up only to 20 % you will get 1 lb, etc. The fish population is diminished by the same amount. If several persons fish the same bay and together would get more fish than the bay holds, then all the fish in the bay are distributed equally among these fishermen. </p> <p>However, you can <b>stay in the harbor</b> instead of fishing. This way, you do not get anything and the fish population is not diminished. </p> <p> Your task is to design a strategy of how to fish this fishing ground for 30 days together with three other persons (thus, with you the group compromises 4 persons). You will define the number of days that you stay in each bay or in the harbor. Please note that this is not an exam! We do not expect you to find the mathematically optimal solution to this problem. We want to know how you come up with a solution that sufficiently fulfills your goals. As long as we can understand why you choose a certain strategy you can come up with whatever you like. </p> ',120,'<b>Differences of bays and effects of fishing</b>',4,1),(5,'<p>Before designing the strategy, you have the opportunity to make your decisions on a day-by-day basis for the simulation. You will interact with the actual model of the fishing ground together with the other persons of your group. Thus, the problems and possibilities you will experience in this warm-up are relevant for the design of your strategy. </p> <p> The <b>interface</b> you will encounter on the next page has the following elements: <ul> <li>Information on the day of the simulation</li> <li>Buttons for your decision. If you want to fish in Bay 1, for example, click on Button "Bay 1". </li> <li>Time remaining. You have 10 seconds for each decision. If you do not press any button within these 10 seconds then you will stay in the harbor for this day. However, you can change your decision within these 10 seconds (i.e. if you clicked on "Bay 1" after 4 seconds and after another 4 seconds on "Bay 3", you will go to Bay 3). </li> <li>Table of past results. Your previous locations from past days are highlighted. The table shows you how much you fished and who else was in the same location as you. You do not have any information of locations where you not have been. </li> ',60,'<b>A warm-up</b>',5,1),(6,'',345,'<b>Day-by-day-decisions</b>',6,1),(7,'<p>In what we refer to as a \'strategy\' you predefine your decisions of where to go each day of the simulation.\r Al-though only 30 days will be simulated, your strategy should represent your decisions for an indefinite period. Therefore you define a <b>set of decisions that will be repeated</b> until the end of the simulation. The set can contain as many decisions as you want but try to use as few as possible. Remember: Often simple strategies are more effective!</p> <p>It might be that you want to base your set of repeated decisions on another state of the fish population. In this case you can define a set of not repeated decisions that are applied at the beginning of the simulation. For example, you might first stay in the harbor to let the fish population increase or first fish all the bays to reduce the fish population before you start the repeated sequence of decisions.</p> <p>In this strategy you define how many days you stay at a certain location and to which other location you will move on.\r If, for example, you define to repeat the sequence \"2 days in harbor - 3 days in Bay 1 - 2 days in Bay 2\" you will not fish for two days, then fish in Bay 1 for three days, then fish in Bay 2 for two days, then not fish for two days, then fish in Bay 1 for three days, etc.</p> ',480,'<b>Designing your Strategy</b>',1,2),(8,'<p>Your strategy is mainly based on the number of days you stay at a certain location. However, things might run differently than you expected and you might wish to leave a bay earlier than the days you specified because you get too few fish out of that bay. For doing so you can specify a threshold of income. If you fish less then this threshold, the next day you will not fish this bay anymore but move on to the next location specified in your strategy.</p> <p>Note: Thresholds refer to the quantity of fish you get during one day fishing in a bay and not, for example, to the quantity of fish in the bay, fish fished by others, sum of fish already fished, etc.</p> <p>The final option you have is to stop repeating your strategy and stay in the harbor for some days. This op-tion can be used to prevent the total destruction of the fish population. For this you define a threshold and a number of days. If during one repetition of your decision set you never fished the amount defined by the threshold, then you stay in the harbor for the specified number of days before you start the next repetition.</p> <p>Note: Intentionally we do not allow designing \'intelligent\' strategies that search for solutions during the game. You have to think about what would be the best solution for you and express it with the options explained above.</p> ',90,'<b>Some special features of the strategy design</b>',2,2),(9,'<p>Design your strategy by clicking on <b>\'New\'</b> and <b>\'Delete\'</b>. You have to specify at least one repeated decision! If you are not sure about the meaning of the concepts used, refer to the information window \'Help for strategy design\'. </br>\rWhen you are done, click on <b>\'Next\'</b> </p>',480,'<b>Design your strategy</b>',3,2),(10,'<p>Please specify three goals that most influenced the design of your strategy. You can select from 18 different goals grouped in three categories (foci). </p><p>First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal.</p><p> The information you write into these fields will be available the next time you edit your strategy.</p>',30,'<b>What goals did you follow when designing your strategy?</b>',3,3),(11,'<p>We will ask you a number of questions on the strategy you just designed. This will help us to better understand how you came up with your strategy and it might help you reflect on certain aspects to improve your strategy.</p>\r<p>Besides <b>large fields</b> to write text and <b>small fields</b> to write numbers, you will encounter drop-down lists for selecting predefined values and scales. </p>\r<p>To give an answer on a scale, click on the location between the labels that comes closest to your opinion. By clicking on the scale, a slider appears that marks the value you selected. You can change the value by clicking on another position on the scale. By clicking on the reset button, the sliders of all scales on a page are removed and you can start selecting values again.</p>\r<p>Please try to answer all questions even if you are not sure. We are not testing your abilities but rather want to understand how you came up with your strategy.</p>\r',30,'<b>Introduction to questionnaire</b>',1,3),(12,'<p>Please explain your strategy with a few sentences. Particularly consider the following aspects:</p>',300,'<b>Explain the strategy in your own words</b>',2,3),(13,'<p>Specify the three goals that you think most influenced the design of the strategy of the other fishermen in your group. You can select from 18 different goals grouped in three categories (foci).</p>\r<p>First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal</p>\r',30,'<b>What goals do you think the others follow?</b>',4,3),(14,'',30,'<b>How do you perceive your group?</b>',5,3),(15,'',30,'<b>How much do you count on others and how much can they count on you?</b>',6,3),(16,'',30,'<b>What else influenced your strategy design?</b>',7,3),(17,'',60,'<b>How confident are you in reaching the outcomes you are expecting?</b>',8,3),(18,'<p>Fill in the following table your expectations of the others’ actions (i.e. the number of fishermen in each bay) for the first 15 days. Please note that we ask only for the expectations of where the others will go. </p>',180,'<b>What are you expecting the others will do?</b>',9,3),(19,'<p>Please enter in the table below your expectations of how the fish population develops within the first six days. Note that by clicking on “Update” the earnings and fish remaining in the bays is calculated, using your expecta-tions of the other’s actions and your strategy. Thus, you only have to think about how the fish population changes from one day to the next due to growth and movement of the fish. These estimations can be really rough. We do not expect you do perform detailed calculations.</p>\r<b>Note: You can only change the entries of one day at a time. To calculate the values and activate the next day for entries click on “Update”. You cannot return to previous days!</b>\r',180,'<b>What are you expecting how the fish population will develop?</b>',10,3),(20,'By clicking on “Accept” you will leave this part of the questionnaire and return to the strategy design. <b>You can-not return to this or previous pages!</b> However, important information for the design of your strategy will be available in information windows.',30,'<b>Leaving questionnaire on your strategy</b>',11,3),(21,'<p>The previous questions may have lead to some reflections on your strategy and you may wish to change some elements of it. Among the information windows you will find your previous strategy, your goals and your fore-cast.</p>\r<p>The time for editing your strategy depends on how fast you finished the questionnaire. For the next simulation we have to synchronize the group again. If you have been rather fast, you can think now more deeply about your strategy. If you are rather behind the time suggestion, you have to make your changes quickly.</p>\r<p>The interface for designing your strategy will not be explained again. If you are not sure about some elements, please refer to the information window “Help on strategy design”.</p>\r',30,'<b>Edit your strategy</b>',1,4),(22,'<p>Design your strategy by clicking on <b>\'New\'</b> and <b>\'Delete\'</b>. You have to specify at least one repeated decision! If you are not sure about the meaning of the concepts used, refer to the information window \'Help for strategy design\'. </br>\rWhen you are done, click on <b>\'Next\'</b> </p>',240,'<b>Design your strategy</b>',2,4),(23,'<p>Before we present the results of your strategy, we would like to see again how you make your decisions day-by-day. On the next page you will find the same interface as you already used to decide on how to fish the modeled fishing grounds.</p>',15,'<b>Applying your strategy in day-by-day decisions</b>',1,5),(24,'',345,'<b>Day-by-day-decisions</b>',2,5),(25,'<p>We will now present you the results of your strategy. By clicking on “Accept” you cannot return to this or any previous page, but the results of your day-by-day decisions (and also of your strategy) will be available in an information window.</p>',15,'<b>Leaving day-bay-day decisions</b>',3,5); +INSERT INTO `question_group` VALUES (1,'In this experiment you will design a strategy to fish in an abstract fishing ground together with three other persons. As we are mainly interested in the reasons <i>why</i> you choose a certain strategy, we will ask you a number of questions. For the same reason, there are no correct or wrong strategies and no correct or wrong answers. However, since for each pound of fish you get during the experiment you will receive $1.00 US, you might be interested in finding a strategy that fits your goals well. For this, you will need to understand the dynamics of the (simulated) fish population and anticipate well the behavior of the other persons of your group.',30,'<b>Welcome to the E-Fishery Experiment</b>',1,1),(2,'<p>The experiment will run as follows:</p> <ul> <li><b>Introduction</b>: We will explain the interface and how the dynamics of the fish population are modeled. We will also ask you some questions about you and you will have the opportunity to make your decisions on how to fish on a (simulated) day-by-day basis to get a feeling for the dynamics of the fish population. </li> <li><b>Strategy design 1</b>: You will design a fishing strategy that will be simulated together with the strategies of the other persons in your group, and we ask you a larger amount of questions to understand your decisions and to help you reflect on those decisions. </li> <li><b>Fishing and evaluation 1</b>: Besides simulating the strategies you will decide on how to fish on a (simulated) day-by-day basis. Then, we will ask you some questions on your evaluation of the results. </li> <li><b>Communication</b>:You will have the opportunity to chat with the other persons in your group. After the chat we will ask some questions to asses your evaluation of the communication. </li> <li><b>Strategy design, fishing and evaluation 2</b>: The strategy design, fishing and evaluation are repeated as described above. </li> <li><b>Finishing the experiment</b>: The experiment closes with some final questions and more information on the experiment, and you will have the opportunity to give a feedback if you wish to do so. </li> </ul> <p> In the <b>information bar above the main window</b> you can see which part of the experiment you are in, your progress and how you are doing with the time. </p>',30,'<b>Experimental procedure</b>',2,1),(3,'<p>The <b>information window "Fishing Ground"</b> gives you an overview that will be explained here.</p> <p> Imagine you are living on an island and your only income is from a species of fish that only survives in the shallow bays formed by the island. The fish can leave crowed bays and move to less crowded bays, but they cannot survive in the ocean. Nor can new fish arrive from the ocean. </p> <p> The fish population grows at a constant rate. Thus, the more fish are in a bay the faster the population grows. However, the population a bay can sustain is limited and fish leave crowed bays to find less crowded bays. The more crowded a bay, the more fish leave and the less fish enter the bay (the movement is directly proportional to the percentage to which a bay is filled up). The number of fish leaving the bay is proportional to the rate of growth, and the number of fish entering the bay is also proportional to the amount of fish leaving the three bays (i.e. fish in the ocean). </p> <p> The equations of these dynamics are given in the information windows. It is, however, not necessary to know them for designing a strategy. For this, you only have to <b>understand the following five principles</b>: </p> <ul> <li>If all bays are <b>filled up</b> with fish, then the total growth is highest, but all additional lbs of fish are lost to the ocean and the amount of fish in the bays stops growing.</li> <li>If the bays are <b>half filled</b>, then the amount of fish in the bays grows fastest.</li> <li>If the bays are <b>nearly empty</b>, the population grows very slowly.</li> <li>If there is <b>no fish</b> in any of the bays, there will be never any fish again.</li> <li>If there are both <b>crowded and empty</b> bays, a lot of fish move from the crowded to the empty bays.</li> </ul> ',120,'<b>How the dynamics of the fish population are modeled</b>',3,1),(4,'<p>The three bays are different in size and characteristics leading to different growth rates and capacities (i.e. the maximal amount of fish the bay can sustain). At the start of the simulation each bay is half filled.</p> <table> <thead> <th></th><th>Bay 1</th><th>Bay 2</th><th>Bay 3</th> </thead> <tbody> <tr> <td>Capacity:</td><td>10 lb</td><td>20 lb</td><td>30 lb</td> </tr> <tr> <td>Starts with:</td><td>5 lb</td><td>10 lb</td><td>15 lb</td> </tr> <tr> <td>Growth rate:</td><td>50% per day</td><td>15% per day</td><td>5% per day</td> </tr> </tbody> </table> <p> <b>How much fish</b> you take out in a day is <b>directly proportional with the extent that the bay is filled up with fish</b>. Your fishing gear allows you to harvest a maximum of 5 lbs. Thus, if the bay is completely filled up you get 5 lb of fish. If the bay is half filled, you get 2.5 lb of fish. If the bay is filled up only to 20 % you will get 1 lb, etc. The fish population is diminished by the same amount. If several persons fish the same bay and together would get more fish than the bay holds, then all the fish in the bay are distributed equally among these fishermen. </p> <p>However, you can <b>stay in the harbor</b> instead of fishing. This way, you do not get anything and the fish population is not diminished. </p> <p> Your task is to design a strategy of how to fish this fishing ground for 30 days together with three other persons (thus, with you the group compromises 4 persons). You will define the number of days that you stay in each bay or in the harbor. Please note that this is not an exam! We do not expect you to find the mathematically optimal solution to this problem. We want to know how you come up with a solution that sufficiently fulfills your goals. As long as we can understand why you choose a certain strategy you can come up with whatever you like. </p> ',120,'<b>Differences of bays and effects of fishing</b>',4,1),(5,'<p>Before designing the strategy, you have the opportunity to make your decisions on a day-by-day basis for the simulation. You will interact with the actual model of the fishing ground together with the other persons of your group. Thus, the problems and possibilities you will experience in this warm-up are relevant for the design of your strategy. </p> <p> The <b>interface</b> you will encounter on the next page has the following elements: <ul> <li>Information on the day of the simulation</li> <li>Buttons for your decision. If you want to fish in Bay 1, for example, click on Button "Bay 1". </li> <li>Time remaining. You have 10 seconds for each decision. If you do not press any button within these 10 seconds then you will stay in the harbor for this day. However, you can change your decision within these 10 seconds (i.e. if you clicked on "Bay 1" after 4 seconds and after another 4 seconds on "Bay 3", you will go to Bay 3). </li> <li>Table of past results. Your previous locations from past days are highlighted. The table shows you how much you fished and who else was in the same location as you. You do not have any information of locations where you not have been. </li> ',60,'<b>A warm-up</b>',5,1),(6,'',345,'<b>Day-by-day-decisions</b>',6,1),(7,'<p>In what we refer to as a \'strategy\' you predefine your decisions of where to go each day of the simulation.\r Al-though only 30 days will be simulated, your strategy should represent your decisions for an indefinite period. Therefore you define a <b>set of decisions that will be repeated</b> until the end of the simulation. The set can contain as many decisions as you want but try to use as few as possible. Remember: Often simple strategies are more effective!</p> <p>It might be that you want to base your set of repeated decisions on another state of the fish population. In this case you can define a set of not repeated decisions that are applied at the beginning of the simulation. For example, you might first stay in the harbor to let the fish population increase or first fish all the bays to reduce the fish population before you start the repeated sequence of decisions.</p> <p>In this strategy you define how many days you stay at a certain location and to which other location you will move on.\r If, for example, you define to repeat the sequence \"2 days in harbor - 3 days in Bay 1 - 2 days in Bay 2\" you will not fish for two days, then fish in Bay 1 for three days, then fish in Bay 2 for two days, then not fish for two days, then fish in Bay 1 for three days, etc.</p> ',480,'<b>Designing your Strategy</b>',1,2),(8,'<p>Your strategy is mainly based on the number of days you stay at a certain location. However, things might run differently than you expected and you might wish to leave a bay earlier than the days you specified because you get too few fish out of that bay. For doing so you can specify a threshold of income. If you fish less then this threshold, the next day you will not fish this bay anymore but move on to the next location specified in your strategy.</p> <p>Note: Thresholds refer to the quantity of fish you get during one day fishing in a bay and not, for example, to the quantity of fish in the bay, fish fished by others, sum of fish already fished, etc.</p> <p>The final option you have is to stop repeating your strategy and stay in the harbor for some days. This op-tion can be used to prevent the total destruction of the fish population. For this you define a threshold and a number of days. If during one repetition of your decision set you never fished the amount defined by the threshold, then you stay in the harbor for the specified number of days before you start the next repetition.</p> <p>Note: Intentionally we do not allow designing \'intelligent\' strategies that search for solutions during the game. You have to think about what would be the best solution for you and express it with the options explained above.</p> ',90,'<b>Some special features of the strategy design</b>',2,2),(9,'<p>Design your strategy by clicking on <b>\'New\'</b> and <b>\'Delete\'</b>. You have to specify at least one repeated decision! If you are not sure about the meaning of the concepts used, refer to the information window \'Help for strategy design\'. </br>\rWhen you are done, click on <b>\'Next\'</b> </p>',480,'<b>Design your strategy</b>',3,2),(10,'<p>Please specify three goals that most influenced the design of your strategy. You can select from 18 different goals grouped in three categories (foci). </p><p>First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal.</p><p> The information you write into these fields will be available the next time you edit your strategy.</p>',30,'<b>What goals did you follow when designing your strategy?</b>',3,3),(11,'<p>We will ask you a number of questions on the strategy you just designed. This will help us to better understand how you came up with your strategy and it might help you reflect on certain aspects to improve your strategy.</p>\r<p>Besides <b>large fields</b> to write text and <b>small fields</b> to write numbers, you will encounter drop-down lists for selecting predefined values and scales. </p>\r<p>To give an answer on a scale, click on the location between the labels that comes closest to your opinion. By clicking on the scale, a slider appears that marks the value you selected. You can change the value by clicking on another position on the scale. By clicking on the reset button, the sliders of all scales on a page are removed and you can start selecting values again.</p>\r<p>Please try to answer all questions even if you are not sure. We are not testing your abilities but rather want to understand how you came up with your strategy.</p>\r',30,'<b>Introduction to questionnaire</b>',1,3),(12,'<p>Please explain your strategy with a few sentences. Particularly consider the following aspects:</p>',300,'<b>Explain the strategy in your own words</b>',2,3),(13,'<p>Specify the three goals that you think most influenced the design of the strategy of the other fishermen in your group. You can select from 18 different goals grouped in three categories (foci).</p>\r<p>First select the focus of the goal (earnings, fish population or the other fishermen). Based on this selection, the list on the right hand sight will be filled and you can select one of these goals. For the second and third most important goal, also state, how much less important they are in relation to the most important goal</p>\r',30,'<b>What goals do you think the others follow?</b>',4,3),(14,'',30,'<b>How do you perceive your group?</b>',5,3),(15,'',30,'<b>How much do you count on others and how much can they count on you?</b>',6,3),(16,'',30,'<b>What else influenced your strategy design?</b>',7,3),(17,'',60,'<b>How confident are you in reaching the outcomes you are expecting?</b>',8,3),(18,'<p>Fill in the following table your expectations of the others’ actions (i.e. the number of fishermen in each bay) for the first 15 days. Please note that we ask only for the expectations of where the others will go. </p>',180,'<b>What are you expecting the others will do?</b>',9,3),(19,'<p>Please enter in the table below your expectations of how the fish population develops within the first six days. Note that by clicking on “Update” the earnings and fish remaining in the bays is calculated, using your expecta-tions of the other’s actions and your strategy. Thus, you only have to think about how the fish population changes from one day to the next due to growth and movement of the fish. These estimations can be really rough. We do not expect you do perform detailed calculations.</p>\r<b>Note: You can only change the entries of one day at a time. To calculate the values and activate the next day for entries click on “Update”. You cannot return to previous days!</b>\r',180,'<b>What are you expecting how the fish population will develop?</b>',10,3),(20,'By clicking on “Accept” you will leave this part of the questionnaire and return to the strategy design. <b>You can-not return to this or previous pages!</b> However, important information for the design of your strategy will be available in information windows.',30,'<b>Leaving questionnaire on your strategy</b>',11,3),(21,'<p>The previous questions may have lead to some reflections on your strategy and you may wish to change some elements of it. Among the information windows you will find your previous strategy, your goals and your fore-cast.</p>\r<p>The time for editing your strategy depends on how fast you finished the questionnaire. For the next simulation we have to synchronize the group again. If you have been rather fast, you can think now more deeply about your strategy. If you are rather behind the time suggestion, you have to make your changes quickly.</p>\r<p>The interface for designing your strategy will not be explained again. If you are not sure about some elements, please refer to the information window “Help on strategy design”.</p>\r',30,'<b>Edit your strategy</b>',1,4),(22,'<p>Design your strategy by clicking on <b>\'New\'</b> and <b>\'Delete\'</b>. You have to specify at least one repeated decision! If you are not sure about the meaning of the concepts used, refer to the information window \'Help for strategy design\'. </br>\rWhen you are done, click on <b>\'Next\'</b> </p>',240,'<b>Design your strategy</b>',2,4),(23,'<p>Before we present the results of your strategy, we would like to see again how you make your decisions da... [truncated message content] |
From: <see...@us...> - 2009-07-23 19:03:16
|
Revision: 204 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=204&view=rev Author: seematalele Date: 2009-07-23 19:03:10 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Resolved errors in Student.as and StudentResponse.as and removed Alert.show() statements from InitialiseDatabase.mxml Modified Paths: -------------- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml mentalmodels/trunk/flex/src/actionscript/Student.as mentalmodels/trunk/flex/src/actionscript/StudentResponse.as mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java Modified: mentalmodels/trunk/flex/src/InitialiseDatabase.mxml =================================================================== --- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-23 18:36:45 UTC (rev 203) +++ mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-23 19:03:10 UTC (rev 204) @@ -58,26 +58,6 @@ private var survey:XML = <list> <module title="Survey Questions" id="0" sequenceNo="0" hours="0" min="0" sec="0"/> - <module title="Preexperiment" sequenceNo="1" hours="0" min="3" sec="0" id="1"> - <block name="Introduction" sequenceNo="1" hours="0" min="3" sec="0" id="1"> - <questiongroup header="Welcome to E-Fishery Experiment" - description="In this experiment you will design..." sequenceNo="1" - hours="0" min="3" sec="0" id="1" /> - - </block> - - </module> - <module title ="Game Round" sequenceNo="2" hours="1" min="30" sec="0" id="2"> - <block name="Characterizing Own Strategy" sequenceNo="1" hours="0" min="30" sec="0" id="2"> - <questiongroup header="What goals did you follow when designing your strategy" description="Please specify three goals..." hours="0" min="3" sec="0" sequenceNo="1" id="2"> - <question title="Most important goal" type="categorical" sequenceNo="1" communication="true" id="1" > - </question> - <question title="second important goal" type="psychometric" sequenceNo="2" communication="false" id="2" > - </question> - </questiongroup> - </block> - - </module> </list>; /** @@ -372,7 +352,7 @@ newQNode.@type = question.type; newQNode.@id = question.id; newQNode.@communication = question.communicationQ; - Alert.show("communication : " + question.communicationQ); + //Alert.show("communication : " + question.communicationQ); } return newQNode; @@ -987,7 +967,7 @@ asPsychometric.type = questionInfo.getType(); asPsychometric.communicationQ = questionInfo.isCommunicationQuestion(); //Alert.show("Psychometric Object :"); - Alert.show("Communication: " + asPsychometric.communicationQ); + //Alert.show("Communication: " + asPsychometric.communicationQ); //Alert.show("SeQ No: " + asPsychometric.sequenceNo); //Alert.show("Type : " + asPsychometric.type); @@ -1121,7 +1101,7 @@ question.sequenceNo = int(questionInfo.getSequenceNo()); question.type = questionInfo.getType(); question.communicationQ = questionInfo.isCommunicationQuestion(); - Alert.show("communication : " + questionInfo.isCommunicationQuestion()); + //Alert.show("communication : " + questionInfo.isCommunicationQuestion()); if(questionInfo.getId() == 0) { if(checkSeqNoQuestion.length() > 0) @@ -1420,7 +1400,7 @@ questionInfo.setQuestion(node.@title); questionInfo.setSequenceNo(node.@sequenceNo); questionInfo.setId(node.@id); - Alert.show("communication: " + node.@communication); + //Alert.show("communication: " + node.@communication); questionInfo.setCommunicationQuestion(node.@communication); var str:String = node.@type; /*Alert.show("q type is: " + node.@type); @@ -1653,14 +1633,14 @@ </mx:Grid> </mx:Canvas> - <mx:Tree id="treeCQ" dataProvider="{categoricalQuestions}" + <!-- <mx:Tree id="treeCQ" dataProvider="{categoricalQuestions}" labelFunction="treeLabelCategoricalQ" allowMultipleSelection="false" selectable="true" showRoot="true" height="50%" width="80%" textAlign="center"/> <mx:Spacer width="20"/> <mx:Tree id="treePQ" dataProvider="{psychometricQuestions}" labelFunction="treeLabelPsychometricQ" allowMultipleSelection="false" selectable="true" - showRoot="true" height="50%" width="80%" textAlign="center"/> + showRoot="true" height="50%" width="80%" textAlign="center"/> --> </mx:VBox> <mx:Panel id = "pnlComponent" height="100%" layout="vertical"> <mx:HBox width="100%"> Modified: mentalmodels/trunk/flex/src/actionscript/Student.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Student.as 2009-07-23 18:36:45 UTC (rev 203) +++ mentalmodels/trunk/flex/src/actionscript/Student.as 2009-07-23 19:03:10 UTC (rev 204) @@ -3,13 +3,13 @@ [Bindable] [RemoteClass(alias="edu.asu.commons.mme.entity.Student")] - public var class Student + public class Student { - public id:int; + public var id:int; - public var group:Group; + //public var group:Group; public var studentNo:int; Modified: mentalmodels/trunk/flex/src/actionscript/StudentResponse.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/StudentResponse.as 2009-07-23 18:36:45 UTC (rev 203) +++ mentalmodels/trunk/flex/src/actionscript/StudentResponse.as 2009-07-23 19:03:10 UTC (rev 204) @@ -7,7 +7,7 @@ public class StudentResponse { public var id:Number; - public var student:Student; + public var student:actionscript.Student; public var question:Question; public var response:String; } 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 2009-07-23 18:36:45 UTC (rev 203) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2009-07-23 19:03:10 UTC (rev 204) @@ -33,6 +33,8 @@ } } + //public void daybyday + public void setStudentDao(HibernateStudentDao studentDao) { this.studentDao = studentDao; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2009-07-23 18:36:53
|
Revision: 203 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=203&view=rev Author: seematalele Date: 2009-07-23 18:36:45 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Created InformationWindow.as and Student.as Added student variable in StudentStrategy.java and DaybyDayDecision.java Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java Added Paths: ----------- mentalmodels/trunk/flex/src/actionscript/InformationWindow.as mentalmodels/trunk/flex/src/actionscript/Student.as Added: mentalmodels/trunk/flex/src/actionscript/InformationWindow.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/InformationWindow.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/InformationWindow.as 2009-07-23 18:36:45 UTC (rev 203) @@ -0,0 +1,17 @@ +package actionscript +{ + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.InformationWindow")] + public class InformationWindow + { + public var id:int; + + public var sequenceNo:int; + + public var title:String; + + public var block:Block; + + + } +} \ No newline at end of file Added: mentalmodels/trunk/flex/src/actionscript/Student.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/Student.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/Student.as 2009-07-23 18:36:45 UTC (rev 203) @@ -0,0 +1,32 @@ +package actionscript +{ + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.Student")] + + public var class Student + { + + public id:int; + + + public var group:Group; + + + public var studentNo:int; + + + public var birthYear:int; + + public var major:String; + + public var semester:String; + + + public var timestamp:Date; + + + public var gender:String; + + + } +} \ No newline at end of file Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-22 21:59:10 UTC (rev 202) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-23 18:36:45 UTC (rev 203) @@ -19,22 +19,22 @@ @Id @GeneratedValue - public Long id; + private Long id; @Column(nullable=false) - public Integer dayNumber; + private Integer dayNumber; @ManyToOne @JoinColumn(nullable=false) - public Location location; + private Location location; //earning will be in pound @Column(nullable=false) - public Double earnings; + private Double earnings; @Column(nullable=false) - public Double money; + private Double money; @ManyToOne @JoinColumn(nullable=false) @@ -79,6 +79,14 @@ public Student getStudent() { return student; } + + public void setDayNumber(Integer dayNumber) { + this.dayNumber = dayNumber; + } + + public Integer getDayNumber() { + return dayNumber; + } } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java 2009-07-22 21:59:10 UTC (rev 202) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Student.java 2009-07-23 18:36:45 UTC (rev 203) @@ -42,8 +42,8 @@ @Temporal(TemporalType.TIMESTAMP) private Date timestamp; - @Enumerated(EnumType.ORDINAL) - private Gender gender; + + private String gender; public Long getId() { return id; @@ -93,11 +93,11 @@ return semester; } - public void setGender(Gender gender) { + public void setGender(String gender) { this.gender = gender; } - public Gender getGender() { + public String getGender() { return gender; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-22 21:59:10 UTC (rev 202) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-23 18:36:45 UTC (rev 203) @@ -24,7 +24,7 @@ @Id @GeneratedValue - public Long id; + private Long id; @ManyToOne @JoinColumn(nullable=false) @@ -35,13 +35,13 @@ private Round roundConfig; @Column(name = "allocation_sequence_no",nullable=false) - public Integer allocationSeqNo; + private Integer allocationSeqNo; @Column(nullable=false) - public Integer days; + private Integer days; @Column(nullable=false) - public Double threshold; + private Double threshold; @ManyToOne @JoinColumn(nullable=false) Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 21:59:10 UTC (rev 202) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-23 18:36:45 UTC (rev 203) @@ -34,7 +34,7 @@ Student student = new Student(); student.setBirthYear(birthYear); student.setSemester(semester); - student.setGender(Gender.valueOf(gender)); + student.setGender(gender); student.setMajor(major); student.setTimestamp(new Timestamp(new Date().getTime())); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-23 18:20:05
|
Today I come into work at 11:00am. I will be working on the list of tasks that Seema has given me, alongside the tasks that I have planned out myself. I will begin by finding several browsers, and examining how mme displays on each of them I will then try to figure out how to format the page to look the same on each browser. After that, I will create actionscript classes for each entity that we have so far. Then I will work on formatting module 3 so that it can be put into database. |
From: Kalin J. <kj...@as...> - 2009-07-22 21:59:53
|
Today I check out of work at 15:00pm (4.75hr) We worked on the communication between the server and the client program. I created code to report the answer for Forecasting questions, and all it needs now is for me to send this to the server. I also made each component actually store the questions in them, instead of just the description. On Wed, Jul 22, 2009 at 10:46 AM, Kalin Jonas <kj...@as...> wrote: > Today I come in to work at 10:15am > Took a few minutes to get a working internet connection. > > Today I will work with Seema on paired programming, making sure the > answerservice is being properly utilized. > We will make sure that every communication with the database is working > properly. > |
From: <kj...@us...> - 2009-07-22 21:59:15
|
Revision: 202 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=202&view=rev Author: kjonas Date: 2009-07-22 21:59:10 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Added help window to InformationWindowCreator.as. Added the Question object into Question components. Increased width of PsychometricQuestionC.mxml sliders. Added code for reporting values of questions in FisheryExperimentCore.mxml. Modified Paths: -------------- mentalmodels/trunk/flex/src/actionscript/InformationWindowCreator.as mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml mentalmodels/trunk/flex/src/custom/questions/CategoricalQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/TextQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.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/psychometric/PsychometricQuestionC.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml Modified: mentalmodels/trunk/flex/src/actionscript/InformationWindowCreator.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/InformationWindowCreator.as 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/actionscript/InformationWindowCreator.as 2009-07-22 21:59:10 UTC (rev 202) @@ -335,7 +335,7 @@ tempWindow.addItem(temp); temp = new StrategyDesignQuestionC(); - (temp as StrategyDesignQuestionC).description = "This is the strategy that you designed previously. Use it for reference."; + (temp as StrategyDesignQuestionC).question.question = "This is the strategy that you designed previously. Use it for reference."; (temp as StrategyDesignQuestionC).enabled = false; tempWindow.addItem(temp); updateObject.strategy = temp as StrategyDesignQuestionC; Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -153,45 +153,87 @@ for(var j:int=0; j<curr.numChildren; j++) { studentResponse = new StudentResponse(); -// studentResponse.student = Id; + studentResponse.student = studentObject; + studentResponse.question = null; + var row:int, col:int; + if(curr.getChildAt(j) is TextQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as TextQuestionC).description; + studentResponse.question = (curr.getChildAt(j) as TextQuestionC).question; studentResponse.response = (curr.getChildAt(j) as TextQuestionC).textAnswer.text; } else if(curr.getChildAt(j) is PsychometricQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as PsychometricQuestionC).description; + studentResponse.question = (curr.getChildAt(j) as PsychometricQuestionC).question; studentResponse.response = (curr.getChildAt(j) as PsychometricQuestionC).slider1.getValue() + ""; } else if(curr.getChildAt(j) is CategoricalQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as CategoricalQuestionC).description; + studentResponse.question = (curr.getChildAt(j) as CategoricalQuestionC).question; studentResponse.response = (curr.getChildAt(j) as CategoricalQuestionC).comboTopic.selectedItem as String; studentResponse.response += ", "; studentResponse.response += (curr.getChildAt(j) as CategoricalQuestionC).comboSpecific.selectedItem as String; } else if(curr.getChildAt(j) is DayByDayDecisionsQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as DayByDayDecisionsQuestionC).description; + studentResponse.question = (curr.getChildAt(j) as DayByDayDecisionsQuestionC).question; studentResponse.response = null; } else if(curr.getChildAt(j) is ForecastingPeopleQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as ForecastingPeopleQuestionC).description; - studentResponse.response = null; + var forecast1:ForecastingPeopleQuestionC = (curr.getChildAt(j) as ForecastingPeopleQuestionC); + for(row=0; row<locations.length; row++) + { + studentResponse = new StudentResponse(); + studentResponse.student = studentObject; + studentResponse.question = forecast1.question; + studentResponse.response = forecast1.peopleEntry.labels.getChildAt(row+1) + " "; + for(col=0; col<forecast1.peopleEntry.dataGrid.columnCount; col++) + { + studentResponse.response += (col+1) + ":" + forecast1.peopleEntry.getItem(row,col); + if(col<forecast1.peopleEntry.dataGrid.columnCount-1) + { + studentResponse.response += ", "; + } + } + // server: submit the response + } + studentResponse = new StudentResponse(); + studentResponse.question = null; } else if(curr.getChildAt(j) is ForecastingFishQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as ForecastingFishQuestionC).description; - studentResponse.response = null; + var forecast2:ForecastingFishQuestionC = (curr.getChildAt(j) as ForecastingFishQuestionC); + for(row=0; row<locations.length-1; row++) + { + studentResponse = new StudentResponse(); + studentResponse.student = studentObject; + studentResponse.question = forecast2.question; + studentResponse.response = forecast2.fishEntry.labels.getChildAt(row+1) + " "; + for(col=0; col<forecast2.fishEntry.dataGrid.columnCount; col++) + { + studentResponse.response += (col+1) + ":" + forecast2.fishEntry.getItem(row,col); + if(col<forecast2.fishEntry.dataGrid.columnCount-1) + { + studentResponse.response += ", "; + } + } + // server: submit the response + } + studentResponse = new StudentResponse(); + studentResponse.question = null; } else if(curr.getChildAt(j) is StrategyDesignQuestionC) { -// studentResponse.question = (curr.getChildAt(j) as StrategyDesignQuestionC).description; + studentResponse.question = (curr.getChildAt(j) as StrategyDesignQuestionC).question; studentResponse.response = null; } + + if(studentResponse.question != null) + { + // server: submit the response + } } } } Modified: mentalmodels/trunk/flex/src/custom/questions/CategoricalQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/CategoricalQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/CategoricalQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:as="actionscript.*"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -58,7 +59,7 @@ comboTopic.selectedIndex = 0; comboSpecific.selectedIndex = -1; - description = question.question; + this.question = question; } ]]> Modified: mentalmodels/trunk/flex/src/custom/questions/TextQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/TextQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/TextQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -32,7 +33,7 @@ public function loadFromQuestion(question:Question):void { - description = question.question; + this.question = question; initialize(); // init(); Modified: mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/dayByDayDecisions/DayByDayDecisionsQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -188,7 +189,7 @@ public function loadFromQuestion(question:Question):void { - description = question.question; + this.question = question; initialize(); init(); Modified: mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingFishQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:components="custom.questions.forecasting.*"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -82,7 +83,7 @@ } public function loadFromQuestion(question:Question):void { - description = question.question; + this.question = question; initialize(); init(); Modified: mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/forecasting/ForecastingPeopleQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:components="custom.questions.forecasting.*"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -65,7 +66,7 @@ } public function loadFromQuestion(question:Question):void { - description = question.question; + this.question = question; initialize(); init(); Modified: mentalmodels/trunk/flex/src/custom/questions/psychometric/PsychometricQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/psychometric/PsychometricQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/psychometric/PsychometricQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:qComp="custom.questions.psychometric.*" initialize="false"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -92,7 +93,7 @@ public function loadFromQuestion(question:Psychometric):void { - description = question.question; + this.question = question; maxValue = question.maxSliderValue; labels = loadChoices(question); Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2009-07-22 21:50:39 UTC (rev 201) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2009-07-22 21:59:10 UTC (rev 202) @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:qComp="custom.questions.strategyDesign.*"> - <mx:Text width="600" htmlText="{description}"/> + <mx:Text width="600" htmlText="{question.question}"/> <mx:Script> <![CDATA[ - [Bindable] public var description:String = ""; + import actionscript.questions.Question; + [Bindable] public var question:Question = new Question(); ]]> </mx:Script> @@ -81,7 +82,7 @@ public function loadFromQuestion(question:Question):void { - description = question.question; + this.question = question; initialize(); // init(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2009-07-22 21:50:40
|
Revision: 201 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=201&view=rev Author: kjonas Date: 2009-07-22 21:50:39 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 21:43:18 UTC (rev 200) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 21:50:39 UTC (rev 201) @@ -1,8 +1,9 @@ package edu.asu.commons.mme.service; import java.util.ArrayList; +import java.util.List; +import java.util.Date; import java.sql.Timestamp; -import java.util.List; import org.springframework.transaction.annotation.Transactional; @@ -35,8 +36,8 @@ student.setSemester(semester); student.setGender(Gender.valueOf(gender)); student.setMajor(major); - - //student.setTimestamp(new Date().get) + + student.setTimestamp(new Timestamp(new Date().getTime())); save(student); getLogger().debug("Student id is: " + student.getId()); if(!checkStudentAlreadyExists(student)) 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...> - 2009-07-22 21:43:25
|
Revision: 200 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=200&view=rev Author: seematalele Date: 2009-07-22 21:43:18 +0000 (Wed, 22 Jul 2009) Log Message: ----------- created location Service, DaybyDayDecision entity and HibernateDaybyDayDecisionDao.java and HibernateLocationDao.java Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateLocationDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/LocationService.java Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java 2009-07-22 21:43:18 UTC (rev 200) @@ -0,0 +1,13 @@ +package edu.asu.commons.mme.dao; + +import edu.asu.commons.mme.entity.DaybyDayDecision; + +public class HibernateDaybyDayDecisionDao extends HibernateDao<DaybyDayDecision>{ + + public HibernateDaybyDayDecisionDao() { + super(DaybyDayDecision.class); + // TODO Auto-generated constructor stub + } + + +} Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateLocationDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateLocationDao.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateLocationDao.java 2009-07-22 21:43:18 UTC (rev 200) @@ -0,0 +1,12 @@ +package edu.asu.commons.mme.dao; + +import edu.asu.commons.mme.entity.Location; + +public class HibernateLocationDao extends HibernateDao<Location> { + + public HibernateLocationDao() { + super(Location.class); + + } + +} Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-22 21:43:18 UTC (rev 200) @@ -0,0 +1,84 @@ +package edu.asu.commons.mme.entity; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + + +@Entity +@Table(name="day_by_day_decision") +public class DaybyDayDecision implements Serializable { + + private static final long serialVersionUID = 7159061961616165928L; + + @Id + @GeneratedValue + public Long id; + + @Column(nullable=false) + public Integer dayNumber; + + @ManyToOne + @JoinColumn(nullable=false) + public Location location; + + //earning will be in pound + @Column(nullable=false) + public Double earnings; + + + @Column(nullable=false) + public Double money; + + @ManyToOne + @JoinColumn(nullable=false) + private Student student; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setLocation(Location location) { + this.location = location; + } + + public Location getLocation() { + return location; + } + public void setEarnings(Double earnings) { + this.earnings = earnings; + } + + public Double getEarnings() { + return earnings; + } + + + public void setMoney(Double money) { + this.money = money; + } + + public Double getMoney() { + return money; + } + + public void setStudent(Student student) { + this.student = student; + } + + public Student getStudent() { + return student; + } + + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-22 21:43:18 UTC (rev 200) @@ -26,9 +26,12 @@ @GeneratedValue public Long id; - @ManyToOne @JoinColumn(nullable=false) + private Student student; + + @ManyToOne + @JoinColumn(nullable=false) private Round roundConfig; @Column(name = "allocation_sequence_no",nullable=false) @@ -116,6 +119,14 @@ public List<DayOutput> getDayOutput() { return dayOutput; } + + public void setStudent(Student student) { + this.student = student; + } + + public Student getStudent() { + return student; + } 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 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2009-07-22 21:43:18 UTC (rev 200) @@ -2,6 +2,7 @@ import java.util.List; +import edu.asu.commons.mme.dao.HibernateDaybyDayDecisionDao; import edu.asu.commons.mme.dao.HibernateStudentDao; import edu.asu.commons.mme.dao.HibernateStudentResponseDao; import edu.asu.commons.mme.entity.Student; @@ -11,6 +12,7 @@ private HibernateStudentResponseDao studentResponseDao; private HibernateStudentDao studentDao; + private HibernateDaybyDayDecisionDao dayBydayDecisionDao; StudentResponse studentResponse; @@ -35,4 +37,8 @@ this.studentDao = studentDao; } + public void setDayBydayDecisionDao(HibernateDaybyDayDecisionDao dayBydayDecisionDao) { + this.dayBydayDecisionDao = dayBydayDecisionDao; + } + } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/LocationService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/LocationService.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/LocationService.java 2009-07-22 21:43:18 UTC (rev 200) @@ -0,0 +1,20 @@ +package edu.asu.commons.mme.service; + +import java.util.ArrayList; +import java.util.List; + +import edu.asu.commons.mme.dao.HibernateLocationDao; +import edu.asu.commons.mme.entity.Location; + +public class LocationService extends Service.Base<Location, HibernateLocationDao>{ + + + public List<Location> getallLocations() + { + List<Location> locations = new ArrayList<Location>(); + locations = getDao().findAll(); + return locations; + + } + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 21:43:18 UTC (rev 200) @@ -43,7 +43,8 @@ //studentService.formGroups(); return moduleService.getModule(1); } - + + public void setModuleService(ModuleService moduleService) { this.moduleService = moduleService; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 21:43:18 UTC (rev 200) @@ -1,6 +1,7 @@ package edu.asu.commons.mme.service; import java.util.ArrayList; +import java.sql.Timestamp; import java.util.List; import org.springframework.transaction.annotation.Transactional; @@ -34,6 +35,8 @@ student.setSemester(semester); student.setGender(Gender.valueOf(gender)); student.setMajor(major); + + //student.setTimestamp(new Date().get) save(student); getLogger().debug("Student id is: " + student.getId()); if(!checkStudentAlreadyExists(student)) Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-22 21:43:18 UTC (rev 200) @@ -68,6 +68,15 @@ <property name='sessionFactory' ref='sessionFactory'/> </bean> + <bean id='dayBydayDecisionDao' class='edu.asu.commons.mme.dao.HibernateDaybyDayDecisionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='locationDao' class='edu.asu.commons.mme.dao.HibernateLocationDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <!-- spring managed service layer --> <bean id='roundService' class='edu.asu.commons.mme.service.RoundService'> @@ -80,6 +89,7 @@ <bean id='answeringService' class='edu.asu.commons.mme.service.AnsweringService'> <property name='dao' ref='studentResponseDao'/> <property name='studentDao' ref='studentDao'/> + <property name='dayBydayDecisionDao' ref='dayBydayDecisionDao'/> </bean> @@ -96,6 +106,11 @@ <property name='questionCreatorService' ref='questionCreatorService'/> <property name='studentService' ref='studentService'/> </bean> + + <bean id='locationService' class='edu.asu.commons.mme.service.LocationService'> + <property name='dao' ref='locationDao'/> + </bean> + <bean id='studentService' class='edu.asu.commons.mme.service.StudentService'> <property name='dao' ref='studentDao'/> @@ -114,6 +129,7 @@ <flex:remote-service ref="roundService" /> <flex:remote-service ref="startupService" /> <flex:remote-service ref="answeringService" /> + <flex:remote-service ref="locationService" /> <!-- Flex related information ended--> Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 20:36:40 UTC (rev 199) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 21:43:18 UTC (rev 200) @@ -32,6 +32,7 @@ <mapping class='edu.asu.commons.mme.entity.Block'/> <mapping class='edu.asu.commons.mme.entity.ModuleRoundConfig'/> <mapping class='edu.asu.commons.mme.entity.InformationWindow'/> + <mapping class='edu.asu.commons.mme.entity.DaybyDayDecision'/> </session-factory> </hibernate-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2009-07-22 20:36:48
|
Revision: 199 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=199&view=rev Author: seematalele Date: 2009-07-22 20:36:40 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Changed the initializeModule method so that it will initialize Information window for sending object o the client. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java 2009-07-22 18:55:20 UTC (rev 198) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/ModuleService.java 2009-07-22 20:36:40 UTC (rev 199) @@ -10,6 +10,7 @@ import edu.asu.commons.mme.entity.Block; import edu.asu.commons.mme.entity.CategoricalOption; import edu.asu.commons.mme.entity.CategoricalQuestion; +import edu.asu.commons.mme.entity.InformationWindow; import edu.asu.commons.mme.entity.Module; import edu.asu.commons.mme.entity.Question; import edu.asu.commons.mme.entity.QuestionGroup; @@ -30,6 +31,11 @@ { Block block = iterateBlock.next(); Hibernate.initialize(block); + Iterator<InformationWindow> infoWindow = block.getInformationWindows().iterator(); + while(infoWindow.hasNext()) + { + Hibernate.initialize(infoWindow.next()); + } Iterator<QuestionGroup> iteratorquestionGrp = block.getQuestionGroups().iterator(); { while(iteratorquestionGrp.hasNext()) 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 2009-07-22 18:55:20 UTC (rev 198) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-07-22 20:36:40 UTC (rev 199) @@ -19,6 +19,7 @@ import edu.asu.commons.mme.entity.Block; import edu.asu.commons.mme.entity.CategoricalQuestion; import edu.asu.commons.mme.entity.CategoricalOption; +import edu.asu.commons.mme.entity.InformationWindow; import edu.asu.commons.mme.entity.Module; import edu.asu.commons.mme.entity.PsychometricQuestion; import edu.asu.commons.mme.entity.Question; @@ -400,6 +401,11 @@ { Block block = iterateBlock.next(); Hibernate.initialize(block); + Iterator<InformationWindow> infoWindow = block.getInformationWindows().iterator(); + while(infoWindow.hasNext()) + { + Hibernate.initialize(infoWindow.next()); + } Iterator<QuestionGroup> iteratorquestionGrp = block.getQuestionGroups().iterator(); { while(iteratorquestionGrp.hasNext()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2009-07-22 19:22:21
|
Revision: 196 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=196&view=rev Author: kjonas Date: 2009-07-22 18:42:10 +0000 (Wed, 22 Jul 2009) Log Message: ----------- created structure (but not necessarily code) for submitting answers for each question created StudentResponse.as as alias for StudentResponse.java, for sending responses Modified Paths: -------------- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml Added Paths: ----------- mentalmodels/trunk/flex/src/actionscript/StudentResponse.as Modified: mentalmodels/trunk/flex/src/actionscript/PageDisplay.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2009-07-22 01:16:38 UTC (rev 195) +++ mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2009-07-22 18:42:10 UTC (rev 196) @@ -170,11 +170,13 @@ public function componentsNotFinished():Boolean { var returnValue:Boolean = false; - var curr:VBox = currentPage as VBox; + var curr:VBox; var messages:String = ""; - if(curr != null) + for(var pageNumber:int=0; pageNumber < pages.length; pageNumber++) { + curr = pages.getItemAt(pageNumber) as VBox; + var tempQuestion:DisplayObject; for(var i:int=0; i < curr.numChildren; i++) { Added: mentalmodels/trunk/flex/src/actionscript/StudentResponse.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/StudentResponse.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/StudentResponse.as 2009-07-22 18:42:10 UTC (rev 196) @@ -0,0 +1,14 @@ +package actionscript +{ + import actionscript.questions.Question; + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.StudentResponse")] + public class StudentResponse + { + public var id:Number; + public var student:Student; + public var question:Question; + public var response:String; + } +} Modified: mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-22 01:16:38 UTC (rev 195) +++ mentalmodels/trunk/flex/src/custom/FisheryExperimentCore.mxml 2009-07-22 18:42:10 UTC (rev 196) @@ -4,8 +4,6 @@ currentState="socioDemographic" initialize="init()" width="720" height="490"> - <mx:RemoteObject id="moduleService" destination="moduleService" fault="moduleFaultHandler(event)" result="moduleResultHandler(event)"/> - <mx:states> <mx:State name="socioDemographic"> <mx:AddChild relativeTo="{content}"> @@ -36,6 +34,7 @@ </mx:State> <mx:State name="none"> + <mx:RemoveChild target="{instructions}"/> <mx:AddChild relativeTo="{content}"> <mx:Label id="end" text="Thank you for playing!" fontSize="30"/> </mx:AddChild> @@ -57,15 +56,30 @@ <mx:Button id="btnForward" label="Forward »" click="forward()" enabled="false"/> </mx:HBox> - <mx:RemoteObject id="ss" destination="studentService" fault="faultHandler(event)" result="resultHandler(event)"/> + + <mx:RemoteObject id="roundService" destination="roundService" fault="faultHandler(event)"> + <mx:method name="getNextModule" result="moduleResultHandler(event)"/> + </mx:RemoteObject> + <mx:RemoteObject id="startupService" destination="startupService" fault="faultHandler(event)"> + <mx:method name="createStudent" result="studentResultHandler(event)"/> + <mx:method name="getFirstModule" result="moduleResultHandler(event)"/> + </mx:RemoteObject> + <mx:Producer id="producer" destination="DataPush" acknowledge="ack(event)"/> <mx:Consumer id="consumer" destination="DataPush" message="messageHandler(event.message)" /> <mx:Script> <![CDATA[ + import custom.*; + import custom.questions.*; + import custom.questions.dayByDayDecisions.DayByDayDecisionsQuestionC; + import custom.questions.forecasting.ForecastingPeopleQuestionC; + import custom.questions.forecasting.ForecastingFishQuestionC; + import custom.questions.psychometric.PsychometricQuestionC; + import custom.questions.strategyDesign.StrategyDesignQuestionC; import actionscript.*; import actionscript.questions.*; - import custom.*; + import mx.containers.VBox; import mx.controls.Label; import mx.controls.Alert; import mx.collections.ArrayCollection; @@ -94,10 +108,7 @@ public var instructionsLoaded:Boolean = false; - private var shared:SharedObject; - private var flushMessage:String; - [Bindable] - public var Id : uint; + [Bindable] public var studentObject:Student; private function newLocation(maxCapacity:Number,growth:Number):Location { @@ -130,7 +141,59 @@ } private function sendBlockQuestions():void { + if(instructions == null) return; + var studentResponse:StudentResponse; + var pages:ArrayCollection = instructions.pageDisplay.pages; + + for(var i:int=0; i<pages.length; i++) + { + var curr:VBox = pages.getItemAt(i) as VBox + + for(var j:int=0; j<curr.numChildren; j++) + { + studentResponse = new StudentResponse(); +// studentResponse.student = Id; + + if(curr.getChildAt(j) is TextQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as TextQuestionC).description; + studentResponse.response = (curr.getChildAt(j) as TextQuestionC).textAnswer.text; + } + else if(curr.getChildAt(j) is PsychometricQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as PsychometricQuestionC).description; + studentResponse.response = (curr.getChildAt(j) as PsychometricQuestionC).slider1.getValue() + ""; + } + else if(curr.getChildAt(j) is CategoricalQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as CategoricalQuestionC).description; + studentResponse.response = (curr.getChildAt(j) as CategoricalQuestionC).comboTopic.selectedItem as String; + studentResponse.response += ", "; + studentResponse.response += (curr.getChildAt(j) as CategoricalQuestionC).comboSpecific.selectedItem as String; + } + else if(curr.getChildAt(j) is DayByDayDecisionsQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as DayByDayDecisionsQuestionC).description; + studentResponse.response = null; + } + else if(curr.getChildAt(j) is ForecastingPeopleQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as ForecastingPeopleQuestionC).description; + studentResponse.response = null; + } + else if(curr.getChildAt(j) is ForecastingFishQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as ForecastingFishQuestionC).description; + studentResponse.response = null; + } + else if(curr.getChildAt(j) is StrategyDesignQuestionC) + { +// studentResponse.question = (curr.getChildAt(j) as StrategyDesignQuestionC).description; + studentResponse.response = null; + } + } + } } private function reportBlockFinished():void { @@ -140,11 +203,11 @@ } private function getNextModule():void { - reportBlockFinished(); + if(instructions != null) reportBlockFinished(); currModule = null; currModuleNumber++; - moduleService.getModule(currModuleNumber); + roundService.getNextModule(currModuleNumber); } private function moduleResultHandler(event:ResultEvent):void { @@ -170,10 +233,6 @@ gotoInstructions(); } } - private function moduleFaultHandler(event:FaultEvent):void - { - Alert.show(event.fault.message + "\n" + event.fault.getStackTrace()); - } public function getLocation():void { @@ -186,20 +245,15 @@ locations.addItem(newLocation(20, 0.15)); locations.addItem(newLocation(30, 0.05)); } - private function locationFaultHandler(event:FaultEvent):void - { - - } - private function resultHandler(event:ResultEvent):void + private function studentResultHandler(event:ResultEvent):void { - Id = event.result as uint; -// Alert.show("Student id is " + Id ); + studentObject = event.result as Student; consumer.disconnect(); } private function faultHandler(event:FaultEvent):void { -// Alert.show("event fault is " + event.fault.faultDetail); + Alert.show(event.fault.message + "\n" + event.fault.getStackTrace()); } @@ -260,7 +314,7 @@ expiredContent.addChild(obj); var info:SocioDemographicPage = SocioDemographicPage(obj); - Id=ss.createStudent(info.getYear(), info.getSemester(), info.getGender(),info.getMajor()); + Id = startupService.createStudent(info.getYear(), info.getSemester(), info.getGender(),info.getMajor()); currentState = "wait"; btnBack.enabled = btnForward.enabled = btnReset.enabled = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2009-07-22 19:22:14
|
Revision: 197 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=197&view=rev Author: kjonas Date: 2009-07-22 18:43:17 +0000 (Wed, 22 Jul 2009) Log Message: ----------- latest compiled .swf 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...> - 2009-07-22 18:55:33
|
Revision: 198 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=198&view=rev Author: seematalele Date: 2009-07-22 18:55:20 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Added InformationWindow entity which is used to to indicate which information window should be displayed to which block. Information Window part is not as generic as Questionnaire part right now. It can be extend in the future. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Block.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/InformationWindow.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Block.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Block.java 2009-07-22 18:43:17 UTC (rev 197) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Block.java 2009-07-22 18:55:20 UTC (rev 198) @@ -49,7 +49,11 @@ @OrderBy("sequenceNo") private List<QuestionGroup> questionGroups; + @OneToMany(mappedBy="block") + @OrderBy("sequenceNo") + private List<InformationWindow> informationWindows; + public void setId(Long id) { this.id = id; } @@ -100,6 +104,14 @@ return duration; } + public void setInformationWindows(List<InformationWindow> informationWindows) { + this.informationWindows = informationWindows; + } + + public List<InformationWindow> getInformationWindows() { + return informationWindows; + } + /*public void setInformationWindows(List<Integer> informationWindows) { this.informationWindows = informationWindows; } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/InformationWindow.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/InformationWindow.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/InformationWindow.java 2009-07-22 18:55:20 UTC (rev 198) @@ -0,0 +1,64 @@ +package edu.asu.commons.mme.entity; + +import java.io.Serializable; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name="information_window") +public class InformationWindow implements Serializable{ + + private static final long serialVersionUID = -1060692155087738338L; + + @Id + @GeneratedValue + private Long id; + + @Column(name="sequence_no",nullable=false) + private Integer sequenceNo; + + @Column(name="title",nullable=false) + private String title; + + @ManyToOne + @JoinColumn(nullable=false) + private Block block; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setSequenceNo(Integer sequenceNo) { + this.sequenceNo = sequenceNo; + } + + public Integer getSequenceNo() { + return sequenceNo; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getTitle() { + return title; + } + + public void setBlock(Block block) { + this.block = block; + } + + public Block getBlock() { + return block; + } +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 18:43:17 UTC (rev 197) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 18:55:20 UTC (rev 198) @@ -5,6 +5,7 @@ import org.springframework.context.event.ContextRefreshedEvent; import edu.asu.commons.mme.entity.Module; +import edu.asu.commons.mme.entity.Student; public class StartupService implements ApplicationListener { @@ -32,7 +33,7 @@ this.studentService = studentService; } - public Long createStudent(Integer birthYear, String semester,String gender,String major) { + public Student createStudent(Integer birthYear, String semester,String gender,String major) { return studentService.createStudent(birthYear, semester, gender, major); } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 18:43:17 UTC (rev 197) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StudentService.java 2009-07-22 18:55:20 UTC (rev 198) @@ -23,7 +23,7 @@ private List<Student> students = new ArrayList<Student>(); - public Long createStudent(Integer birthYear, String semester,String gender,String major) { + public Student createStudent(Integer birthYear, String semester,String gender,String major) { // System.out.println("Birthyear " + birthYear); // System.out.println("Ethnicity " + semester); // System.out.println("Gender " + gender); @@ -41,9 +41,9 @@ students.add(student); } else - return 0L; + return null; - return student.getId(); + return student; } public boolean checkStudentAlreadyExists(Student student) Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 18:43:17 UTC (rev 197) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 18:55:20 UTC (rev 198) @@ -21,9 +21,7 @@ <mapping class='edu.asu.commons.mme.entity.QuestionGroup'/> <mapping class='edu.asu.commons.mme.entity.Question'/> - - - + <mapping class='edu.asu.commons.mme.entity.CategoricalQuestion'/> <mapping class='edu.asu.commons.mme.entity.CategoricalOption'/> <mapping class='edu.asu.commons.mme.entity.ForecastingQuestion'/> @@ -33,7 +31,8 @@ <mapping class='edu.asu.commons.mme.entity.Module'/> <mapping class='edu.asu.commons.mme.entity.Block'/> <mapping class='edu.asu.commons.mme.entity.ModuleRoundConfig'/> - + <mapping class='edu.asu.commons.mme.entity.InformationWindow'/> + </session-factory> </hibernate-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-22 17:46:47
|
Today I come in to work at 10:15am Took a few minutes to get a working internet connection. Today I will work with Seema on paired programming, making sure the answerservice is being properly utilized. We will make sure that every communication with the database is working properly. |
From: <see...@us...> - 2009-07-22 01:16:45
|
Revision: 195 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=195&view=rev Author: seematalele Date: 2009-07-22 01:16:38 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Added a check box in Question.mxml for communication question. Added variable in Question.as. Changed the InitialiseDatabase.mxml so that it will work properly according to changes in Question.as and Question.mxml. Modified Paths: -------------- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml mentalmodels/trunk/flex/src/actionscript/questions/Question.as mentalmodels/trunk/flex/src/custom/db/Question.mxml Modified: mentalmodels/trunk/flex/src/InitialiseDatabase.mxml =================================================================== --- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-22 01:13:40 UTC (rev 194) +++ mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-07-22 01:16:38 UTC (rev 195) @@ -38,14 +38,11 @@ <module title ="Game Round" sequenceNo="2" hours="1" min="30" sec="0" id="2"> <block name="Characterizing Own Strategy" sequenceNo="1" hours="0" min="30" sec="0" id="2"> <questiongroup header="What goals did you follow when designing your strategy" description="Please specify three goals..." hours="0" min="3" sec="0" sequenceNo="1" id="2"> - <question title="Most important goal" type="categorical" sequenceNo="1" id="1" > + <question title="Most important goal" type="categorical" sequenceNo="1" communication="true" id="1" > </question> - <question title="second important goal" type="psychometric" sequenceNo="2" id="2" > + <question title="second important goal" type="psychometric" sequenceNo="2" communication="false" id="2" > </question> - - </questiongroup> - </block> </module> @@ -61,7 +58,26 @@ private var survey:XML = <list> <module title="Survey Questions" id="0" sequenceNo="0" hours="0" min="0" sec="0"/> - + <module title="Preexperiment" sequenceNo="1" hours="0" min="3" sec="0" id="1"> + <block name="Introduction" sequenceNo="1" hours="0" min="3" sec="0" id="1"> + <questiongroup header="Welcome to E-Fishery Experiment" + description="In this experiment you will design..." sequenceNo="1" + hours="0" min="3" sec="0" id="1" /> + + </block> + + </module> + <module title ="Game Round" sequenceNo="2" hours="1" min="30" sec="0" id="2"> + <block name="Characterizing Own Strategy" sequenceNo="1" hours="0" min="30" sec="0" id="2"> + <questiongroup header="What goals did you follow when designing your strategy" description="Please specify three goals..." hours="0" min="3" sec="0" sequenceNo="1" id="2"> + <question title="Most important goal" type="categorical" sequenceNo="1" communication="true" id="1" > + </question> + <question title="second important goal" type="psychometric" sequenceNo="2" communication="false" id="2" > + </question> + </questiongroup> + </block> + + </module> </list>; /** @@ -250,16 +266,18 @@ newQNode.@title = psychometricResult.question; newQNode.@type = psychometricResult.type; newQNode.@id = psychometricResult.id; + //Check if this question is for communication round. + newQNode.@communication = psychometricResult.communicationQ; choices = ""; if(psychometricResult.choices != null) { - + //Alert.show("choices is eqaul to : " + choices); for(var k:int = 0; k < psychometricResult.choices.length; k++) { if(choices == "") { - Alert.show("choices is eqaul to : " + choices); + //Alert.show("choices is eqaul to : " + choices); choices = psychometricResult.choices[k]; } else @@ -283,6 +301,7 @@ newQNode.@title = categoricalResult.question; newQNode.@type = categoricalResult.type; newQNode.@id = categoricalResult.id; + newQNode.@communication = categoricalResult.communicationQ; /*var questionGroup:XMLList =survey.module.block.questiongroup.(@header == node.@header); if( questionGroup.length() > 0 ) @@ -352,7 +371,8 @@ newQNode.@title = question.question; newQNode.@type = question.type; newQNode.@id = question.id; - + newQNode.@communication = question.communicationQ; + Alert.show("communication : " + question.communicationQ); } return newQNode; @@ -401,7 +421,6 @@ if( node.localName() == "categorical" ) return node.@type; - else return node.@name; @@ -966,9 +985,9 @@ asPsychometric.question = questionInfo.getQuestion(); asPsychometric.sequenceNo = int(questionInfo.getSequenceNo()); asPsychometric.type = questionInfo.getType(); - + asPsychometric.communicationQ = questionInfo.isCommunicationQuestion(); //Alert.show("Psychometric Object :"); - //Alert.show("Question: " + asPsychometric.question); + Alert.show("Communication: " + asPsychometric.communicationQ); //Alert.show("SeQ No: " + asPsychometric.sequenceNo); //Alert.show("Type : " + asPsychometric.type); @@ -1011,6 +1030,7 @@ categoricalQuestion.type = questionInfo.getType(); categoricalQuestion.question = questionInfo.getQuestion(); categoricalQuestion.sequenceNo = int(questionInfo.getSequenceNo()); + categoricalQuestion.communicationQ = questionInfo.isCommunicationQuestion(); /*for(var i:int = 0; i < categoricalQuestion.categoricalOptions.length ; i++) { var testoption:actionscript.questions.CategoricalOption = new actionscript.questions.CategoricalOption(); @@ -1059,6 +1079,7 @@ categoricalSimpleQuestion.type = questionInfo.getType(); categoricalSimpleQuestion.question = questionInfo.getQuestion(); categoricalSimpleQuestion.sequenceNo = int(questionInfo.getSequenceNo()); + categoricalSimpleQuestion.communicationQ = questionInfo.isCommunicationQuestion(); /*for(var j:int = 0; j < categoricalSimpleQuestion.categoricalOptions.length ; j++) { var testoption:ASCategoricalOption = new ASCategoricalOption(); @@ -1099,7 +1120,8 @@ question.question = questionInfo.getQuestion(); question.sequenceNo = int(questionInfo.getSequenceNo()); question.type = questionInfo.getType(); - //Alert.show("Type : " + question.type); + question.communicationQ = questionInfo.isCommunicationQuestion(); + Alert.show("communication : " + questionInfo.isCommunicationQuestion()); if(questionInfo.getId() == 0) { if(checkSeqNoQuestion.length() > 0) @@ -1186,6 +1208,7 @@ newQNode.@sequenceNo = psychometricResult.sequenceNo; newQNode.@title = psychometricResult.question; newQNode.@type = psychometricResult.type; + newQNode.@communication = psychometricResult.communicationQ; choices = ""; if(psychometricResult.choices != null) { @@ -1216,7 +1239,7 @@ newQNode.@title = categoricalResult.question; newQNode.@type = categoricalResult.type; newQNode.@id = categoricalResult.id; - + newQNode.@communication = categoricalResult.communicationQ; //flagType false means it is simple type, otherwise it is relative type var flagType:Boolean = false; @@ -1397,6 +1420,8 @@ questionInfo.setQuestion(node.@title); questionInfo.setSequenceNo(node.@sequenceNo); questionInfo.setId(node.@id); + Alert.show("communication: " + node.@communication); + questionInfo.setCommunicationQuestion(node.@communication); var str:String = node.@type; /*Alert.show("q type is: " + node.@type); questionInfo.cmbType.selectedItem = str.toLowerCase();*/ Modified: mentalmodels/trunk/flex/src/actionscript/questions/Question.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/questions/Question.as 2009-07-22 01:13:40 UTC (rev 194) +++ mentalmodels/trunk/flex/src/actionscript/questions/Question.as 2009-07-22 01:16:38 UTC (rev 195) @@ -12,6 +12,7 @@ public var type:String; public var sequenceNo:int; public var questionGroup:QuestionGroup; + public var communicationQ:Boolean; } } \ No newline at end of file Modified: mentalmodels/trunk/flex/src/custom/db/Question.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/db/Question.mxml 2009-07-22 01:13:40 UTC (rev 194) +++ mentalmodels/trunk/flex/src/custom/db/Question.mxml 2009-07-22 01:16:38 UTC (rev 195) @@ -59,9 +59,8 @@ return questionInfo; } + - - public function setQuestionType(type:String):void { for (var i: int = 0; i < cmbType.dataProvider.length; i++) @@ -75,7 +74,18 @@ } + public function setCommunicationQuestion(flag:String):void + { + if(flag == "true") + chkboxCommunication.selected = true; + else + chkboxCommunication.selected = false; + } + public function isCommunicationQuestion():Boolean + { + return chkboxCommunication.selected; + } public function validateForm(event:Event):Boolean { @@ -153,6 +163,7 @@ return currentControlIsValid; } + public function reset():void { currentState = "text"; @@ -162,8 +173,8 @@ txtSeqNo.errorString =""; rchtxtQuestion.errorString =""; cmbType.selectedIndex = -1; + chkboxCommunication.selected = false; - } ]]> @@ -196,6 +207,11 @@ <mx:RichTextEditor id="rchtxtQuestion" change="{validateForm(event)}" title="Question Editor" width="500" height="500" /> </mx:FormItem> <mx:Spacer height="20" /> + <mx:FormItem label= "Is this question for communication Round?"> + <mx:CheckBox id="chkboxCommunication" /> + </mx:FormItem> + + <mx:Spacer height="20" /> <mx:FormItem label="Select Question Type:"> <mx:ComboBox id="cmbType" change="{showQuestionType()}" width="100%" prompt="-Select-"> <mx:ArrayCollection> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2009-07-22 01:13:46
|
Revision: 194 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=194&view=rev Author: seematalele Date: 2009-07-22 01:13:40 +0000 (Wed, 22 Jul 2009) Log Message: ----------- Created CommunicationQ variable in Question which will indicate that this question should be displayed in communication, Renamed the name of the .java file from RoundConfig.java to Round.java Created a new entity ModuleRoundConfig.java which will keep track of which modules need to display which round according to sequence number. Updated init-mme.sql Modified Paths: -------------- mentalmodels/trunk/src/main/db/init-mme.sql mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java Removed Paths: ------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-22 01:13:40 UTC (rev 194) @@ -15,25 +15,7 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; --- --- Table structure for table `block` --- -DROP TABLE IF EXISTS `block`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `block` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` varchar(255) NOT NULL, - `duration` int(11) NOT NULL, - `sequence_no` int(11) NOT NULL, - `module_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK597C48D4D4A8AF3` (`module_id`), - CONSTRAINT `FK597C48D4D4A8AF3` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Dumping data for table `block` -- @@ -48,15 +30,6 @@ -- Table structure for table `categorical_option` -- -DROP TABLE IF EXISTS `categorical_option`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_option` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `optionKey` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option` @@ -72,16 +45,6 @@ -- Table structure for table `categorical_option_choices` -- -DROP TABLE IF EXISTS `categorical_option_choices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_option_choices` ( - `categorical_option_id` bigint(20) NOT NULL, - `element` varchar(255) DEFAULT NULL, - KEY `FKA2D77727CC2EF222` (`categorical_option_id`), - CONSTRAINT `FKA2D77727CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_option_choices` @@ -97,18 +60,6 @@ -- Table structure for table `categorical_options_pivot` -- -DROP TABLE IF EXISTS `categorical_options_pivot`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_options_pivot` ( - `categorical_question_id` bigint(20) NOT NULL, - `categorical_option_id` bigint(20) NOT NULL, - KEY `FK315C55828A4F6E82` (`categorical_question_id`), - KEY `FK315C5582CC2EF222` (`categorical_option_id`), - CONSTRAINT `FK315C55828A4F6E82` FOREIGN KEY (`categorical_question_id`) REFERENCES `categorical_question` (`id`), - CONSTRAINT `FK315C5582CC2EF222` FOREIGN KEY (`categorical_option_id`) REFERENCES `categorical_option` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_options_pivot` @@ -124,16 +75,6 @@ -- Table structure for table `categorical_question` -- -DROP TABLE IF EXISTS `categorical_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `categorical_question` ( - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKB9D69D254A96BF7A` (`id`), - CONSTRAINT `FKB9D69D254A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `categorical_question` @@ -149,22 +90,6 @@ -- Table structure for table `communication` -- -DROP TABLE IF EXISTS `communication`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `communication` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `message` longtext, - `timestamp` datetime DEFAULT NULL, - `roundConfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKC24ACFD63A5846C1` (`roundConfig_id`), - KEY `FKC24ACFD6992B5A41` (`student_id`), - CONSTRAINT `FKC24ACFD63A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKC24ACFD6992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `communication` @@ -179,17 +104,6 @@ -- Table structure for table `forecasting_question` -- -DROP TABLE IF EXISTS `forecasting_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `forecasting_question` ( - `day_no` int(11) NOT NULL, - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKD0793D1E4A96BF7A` (`id`), - CONSTRAINT `FKD0793D1E4A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `forecasting_question` @@ -204,23 +118,6 @@ -- Table structure for table `game` -- -DROP TABLE IF EXISTS `game`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `game` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` longtext, - `image_location` varchar(255) DEFAULT NULL, - `max_days` int(11) NOT NULL, - `max_fish_harvest` int(11) NOT NULL, - `money` double DEFAULT NULL, - `no_of_locations` int(11) NOT NULL, - `no_of_rounds` int(11) NOT NULL, - `timestamp` datetime NOT NULL, - `title` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `game` @@ -236,18 +133,6 @@ -- Table structure for table `grp` -- -DROP TABLE IF EXISTS `grp`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `grp` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `grp_number` int(11) NOT NULL, - `game_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK190E57AC42F73` (`game_id`), - CONSTRAINT `FK190E57AC42F73` FOREIGN KEY (`game_id`) REFERENCES `game` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `grp` @@ -262,18 +147,6 @@ -- Table structure for table `location` -- -DROP TABLE IF EXISTS `location`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `location` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `growth_rate` double NOT NULL, - `initial_population` int(11) NOT NULL, - `location_name` varchar(255) NOT NULL, - `max_capacity` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location` @@ -289,19 +162,6 @@ -- Table structure for table `location_round_config` -- -DROP TABLE IF EXISTS `location_round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `location_round_config` ( - `location_id` bigint(20) NOT NULL, - `roundConfigs_id` bigint(20) NOT NULL, - PRIMARY KEY (`location_id`,`roundConfigs_id`), - KEY `FK979C4B5D224FD013` (`location_id`), - KEY `FK979C4B5D1D9C6C0E` (`roundConfigs_id`), - CONSTRAINT `FK979C4B5D1D9C6C0E` FOREIGN KEY (`roundConfigs_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FK979C4B5D224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `location_round_config` @@ -317,17 +177,6 @@ -- Table structure for table `module` -- -DROP TABLE IF EXISTS `module`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `module` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` varchar(255) NOT NULL, - `duration` int(11) NOT NULL, - `sequence_no` int(11) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `module` @@ -339,22 +188,22 @@ /*!40000 ALTER TABLE `module` ENABLE KEYS */; UNLOCK TABLES; + -- +-- Dumping data for table `module_round_config` +-- + +LOCK TABLES `module_round_config` WRITE; +/*!40000 ALTER TABLE `module_round_config` DISABLE KEYS */; +INSERT INTO `module_round_config` VALUES (1,1,2,1),(2,1,3,2),(3,2,2,2); +/*!40000 ALTER TABLE `module_round_config` ENABLE KEYS */; +UNLOCK TABLES; + + +-- -- Table structure for table `psychometric_question` -- -DROP TABLE IF EXISTS `psychometric_question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `psychometric_question` ( - `max_slider_value` int(11) NOT NULL, - `scale` varchar(255) NOT NULL, - `id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK87559D014A96BF7A` (`id`), - CONSTRAINT `FK87559D014A96BF7A` FOREIGN KEY (`id`) REFERENCES `question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `psychometric_question` @@ -370,17 +219,6 @@ -- Table structure for table `psychometric_question_choices` -- -DROP TABLE IF EXISTS `psychometric_question_choices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `psychometric_question_choices` ( - `psychometric_question_id` bigint(20) NOT NULL, - `element` varchar(255) DEFAULT NULL, - KEY `FKA80B09B4FBB83ADC` (`psychometric_question_id`), - CONSTRAINT `FKA80B09B4FBB83ADC` FOREIGN KEY (`psychometric_question_id`) REFERENCES `psychometric_question` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- -- Dumping data for table `psychometric_question_choices` -- @@ -395,20 +233,6 @@ -- Table structure for table `question` -- -DROP TABLE IF EXISTS `question`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `question` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `question` longtext NOT NULL, - `sequence_no` int(11) NOT NULL, - `type` varchar(255) NOT NULL, - `question_group_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKBA823BE6CA626674` (`question_group_id`), - CONSTRAINT `FKBA823BE6CA626674` FOREIGN KEY (`question_group_id`) REFERENCES `question_group` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question` @@ -416,7 +240,7 @@ LOCK TABLES `question` WRITE; /*!40000 ALTER TABLE `question` DISABLE KEYS */; -INSERT INTO `question` VALUES (1,'Most important goal:',1,'categorical',10),(2,'Second most important goal:',2,'categorical',10),(3,'Third most important goal:',4,'categorical',10),(4,'Compared to the most important goal, this goal is',3,'psychometric',10),(6,'',1,'daybydaydecisions',6),(7,'An example of a scale would be',1,'psychometric',11),(8,'<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,'Compared to the most important goal, this goal is',5,'psychometric',10),(10,'<b>Most important goal:</b>',1,'categorical',13),(11,'<b>Second most important goal:</b>',2,'categorical',13),(12,'Compared to the most important goal, this goal is',3,'psychometric',13),(13,'<b>Third most important goal:</b>',4,'categorical',13),(14,'Compared to the most important goal, this goal is',5,'psychometric',13),(15,'Over all, how much do like your group (i.e. the other players)?',1,'psychometric',14),(16,'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,'How important is it for you that the others can reach their goals (i.e. the outcomes are fair)?',3,'psychometric',14),(18,'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,'Do you perceive the group as a team or as competing players?',5,'psychometric',14),(20,'How much do you trust the others in your group?',1,'psychometric',15),(21,'How important is it for you that the others in your group can and do trust you?',2,'psychometric',15),(22,'How much do you think your group trying to coordinate their actions to reach better outcomes for all?',3,'psychometric',15),(23,'How much are you trying to follow rules or agreements that emerged from the communication?',4,'psychometric',15),(24,'How much do you think the others are trying to follow rules or agreements that emerged from the communica-tion?',5,'psychometric',15),(25,'Do you feel a sense of ‘commitment’ to act in the way you specified in your strategy?',1,'psychometric',16),(26,'Would you feel any discomfort or tension if you would act differently than you specified in your strategy?',2,'psychometric',16),(27,'Do you feel any sort of ‘social pressure’ to act in the way you specified in your strategy?',3,'psychometric',16),(28,'Would you feel guilt or shame if you had acted differently than you specified in your strategy?',4,'psychometric',16),(29,'Are you afraid of some sort of ‘punishment’ if you had acted differently as specified in your strategy?',5,'psychometric',16),(30,'How well did you understand the dynamics of the fish population?',1,'psychometric',17),(31,'Did the others in your group understand the dynamics better or worse than you?',2,'psychometric',17),(32,'How confident are you in having developed a strategy that leads to ‘good’ outcomes regarding your goals?',3,'psychometric',17),(33,'How much does your strategy depend on how the others in the group will act to reach the desired outcomes?',4,'psychometric',17),(34,'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),(35,'',1,'forecastingfishermen',18),(36,'',1,'forecastingfish',19),(37,'',1,'strategydesign',9),(38,'',1,'strategydesign',22),(39,'',1,'daybydaydecisions',24); +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),(6,0,'',1,'daybydaydecisions',6),(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),(35,0,'',1,'forecastingfishermen',18),(36,0,'',1,'forecastingfish',19),(37,0,'',1,'strategydesign',9),(38,0,'',1,'strategydesign',22),(39,0,'',1,'daybydaydecisions',24); /*!40000 ALTER TABLE `question` ENABLE KEYS */; UNLOCK TABLES; @@ -424,21 +248,6 @@ -- Table structure for table `question_group` -- -DROP TABLE IF EXISTS `question_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `question_group` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `description` longtext, - `duration` int(11) NOT NULL, - `header` longtext, - `sequence_no` int(11) NOT NULL, - `block_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK8F8090E61F51CEC1` (`block_id`), - CONSTRAINT `FK8F8090E61F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `question_group` @@ -454,22 +263,6 @@ -- Table structure for table `round_config` -- -DROP TABLE IF EXISTS `round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `communication_flag` bit(1) NOT NULL, - `round_no` int(11) NOT NULL, - `game_id` bigint(20) DEFAULT NULL, - `round_configs_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK3BE293137AC42F73` (`game_id`), - KEY `FK3BE293131A0F70E5` (`round_configs_id`), - CONSTRAINT `FK3BE293131A0F70E5` FOREIGN KEY (`round_configs_id`) REFERENCES `game` (`id`), - CONSTRAINT `FK3BE293137AC42F73` FOREIGN KEY (`game_id`) REFERENCES `game` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `round_config` @@ -477,7 +270,7 @@ LOCK TABLES `round_config` WRITE; /*!40000 ALTER TABLE `round_config` DISABLE KEYS */; -INSERT INTO `round_config` VALUES (1,'\0',1,1,NULL),(2,'',2,1,NULL); +INSERT INTO `round_config` VALUES (1,false,1,1,NULL),(2,true,2,1,NULL); /*!40000 ALTER TABLE `round_config` ENABLE KEYS */; UNLOCK TABLES; @@ -485,19 +278,6 @@ -- Table structure for table `round_config_location` -- -DROP TABLE IF EXISTS `round_config_location`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config_location` ( - `round_config_id` bigint(20) NOT NULL, - `locations_id` bigint(20) NOT NULL, - PRIMARY KEY (`round_config_id`,`locations_id`), - KEY `FKC67B0361FDF88BCA` (`locations_id`), - KEY `FKC67B0361634CAB1E` (`round_config_id`), - CONSTRAINT `FKC67B0361634CAB1E` FOREIGN KEY (`round_config_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKC67B0361FDF88BCA` FOREIGN KEY (`locations_id`) REFERENCES `location` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `round_config_location` @@ -509,54 +289,11 @@ /*!40000 ALTER TABLE `round_config_location` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `round_config_question_group` --- -DROP TABLE IF EXISTS `round_config_question_group`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `round_config_question_group` ( - `round_config_id` bigint(20) NOT NULL, - `questionGroups_id` bigint(20) NOT NULL, - PRIMARY KEY (`round_config_id`,`questionGroups_id`), - KEY `FKAC0583924E7815A0` (`questionGroups_id`), - KEY `FKAC058392634CAB1E` (`round_config_id`), - CONSTRAINT `FKAC0583924E7815A0` FOREIGN KEY (`questionGroups_id`) REFERENCES `question_group` (`id`), - CONSTRAINT `FKAC058392634CAB1E` FOREIGN KEY (`round_config_id`) REFERENCES `round_config` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - -- --- Dumping data for table `round_config_question_group` --- - -LOCK TABLES `round_config_question_group` WRITE; -/*!40000 ALTER TABLE `round_config_question_group` DISABLE KEYS */; -/*!40000 ALTER TABLE `round_config_question_group` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `student` -- -DROP TABLE IF EXISTS `student`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `birth_year` int(11) DEFAULT NULL, - `gender` int(11) DEFAULT NULL, - `major` varchar(255) DEFAULT NULL, - `semester` varchar(255) DEFAULT NULL, - `student_no` int(11) DEFAULT NULL, - `timestamp` datetime DEFAULT NULL, - `group_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK8FFE823B65663181` (`group_id`), - CONSTRAINT `FK8FFE823B65663181` FOREIGN KEY (`group_id`) REFERENCES `grp` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student` @@ -571,22 +308,6 @@ -- Table structure for table `student_day_output` -- -DROP TABLE IF EXISTS `student_day_output`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_day_output` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `day` int(11) NOT NULL, - `earnings` double NOT NULL, - `strategy_id` bigint(20) NOT NULL, - `dayOutput_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK7B993B8846861732` (`dayOutput_id`), - KEY `FK7B993B888374539C` (`strategy_id`), - CONSTRAINT `FK7B993B8846861732` FOREIGN KEY (`dayOutput_id`) REFERENCES `student_strategy` (`id`), - CONSTRAINT `FK7B993B888374539C` FOREIGN KEY (`strategy_id`) REFERENCES `student_strategy` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_day_output` @@ -601,21 +322,6 @@ -- Table structure for table `student_response` -- -DROP TABLE IF EXISTS `student_response`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_response` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `response` longtext, - `question_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK173D15C5992B5A41` (`student_id`), - KEY `FK173D15C584109673` (`question_id`), - CONSTRAINT `FK173D15C584109673` FOREIGN KEY (`question_id`) REFERENCES `question` (`id`), - CONSTRAINT `FK173D15C5992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_response` @@ -630,22 +336,6 @@ -- Table structure for table `student_round_config` -- -DROP TABLE IF EXISTS `student_round_config`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_round_config` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `current_allocation_no` int(11) NOT NULL, - `current_day_no` int(11) NOT NULL, - `roundconfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK49C432973A5846C1` (`roundconfig_id`), - KEY `FK49C43297992B5A41` (`student_id`), - CONSTRAINT `FK49C432973A5846C1` FOREIGN KEY (`roundconfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FK49C43297992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_round_config` @@ -660,24 +350,6 @@ -- Table structure for table `student_strategy` -- -DROP TABLE IF EXISTS `student_strategy`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `student_strategy` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `allocation_sequence_no` int(11) NOT NULL, - `days` int(11) NOT NULL, - `repeated_decisions` tinyint(1) NOT NULL, - `threshold` double NOT NULL, - `location_id` bigint(20) NOT NULL, - `roundConfig_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK9615A4F73A5846C1` (`roundConfig_id`), - KEY `FK9615A4F7224FD013` (`location_id`), - CONSTRAINT `FK9615A4F7224FD013` FOREIGN KEY (`location_id`) REFERENCES `location` (`id`), - CONSTRAINT `FK9615A4F73A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `student_strategy` @@ -692,22 +364,6 @@ -- Table structure for table `suspend_repetition` -- -DROP TABLE IF EXISTS `suspend_repetition`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `suspend_repetition` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `days_in_harbor` int(11) NOT NULL, - `fishing_threshold` float NOT NULL, - `roundConfig_id` bigint(20) NOT NULL, - `student_id` bigint(20) NOT NULL, - PRIMARY KEY (`id`), - KEY `FKFBDC4543A5846C1` (`roundConfig_id`), - KEY `FKFBDC454992B5A41` (`student_id`), - CONSTRAINT `FKFBDC4543A5846C1` FOREIGN KEY (`roundConfig_id`) REFERENCES `round_config` (`id`), - CONSTRAINT `FKFBDC454992B5A41` FOREIGN KEY (`student_id`) REFERENCES `student` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `suspend_repetition` Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateRoundConfigDao.java 2009-07-22 01:13:40 UTC (rev 194) @@ -1,13 +1,13 @@ package edu.asu.commons.mme.dao; -import edu.asu.commons.mme.entity.RoundConfig; +import edu.asu.commons.mme.entity.Round; -public class HibernateRoundConfigDao extends HibernateDao<RoundConfig> { +public class HibernateRoundConfigDao extends HibernateDao<Round> { public HibernateRoundConfigDao() { - super(RoundConfig.class); + super(Round.class); } } 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 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Communication.java 2009-07-22 01:13:40 UTC (rev 194) @@ -36,7 +36,7 @@ @ManyToOne @JoinColumn(nullable = false) - private RoundConfig roundConfig; + private Round round; public void setId(Long id) { this.id = id; @@ -62,12 +62,12 @@ return timestamp; } - public void setRoundConfig(RoundConfig roundconfig) { - this.roundConfig = roundconfig; + public void setRound(Round round) { + this.round = round; } - public RoundConfig getRoundConfig() { - return roundConfig; + public Round getRound() { + return round; } public void setStudent(Student student) { Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Game.java 2009-07-22 01:13:40 UTC (rev 194) @@ -52,8 +52,8 @@ // FIXME: should this be many-to-many instead? @OneToMany - @JoinColumn(name="round_configs_id") - private List<RoundConfig> roundConfigs; + @JoinColumn(name="rounds_id") + private List<Round> rounds; public void setId(Long id) { this.id = id; @@ -82,11 +82,11 @@ return money; } - public void setRoundconfig(List<RoundConfig> roundconfig) { - this.roundConfigs = roundconfig; + public void setRoundconfig(List<Round> roundconfig) { + this.rounds = roundconfig; } - public List<RoundConfig> getRoundconfig() { - return roundConfigs; + public List<Round> getRoundconfig() { + return rounds; } public void setTimestamp(Timestamp timestamp) { this.timestamp = timestamp; @@ -124,11 +124,11 @@ public void setImageLocation(String imageLocation) { this.imageLocation = imageLocation; } - public List<RoundConfig> getRoundConfigs() { - return roundConfigs; + public List<Round> getRounds() { + return rounds; } - public void setRoundConfigs(List<RoundConfig> roundConfig) { - this.roundConfigs = roundConfig; + public void setRounds(List<Round> rounds) { + this.rounds = rounds; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Location.java 2009-07-22 01:13:40 UTC (rev 194) @@ -22,8 +22,8 @@ private Long id; @ManyToMany - @JoinColumn(name="round_configs_id") - private Set<RoundConfig> roundConfigs; + @JoinColumn(name="rounds_id") + private Set<Round> rounds; @Column(nullable=false,name="location_name") private String locationName; @@ -44,12 +44,7 @@ return id; } - public void setRoundConfigs(Set<RoundConfig> roundconfig) { - this.roundConfigs = roundconfig; - } - public Set<RoundConfig> getRoundConfigs() { - return roundConfigs; - } + public Double getGrowthRate() { return growthRate; } @@ -74,5 +69,11 @@ public void setInitialPopulation(Integer initialPopulation) { this.initialPopulation = initialPopulation; } + public void setRounds(Set<Round> rounds) { + this.rounds = rounds; + } + public Set<Round> getRounds() { + return rounds; + } } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Module.java 2009-07-22 01:13:40 UTC (rev 194) @@ -3,12 +3,16 @@ import java.io.Serializable; import java.util.List; +import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.OrderBy; import javax.persistence.Table; @@ -42,12 +46,13 @@ @Column(nullable=false) private Integer duration; - + /*@ManyToOne + private ModuleRoundConfig module_config;*/ + @OneToMany(mappedBy="module") @OrderBy("sequenceNo") private List<Block> blocks; - public void setId(Long id) { this.id = id; } @@ -80,7 +85,6 @@ return blocks; } - public void setDuration(Integer duration) { this.duration = duration; } @@ -88,6 +92,13 @@ public Integer getDuration() { return duration; } + + /*public void setModule_config(ModuleRoundConfig module_config) { + this.module_config = module_config; + } + + public ModuleRoundConfig getModule_config() { + return module_config; + }*/ - } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/ModuleRoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -0,0 +1,74 @@ +package edu.asu.commons.mme.entity; + +import java.io.Serializable; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; +import javax.persistence.OrderBy; +import javax.persistence.Table; + + +@Entity +@Table(name="module_round_config") +public class ModuleRoundConfig implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1523640426012601246L; + + @Id + @GeneratedValue + private Long id; + + @Column(name="sequence_no",nullable=false) + private Integer sequenceNo; + + @ManyToOne + @JoinColumn(nullable = false) + private Module module; + + @ManyToOne + @JoinColumn(nullable = false) + private Round round; + + + public void setSequenceNo(Integer sequenceNo) { + this.sequenceNo = sequenceNo; + } + + public Integer getSequenceNo() { + return sequenceNo; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setModule(Module module) { + this.module = module; + } + + public Module getModule() { + return module; + } + + public void setRound(Round round) { + this.round = round; + } + + public Round getRound() { + return round; + } + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Question.java 2009-07-22 01:13:40 UTC (rev 194) @@ -32,6 +32,9 @@ @Lob @Column(nullable=false) private String question; + + @Column(nullable = true, columnDefinition="Boolean default false") + private boolean communicationQ; @Column(name = "sequence_no",nullable=false) private Integer sequenceNo; @@ -86,6 +89,14 @@ return type; } + public void setCommunicationQ(boolean communicationQ) { + this.communicationQ = communicationQ; + } + + public boolean isCommunicationQ() { + return communicationQ; + } + } Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/Round.java 2009-07-22 01:13:40 UTC (rev 194) @@ -0,0 +1,81 @@ +package edu.asu.commons.mme.entity; + + +import java.io.Serializable; +import java.util.Set; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToMany; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +@Entity +@Table(name="round_config") +public class Round implements Serializable { + + private static final long serialVersionUID = 8112076402732581224L; + + @Id + @GeneratedValue + private Long id; + + @Column(name="round_no",nullable=false) + private Integer roundNo; + + @ManyToOne + private Game game; + + @Column(name="communication_flag",nullable=false,columnDefinition="Boolean default false") + private boolean communicationFlag; + + /*@ManyToOne + private ModuleRoundConfig round_config;*/ + + + @ManyToMany + private Set<Location> locations; + + public void setId(Long id) { + this.id = id; + } + public Long getId() { + return id; + } + public void setRoundNo(Integer roundNo) { + this.roundNo = roundNo; + } + public Integer getRoundNo() { + return roundNo; + } + + public void setCommunicationFlag(boolean communication_flag) { + this.communicationFlag = communication_flag; + } + public boolean getCommunicationFlag() { + return communicationFlag; + } + public void setGame(Game game) { + this.game = game; + } + public Game getGame() { + return game; + } + + public Set<Location> getLocations() { + return locations; + } + public void setLocations(Set<Location> locations) { + this.locations = locations; + } + /*public void setRound_config(ModuleRoundConfig round_config) { + this.round_config = round_config; + } + public ModuleRoundConfig getRound_config() { + return round_config; + }*/ + +} Deleted: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/RoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -1,83 +0,0 @@ -package edu.asu.commons.mme.entity; - - -import java.io.Serializable; -import java.util.Set; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - -@Entity -@Table(name="round_config") -public class RoundConfig implements Serializable { - - private static final long serialVersionUID = 8112076402732581224L; - - @Id - @GeneratedValue - private Long id; - - @Column(name="round_no",nullable=false) - private Integer roundNo; - - @ManyToOne - private Game game; - - @Column(name="communication_flag",nullable=false) - private boolean communicationFlag; - - @ManyToMany - private Set<QuestionGroup> questionGroups; - - @ManyToMany - private Set<Location> locations; - - public void setId(Long id) { - this.id = id; - } - public Long getId() { - return id; - } - public void setRoundNo(Integer roundNo) { - this.roundNo = roundNo; - } - public Integer getRoundNo() { - return roundNo; - } - - public void setCommunicationFlag(boolean communication_flag) { - this.communicationFlag = communication_flag; - } - public boolean getCommunicationFlag() { - return communicationFlag; - } - public void setGame(Game game) { - this.game = game; - } - public Game getGame() { - return game; - } - /*public void setModule(Set<Module> module) { - this.module = module; - } - public Set<Module> getModule() { - return module; - }*/ - public Set<Location> getLocations() { - return locations; - } - public void setLocations(Set<Location> locations) { - this.locations = locations; - } - public void setQuestionGroups(Set<QuestionGroup> questionGroups) { - this.questionGroups = questionGroups; - } - public Set<QuestionGroup> getQuestionGroups() { - return questionGroups; - } -} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentRoundConfig.java 2009-07-22 01:13:40 UTC (rev 194) @@ -29,7 +29,7 @@ @ManyToOne @JoinColumn(nullable = false) - private RoundConfig roundconfig; + private Round roundconfig; @Column(name="current_allocation_no", nullable=false) private Integer currentAllocationNo; @@ -53,11 +53,11 @@ return student; } - public void setRoundconfig(RoundConfig roundconfig) { + public void setRoundconfig(Round roundconfig) { this.roundconfig = roundconfig; } - public RoundConfig getRoundconfig() { + public Round getRoundconfig() { return roundconfig; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/StudentStrategy.java 2009-07-22 01:13:40 UTC (rev 194) @@ -29,7 +29,7 @@ @ManyToOne @JoinColumn(nullable=false) - private RoundConfig roundConfig; + private Round roundConfig; @Column(name = "allocation_sequence_no",nullable=false) public Integer allocationSeqNo; @@ -93,11 +93,11 @@ return repeatedDecisions; } - public void setRoundConfig(RoundConfig roundConfig) { + public void setRoundConfig(Round roundConfig) { this.roundConfig = roundConfig; } - public RoundConfig getRoundConfig() { + public Round getRoundConfig() { return roundConfig; } Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/SuspendRepetition.java 2009-07-22 01:13:40 UTC (rev 194) @@ -24,7 +24,7 @@ @ManyToOne @JoinColumn(nullable=false) - private RoundConfig roundConfig; + private Round roundConfig; @ManyToOne @JoinColumn(nullable=false) @@ -60,11 +60,11 @@ return fishingThreshold; } - public void setRoundConfig(RoundConfig roundconfig) { + public void setRoundConfig(Round roundconfig) { this.roundConfig = roundconfig; } - public RoundConfig getRoundConfig() { + public Round getRoundConfig() { return roundConfig; } 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 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -5,6 +5,7 @@ import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Set; import org.hibernate.Hibernate; import org.springframework.transaction.annotation.Transactional; @@ -22,6 +23,7 @@ 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; /** @@ -65,8 +67,8 @@ Module module = modulelist.get(i); Hibernate.initialize(module); getLogger().debug("Module object is " + module.getDescription()); - - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -93,7 +95,7 @@ } } - } + }*/ } /* * @@ -142,8 +144,8 @@ module = moduleDao.findByProperty("id", id); Hibernate.initialize(module); - - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -170,7 +172,7 @@ } } - } + }*/ if( module != null) { module.setSequenceNo(sequenceNo); @@ -196,7 +198,8 @@ module = moduleDao.find(module_Id); Hibernate.initialize(module); - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -223,7 +226,7 @@ } } - } + }*/ if(currentblock != null) { currentblock.setModule(module); @@ -268,7 +271,8 @@ block.setDuration(duration); module = moduleDao.find(module_Id); Hibernate.initialize(module); - List<Block> listBlock = module.getBlocks(); + initializeModule(module); + /*List<Block> listBlock = module.getBlocks(); Iterator<Block> iterateBlock = listBlock.iterator(); while(iterateBlock.hasNext()) { @@ -296,7 +300,7 @@ } } - } + }*/ block.setModule(module); blockDao.save(block); getLogger().debug("block is updated with Id: " + block.getId()); @@ -316,7 +320,8 @@ Hibernate.initialize(block); module = block.getModule(); Hibernate.initialize(module); - Iterator<Block> iterateBlock = module.getBlocks().iterator(); + initializeModule(module); + /*Iterator<Block> iterateBlock = module.getBlocks().iterator(); while(iterateBlock.hasNext()) { Block block = iterateBlock.next(); @@ -343,7 +348,7 @@ } } - } + }*/ questionGroup.setBlock(block); questionGroupDao.save(questionGroup); getLogger().debug("QuestionGroup is created with Id: " + questionGroup.getId()); @@ -439,6 +444,7 @@ psychometricQ.setSequenceNo(psychometric.getSequenceNo()); psychometricQ.setQuestion(psychometric.getQuestion()); psychometricQ.setType(psychometric.getType().toLowerCase()); + psychometricQ.setCommunicationQ(psychometric.isCommunicationQ()); getLogger().debug("Scale: " + psychometric.getScale()); @@ -494,7 +500,11 @@ categoricalQ.setQuestion(categoricalInfo.getQuestion()); categoricalQ.setSequenceNo(categoricalInfo.getSequenceNo()); categoricalQ.setType(categoricalInfo.getType().toLowerCase()); + /*Set<Round> round_configs = categoricalInfo.getRound_configs(); + categoricalQ.setRound_configs(round_configs);*/ + categoricalQ.setCommunicationQ(categoricalInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroup_id); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -521,7 +531,9 @@ question.setQuestion(otherTypeQuestionInfo.getQuestion()); question.setSequenceNo(otherTypeQuestionInfo.getSequenceNo()); question.setType(otherTypeQuestionInfo.getType().toLowerCase()); + question.setCommunicationQ(otherTypeQuestionInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroup_id); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -560,6 +572,7 @@ psychometricQ.setSequenceNo(psychometric.getSequenceNo()); psychometricQ.setQuestion(psychometric.getQuestion()); psychometricQ.setType(psychometric.getType().toLowerCase()); + psychometricQ.setCommunicationQ(psychometric.isCommunicationQ()); getLogger().debug("Scale: " + psychometric.getScale()); @@ -618,7 +631,9 @@ categoricalQ.setQuestion(categoricalInfo.getQuestion()); categoricalQ.setSequenceNo(categoricalInfo.getSequenceNo()); categoricalQ.setType(categoricalInfo.getType().toLowerCase()); + categoricalQ.setCommunicationQ(categoricalInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroupId); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); @@ -653,7 +668,9 @@ question.setQuestion(otherTypeQuestionInfo.getQuestion()); question.setSequenceNo(otherTypeQuestionInfo.getSequenceNo()); question.setType(otherTypeQuestionInfo.getType().toLowerCase()); + question.setCommunicationQ(otherTypeQuestionInfo.isCommunicationQ()); + questionGroup = questionGroupDao.findByProperty("id",questionGroupId); Hibernate.initialize(questionGroup); block = questionGroup.getBlock(); Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/RoundService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -2,9 +2,9 @@ import edu.asu.commons.mme.dao.HibernateRoundConfigDao; import edu.asu.commons.mme.entity.Module; -import edu.asu.commons.mme.entity.RoundConfig; +import edu.asu.commons.mme.entity.Round; -public class RoundService extends Service.Base<RoundConfig, HibernateRoundConfigDao> { +public class RoundService extends Service.Base<Round, HibernateRoundConfigDao> { private ModuleService moduleService; Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/StartupService.java 2009-07-22 01:13:40 UTC (rev 194) @@ -39,7 +39,7 @@ public Module getFirstModule() { - studentService.formGroups(); + //studentService.formGroups(); return moduleService.getModule(1); } Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-21 22:55:07 UTC (rev 193) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml 2009-07-22 01:13:40 UTC (rev 194) @@ -8,7 +8,7 @@ <hibernate-configuration> <session-factory> <mapping class='edu.asu.commons.mme.entity.Game'/> - <mapping class='edu.asu.commons.mme.entity.RoundConfig'/> + <mapping class='edu.asu.commons.mme.entity.Round'/> <mapping class='edu.asu.commons.mme.entity.Location'/> <mapping class='edu.asu.commons.mme.entity.Communication'/> <mapping class='edu.asu.commons.mme.entity.Group'/> @@ -31,7 +31,8 @@ <mapping class='edu.asu.commons.mme.entity.StudentResponse'/> <mapping class='edu.asu.commons.mme.entity.Module'/> - <mapping class='edu.asu.commons.mme.entity.Block'/> + <mapping class='edu.asu.commons.mme.entity.Block'/> + <mapping class='edu.asu.commons.mme.entity.ModuleRoundConfig'/> </session-factory> </hibernate-configuration> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-22 00:31:11
|
I log out tonight at 17:30 pm (4hr) I have worked on using answeringService to return the responses to questions, but there are some issues since the program was not structured in a way that is conducive to accessing both the Question and the Component that it corresponds to. I have also updated to use startupservice and roundservice, at least as wrappers for studentservice and moduleservice. I have also fixed a major hole that let students progress to the next block, even if they had not actually finished the daybydaydecisions or strategydesign. On Tue, Jul 21, 2009 at 2:13 PM, Kalin Jonas <kj...@as...> wrote: > I work from home today at 13:30pm > I spoke with Seema over Chat for half an hour regarding what she is working > on with the database. > I will be working on using the answeringservice to submit answers to > questions, as soon as it is ready. > In the mean time, I will work on converting module 3's text into html > |
From: <see...@us...> - 2009-07-21 22:55:10
|
Revision: 193 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=193&view=rev Author: seematalele Date: 2009-07-21 22:55:07 +0000 (Tue, 21 Jul 2009) Log Message: ----------- added following three services in applicationContext.xml roundService answeringService startupService Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-21 06:37:26 UTC (rev 192) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-21 22:55:07 UTC (rev 193) @@ -111,6 +111,9 @@ <flex:remote-service ref="studentService" /> <flex:remote-service ref="moduleService" /> <flex:remote-service ref="questionCreatorService" /> + <flex:remote-service ref="roundService" /> + <flex:remote-service ref="startupService" /> + <flex:remote-service ref="answeringService" /> <!-- Flex related information ended--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-07-21 21:13:11
|
I work from home today at 13:30pm I spoke with Seema over Chat for half an hour regarding what she is working on with the database. I will be working on using the answeringservice to submit answers to questions, as soon as it is ready. In the mean time, I will work on converting module 3's text into html |