virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 69)
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-08-04 22:28:49
|
Revision: 217 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=217&view=rev Author: kjonas Date: 2009-08-04 22:28:38 +0000 (Tue, 04 Aug 2009) Log Message: ----------- removed duplicates that were causing errors 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-08-04 22:10:41 UTC (rev 216) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-08-04 22:28:38 UTC (rev 217) @@ -1,89 +1,85 @@ -<?xml version="1.0"?> -<!-- - vim:sts=2:sw=2: ---> -<!-- - $Id: applicationContext.xml 617 2008-03-28 17:27:23Z alllee $ ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:flex="http://www.springframework.org/schema/flex" - xmlns:security="http://www.springframework.org/schema/security" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:aop="http://www.springframework.org/schema/aop" - xmlns:tx="http://www.springframework.org/schema/tx" - xsi:schemaLocation=" - - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx-2.0.xsd - http://www.springframework.org/schema/aop - http://www.springframework.org/schema/aop/spring-aop-2.0.xsd - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/flex - http://www.springframework.org/schema/flex/spring-flex-1.0.xsd - http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-2.0.4.xsd"> - - -<!-- Flex related information started --> - <flex:message-broker /> - -<!-- XXX: Split these out into separate XML files and import them if this file gets too large --> -<!-- spring managed daos --> - <bean id='studentDao' class='edu.asu.commons.mme.dao.HibernateStudentDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - +<?xml version="1.0"?> +<!-- + vim:sts=2:sw=2: +--> +<!-- + $Id: applicationContext.xml 617 2008-03-28 17:27:23Z alllee $ +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:flex="http://www.springframework.org/schema/flex" + xmlns:security="http://www.springframework.org/schema/security" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xmlns:tx="http://www.springframework.org/schema/tx" + xsi:schemaLocation=" + + http://www.springframework.org/schema/tx + http://www.springframework.org/schema/tx/spring-tx-2.0.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/aop/spring-aop-2.0.xsd + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/flex + http://www.springframework.org/schema/flex/spring-flex-1.0.xsd + http://www.springframework.org/schema/security + http://www.springframework.org/schema/security/spring-security-2.0.4.xsd"> + + +<!-- Flex related information started --> + <flex:message-broker /> + +<!-- XXX: Split these out into separate XML files and import them if this file gets too large --> +<!-- spring managed daos --> + <bean id='studentDao' class='edu.asu.commons.mme.dao.HibernateStudentDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + <bean id='roundConfigDao' class='edu.asu.commons.mme.dao.HibernateRoundConfigDao'> <property name='sessionFactory' ref='sessionFactory'/> </bean> - <bean id='moduleDao' class="edu.asu.commons.mme.dao.HibernateModuleDao"> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='blockDao' class='edu.asu.commons.mme.dao.HibernateBlockDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='questionDao' class='edu.asu.commons.mme.dao.HibernateQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='psychometricQuestionDao' class='edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - - <bean id='categoricalQuestionDao' class='edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - - <bean id='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='studentResponseDao' class='edu.asu.commons.mme.dao.HibernateStudentResponseDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='dayByDayDecisionsDao' class='edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao'> - <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='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - + <bean id='moduleDao' class="edu.asu.commons.mme.dao.HibernateModuleDao"> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='blockDao' class='edu.asu.commons.mme.dao.HibernateBlockDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='questionDao' class='edu.asu.commons.mme.dao.HibernateQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='psychometricQuestionDao' class='edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + + <bean id='categoricalQuestionDao' class='edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + + <bean id='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='studentResponseDao' class='edu.asu.commons.mme.dao.HibernateStudentResponseDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='dayByDayDecisionsDao' class='edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao'> + <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='dayByDayDecisionsService' class='edu.asu.commons.mme.service.DayByDayDecisionsService'> <property name='dao' ref='dayByDayDecisionsDao'/> </bean> @@ -102,78 +98,75 @@ </bean> - <bean id='questionCreatorService' class='edu.asu.commons.mme.service.QuestionCreatorService'> - <property name='dao' ref='questionDao'/> - <property name='blockDao' ref='blockDao'/> - <property name='moduleDao' ref='moduleDao'/> - <property name='questionGroupDao' ref='questionGroupDao'/> - <property name='psychometricQuestionDao' ref='psychometricQuestionDao'/> - <property name='categoricalQuestionDao' ref='categoricalQuestionDao'/> - <property name='moduleDao' ref='moduleDao'/> - <property name='questionGroupDao' ref='questionGroupDao'/> - - </bean> - - <bean id='startupService' class='edu.asu.commons.mme.service.StartupService'> - <property name='questionCreatorService' ref='questionCreatorService'/> + <bean id='questionCreatorService' class='edu.asu.commons.mme.service.QuestionCreatorService'> + <property name='dao' ref='questionDao'/> + <property name='blockDao' ref='blockDao'/> + <property name='moduleDao' ref='moduleDao'/> + <property name='questionGroupDao' ref='questionGroupDao'/> + <property name='psychometricQuestionDao' ref='psychometricQuestionDao'/> + <property name='categoricalQuestionDao' ref='categoricalQuestionDao'/> + + </bean> + + <bean id='startupService' class='edu.asu.commons.mme.service.StartupService'> + <property name='questionCreatorService' ref='questionCreatorService'/> <property name='studentService' ref='studentService'/> - </bean> + </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'/> - </bean> - -<!-- spring managed service layer --> - <bean id='moduleService' class="edu.asu.commons.mme.service.ModuleService"> - <property name='dao' ref='moduleDao'/> - </bean> - - -<!-- Expose services for BlazeDS remoting --> - <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:remote-service ref="locationService" /> - <flex:remote-service ref="questionCreatorService" /> - -<!-- Flex related information ended--> - - <bean id="mmeDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> - <property name="driverClassName" value="${hibernate.connection.driver_class}"/> - <property name="url" value="${hibernate.connection.url}"/> - <property name="username" value="${hibernate.connection.user}"/> - <property name="password" value="${hibernate.connection.password}"/> - </bean> - - <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> - <property name="location" value="/WEB-INF/hibernate.properties"/> - <property name="beanName" value="mmeDataSource"/> - </bean> - - <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> - <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/> - <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/> - <property name="hibernateProperties"> - <props> - <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop> - <prop key="hibernate.show_sql">false</prop> - </props> - </property> - <property name="dataSource" ref="mmeDataSource"/> - </bean> - - <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> - <property name="sessionFactory" ref="sessionFactory"/> - </bean> - <!-- XXX: don't need proxy-target-class if services are interfaces instead --> - <tx:annotation-driven proxy-target-class="true"/> - -</beans> + + <bean id='studentService' class='edu.asu.commons.mme.service.StudentService'> + <property name='dao' ref='studentDao'/> + </bean> + +<!-- spring managed service layer --> + <bean id='moduleService' class="edu.asu.commons.mme.service.ModuleService"> + <property name='dao' ref='moduleDao'/> + </bean> + + +<!-- Expose services for BlazeDS remoting --> + <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:remote-service ref="locationService" /> + +<!-- Flex related information ended--> + + <bean id="mmeDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> + <property name="driverClassName" value="${hibernate.connection.driver_class}"/> + <property name="url" value="${hibernate.connection.url}"/> + <property name="username" value="${hibernate.connection.user}"/> + <property name="password" value="${hibernate.connection.password}"/> + </bean> + + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location" value="/WEB-INF/hibernate.properties"/> + <property name="beanName" value="mmeDataSource"/> + </bean> + + <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> + <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/> + <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop> + <prop key="hibernate.show_sql">false</prop> + </props> + </property> + <property name="dataSource" ref="mmeDataSource"/> + </bean> + + <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> + <property name="sessionFactory" ref="sessionFactory"/> + </bean> + <!-- XXX: don't need proxy-target-class if services are interfaces instead --> + <tx:annotation-driven proxy-target-class="true"/> + +</beans> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2009-08-04 22:10:47
|
Revision: 216 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=216&view=rev Author: kjonas Date: 2009-08-04 22:10:41 +0000 (Tue, 04 Aug 2009) Log Message: ----------- latest InitialiseDatabase.swf, error with last commit. Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2009-08-04 22:09:22
|
Revision: 215 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=215&view=rev Author: kjonas Date: 2009-08-04 22:09:15 +0000 (Tue, 04 Aug 2009) Log Message: ----------- Latest FisheryExperimentShell Added warnings to html files. Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html =================================================================== --- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html 2009-08-04 18:34:30 UTC (rev 214) +++ mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.html 2009-08-04 22:09:15 UTC (rev 215) @@ -28,6 +28,15 @@ <style> body { margin: 0px; overflow:hidden } </style> + +<script language="JavaScript"> + window.onbeforeunload = confirmExit; + function confirmExit() + { + return "If you are connected to the server, you will be disconnected if the page closes. Students in the experiment will be removed if the window closes."; + } +</script> + <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- @@ -44,8 +53,12 @@ </head> <body scroll="no"> + <script language="JavaScript" type="text/javascript"> <!-- + +var clientIP = '<!--#echo var="REMOTE_ADDR"-->'; + // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); @@ -57,12 +70,12 @@ // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; var MMredirectURL = window.location; - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var MMdoctitle = document.title; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; AC_FL_RunContent( "src", "playerProductInstall", - "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'&ip=test'+clientIP+"", "width", "100%", "height", "100%", "align", "middle", @@ -82,27 +95,30 @@ "width", "100%", "height", "100%", "align", "middle", + "valign", "middle", "id", "FisheryExperimentShell", "quality", "high", "bgcolor", "#869ca7", "name", "FisheryExperimentShell", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer" + "pluginspage", "http://www.adobe.com/go/getflashplayer", + "FlashVars", "ip=test"+clientIP+"" ); - } else { // flash is too old or we can't detect the plugin - var alternateContent = 'Alternate HTML content should be placed here. ' - + 'This content requires the Adobe Flash Player. ' - + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; - document.write(alternateContent); // insert non-flash content +} else { // flash is too old or we can't detect the plugin + var alternateContent = 'Alternate HTML content should be placed here. ' + + 'This content requires the Adobe Flash Player. ' + + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; + document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> - <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="FisheryExperimentShell" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="FisheryExperimentShell.swf" /> + <PARAM NAME=FlashVars VALUE="ip=test${clientIP}"> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html =================================================================== --- mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html 2009-08-04 18:34:30 UTC (rev 214) +++ mentalmodels/trunk/src/main/webapp/InitialiseDatabase.html 2009-08-04 22:09:15 UTC (rev 215) @@ -28,6 +28,15 @@ <style> body { margin: 0px; overflow:hidden } </style> + +<script language="JavaScript"> + window.onbeforeunload = confirmExit; + function confirmExit() + { + return "If you are connected to the server, you will be disconnected if the page closes. Students in the experiment will be removed if the window closes."; + } +</script> + <script language="JavaScript" type="text/javascript"> <!-- // ----------------------------------------------------------------------------- @@ -44,8 +53,12 @@ </head> <body scroll="no"> + <script language="JavaScript" type="text/javascript"> <!-- + +var clientIP = '<!--#echo var="REMOTE_ADDR"-->'; + // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65) var hasProductInstall = DetectFlashVer(6, 0, 65); @@ -57,12 +70,12 @@ // Location visited after installation is complete if installation is required var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn"; var MMredirectURL = window.location; - document.title = document.title.slice(0, 47) + " - Flash Player Installation"; - var MMdoctitle = document.title; + document.title = document.title.slice(0, 47) + " - Flash Player Installation"; + var MMdoctitle = document.title; AC_FL_RunContent( "src", "playerProductInstall", - "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"", + "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+'&ip=test'+clientIP+"", "width", "100%", "height", "100%", "align", "middle", @@ -82,27 +95,30 @@ "width", "100%", "height", "100%", "align", "middle", + "valign", "middle", "id", "InitialiseDatabase", "quality", "high", "bgcolor", "#869ca7", "name", "InitialiseDatabase", "allowScriptAccess","sameDomain", "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer" + "pluginspage", "http://www.adobe.com/go/getflashplayer", + "FlashVars", "ip=test"+clientIP+"" ); - } else { // flash is too old or we can't detect the plugin - var alternateContent = 'Alternate HTML content should be placed here. ' - + 'This content requires the Adobe Flash Player. ' - + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; - document.write(alternateContent); // insert non-flash content +} else { // flash is too old or we can't detect the plugin + var alternateContent = 'Alternate HTML content should be placed here. ' + + 'This content requires the Adobe Flash Player. ' + + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>'; + document.write(alternateContent); // insert non-flash content } // --> </script> <noscript> - <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="InitialiseDatabase" width="100%" height="100%" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"> <param name="movie" value="InitialiseDatabase.swf" /> + <PARAM NAME=FlashVars VALUE="ip=test${clientIP}"> <param name="quality" value="high" /> <param name="bgcolor" value="#869ca7" /> <param name="allowScriptAccess" value="sameDomain" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-08-04 20:45:52
|
I return at 13:45 to work. I am going to test if the program will work if it is given a block, and fixing any issues as they crop up. On Tue, Aug 4, 2009 at 1:00 PM, Kalin Jonas <kj...@as...> wrote: > at 13:00pm (2hr) I go for lunch. > The program centers on the page > Pops up a warning when the user tries to close or refresh, if they are > looking at the html. > Nothing happens when they close the SWF > > > On Tue, Aug 4, 2009 at 11:33 AM, Kalin Jonas <kj...@as...> wrote: > >> Today I arrived at 11:00am, and began discussing my work over the last >> week. >> I will continue to discuss changes I have made, commit my previous code. >> I will be working to make sure that my code can properly handle when it >> receives a block. >> After this, I will center the content within the application, but it will >> not re-size itself right now. >> Intermittently, I will be talking to Seema regarding the program and >> changes to be made. >> > > |
From: Kalin J. <kj...@as...> - 2009-08-04 20:01:12
|
at 13:00pm (2hr) I go for lunch. The program centers on the page Pops up a warning when the user tries to close or refresh, if they are looking at the html. Nothing happens when they close the SWF On Tue, Aug 4, 2009 at 11:33 AM, Kalin Jonas <kj...@as...> wrote: > Today I arrived at 11:00am, and began discussing my work over the last > week. > I will continue to discuss changes I have made, commit my previous code. > I will be working to make sure that my code can properly handle when it > receives a block. > After this, I will center the content within the application, but it will > not re-size itself right now. > Intermittently, I will be talking to Seema regarding the program and > changes to be made. > |
From: <kj...@us...> - 2009-08-04 18:34:44
|
Revision: 214 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=214&view=rev Author: kjonas Date: 2009-08-04 18:34:30 +0000 (Tue, 04 Aug 2009) Log Message: ----------- Fixed spacing in InitialiseDatabase.mxml Modified Paths: -------------- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml Modified: mentalmodels/trunk/flex/src/InitialiseDatabase.mxml =================================================================== --- mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-08-04 06:05:21 UTC (rev 213) +++ mentalmodels/trunk/flex/src/InitialiseDatabase.mxml 2009-08-04 18:34:30 UTC (rev 214) @@ -2,27 +2,26 @@ <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:net="flash.net.*" xmlns:comp="custom.db.questions.*" xmlns:basicComp="custom.db.*" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #80FFAA]" width="100%" height="100%" clipContent="false" layout="absolute" currentState="none" initialize="init()"> - <mx:Script> - <![CDATA[ - import mx.binding.utils.BindingUtils; - - - import actionscript.Block; - import actionscript.Module; - import actionscript.questions.Question; - import actionscript.QuestionGroup; - import actionscript.questions.Categorical; - import actionscript.questions.CategoricalOption; - import actionscript.questions.Psychometric; - - - import mx.collections.ArrayCollection; - import mx.effects.Fade; - - import mx.collections.XMLListCollection; - import mx.controls.Alert; - import mx.rpc.events.FaultEvent; - import mx.rpc.events.ResultEvent; + <mx:Script> + <![CDATA[ + import mx.binding.utils.BindingUtils; + + import actionscript.Block; + import actionscript.Module; + import actionscript.questions.Question; + import actionscript.QuestionGroup; + import actionscript.questions.Categorical; + import actionscript.questions.CategoricalOption; + import actionscript.questions.Psychometric; + + + import mx.collections.ArrayCollection; + import mx.effects.Fade; + + import mx.collections.XMLListCollection; + import mx.controls.Alert; + import mx.rpc.events.FaultEvent; + import mx.rpc.events.ResultEvent; /**** * Sample exmaple of Survey Questions structure @@ -54,8 +53,7 @@ so when module info is transfered to the server, it should return the id for that module */ - [Bindable] - private var survey:XML = + [Bindable] private var survey:XML = <list> <module title="Survey Questions" id="0" sequenceNo="0" hours="0" min="0" sec="0"/> </list>; @@ -76,8 +74,7 @@ * * ***/ - [Bindable] - private var categoricalQuestions:XML = + [Bindable] private var categoricalQuestions:XML = <list> <categorical type="Categorical Questions" id="0"/> @@ -88,50 +85,45 @@ * <psychometric scale="bipolar" id="2" choices="good,better,best" maxSliderValue="21" /> **/ - [Bindable] - private var psychometricQuestions:XML = + [Bindable] private var psychometricQuestions:XML = <list> <psychometric scale="Psychometric Questions" id="0" choices="none" maxSliderValue="0"/> </list>; - [Bindable] - private var surveyData:XMLListCollection = new XMLListCollection(survey.module); - - private var CategoricalquestionsData:XMLListCollection = new XMLListCollection(categoricalQuestions.categorical); - - private var PsychometricquestionsData:XMLListCollection = new XMLListCollection(psychometricQuestions.psychometric); - - public var tempQuestion:ArrayCollection = new ArrayCollection(); - - - - private function init():void - { - roQuestionCreator.initializeData(); - } - - private function resultInitializeDataHandler(event:ResultEvent):void - { - //Alert.show(event.result.toString()); + [Bindable] private var surveyData:XMLListCollection = new XMLListCollection(survey.module); + + private var CategoricalquestionsData:XMLListCollection = new XMLListCollection(categoricalQuestions.categorical); + + private var PsychometricquestionsData:XMLListCollection = new XMLListCollection(psychometricQuestions.psychometric); + + public var tempQuestion:ArrayCollection = new ArrayCollection(); + + private function init():void + { + roQuestionCreator.initializeData(); + } + + private function resultInitializeDataHandler(event:ResultEvent):void + { + //Alert.show(event.result.toString()); var modulelist:ArrayCollection = new ArrayCollection(); modulelist = event.result as ArrayCollection; - + - if(modulelist != null) - { - for(var i:int = 0 ; i < modulelist.length ; i++) - { - var module:actionscript.Module = new actionscript.Module(); - module = modulelist[i]; - - - //create module node and add into the tree - var newModuleNode:XML = createModuleNode(module); - - survey.appendChild(newModuleNode); - - //if any blocks, add into the module + if(modulelist != null) + { + for(var i:int = 0 ; i < modulelist.length ; i++) + { + var module:actionscript.Module = new actionscript.Module(); + module = modulelist[i]; + + //create module node and add into the tree + var newModuleNode:XML = createModuleNode(module); + + survey.appendChild(newModuleNode); + + //if any blocks, add into the module if(module.blocks != null) { for(var blockCounter:int = 0; blockCounter < module.blocks.length; blockCounter++) @@ -141,8 +133,8 @@ var newBlockNode:XML = createBlockNode(block); newModuleNode.appendChild(newBlockNode); - + if(block.questionGroups != null) { //if any question Group, add into the block @@ -163,236 +155,234 @@ newQuestionGroupNode.appendChild(newQuestionNode); } } - } } } } - } - - } - - } - - private function createModuleNode(module:actionscript.Module):XML - { - - - var newModuleNode:XML = <module/>; - newModuleNode.setLocalName("module"); - newModuleNode.@title= module.description; - newModuleNode.@sequenceNo = module.sequenceNo; - newModuleNode.@hours = module.getHours(); - newModuleNode.@min = module.getMinutes(); - newModuleNode.@sec = module.getSeconds(); - newModuleNode.@id = module.id; - - - return newModuleNode; - - } - - private function createBlockNode(block:actionscript.Block):XML - { - var newBlockNode:XML = <block/>; - newBlockNode.setLocalName("block"); - newBlockNode.@name = block.description; - newBlockNode.@sequenceNo = block.sequenceNo; - newBlockNode.@hours = block.getHours(); - newBlockNode.@min = block.getMinutes(); - newBlockNode.@sec = block.getSeconds(); - newBlockNode.@id = block.id; - - return newBlockNode; - - } - - private function createQuestionGroupNode(questionGroup:actionscript.QuestionGroup):XML - { - var newNode:XML = <questiongroup/>; - newNode.setLocalName("questiongroup"); - newNode.@header = questionGroup.header; - newNode.@description = questionGroup.description; - newNode.@sequenceNo = questionGroup.sequenceNo; - newNode.@hours = questionGroup.getHours(); - newNode.@min = questionGroup.getMinutes(); - newNode.@sec = questionGroup.getSeconds(); - newNode.@id = questionGroup.id; - - return newNode; - - } - - private function createQuestionNode(question:actionscript.questions.Question):XML - { - var newQNode:XML = <question/>; - newQNode.setLocalName("question"); - var choices:String=""; - if(question.type.toLowerCase() == "psychometric") + } + } + } + + private function createModuleNode(module:actionscript.Module):XML { - var psychometricResult:actionscript.questions.Psychometric = actionscript.questions.Psychometric(question); - /*Alert.show("Id is: " + psychometricResult.id); - Alert.show("Question is: " + psychometricResult.question); - Alert.show("Type is: " + psychometricResult.type); - Alert.show("SeQNo is: " + psychometricResult.sequenceNo);*/ + var newModuleNode:XML = <module/>; + newModuleNode.setLocalName("module"); + newModuleNode.@title= module.description; + newModuleNode.@sequenceNo = module.sequenceNo; + newModuleNode.@hours = module.getHours(); + newModuleNode.@min = module.getMinutes(); + newModuleNode.@sec = module.getSeconds(); + newModuleNode.@id = module.id; - var newPNode:XML = <psychometric/>; - newPNode.setLocalName("psychometric"); - newPNode.@id = psychometricResult.id; - newPNode.@scale = psychometricResult.scale; - newPNode.@maxSliderValue = psychometricResult.maxSliderValue; - - newQNode.@sequenceNo = psychometricResult.sequenceNo; - 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); - choices = psychometricResult.choices[k]; - } - else - { - choices = choices + psychometricResult.choices[k]; - } - choices = choices + "," - } - //Alert.show("choices are: " + choices); - - newPNode.@choices = choices; - } - psychometricQuestions.appendChild(newPNode); - + return newModuleNode; } - else if(question.type.toLowerCase() == "categorical") + + private function createBlockNode(block:actionscript.Block):XML { - var categoricalResult:actionscript.questions.Categorical = actionscript.questions.Categorical(question); + var newBlockNode:XML = <block/>; + newBlockNode.setLocalName("block"); + newBlockNode.@name = block.description; + newBlockNode.@sequenceNo = block.sequenceNo; + newBlockNode.@hours = block.getHours(); + newBlockNode.@min = block.getMinutes(); + newBlockNode.@sec = block.getSeconds(); + newBlockNode.@id = block.id; - newQNode.@sequenceNo = categoricalResult.sequenceNo; - 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 ) - { - questionGroup[0].appendChild(newQNode); - currentState = "none"; - btnsaveQuestion.enabled = false; - }*/ - //false means it is simple type, otherwise it is relative type - var flagType:Boolean = false; - - var newCNode:XML = <categorical/>; - newCNode.setLocalName("categorical"); - newCNode.@id = categoricalResult.id; - categoricalQuestions.appendChild(newCNode); - - if(categoricalResult.categoricalOptions != null) + return newBlockNode; + } + + private function createQuestionGroupNode(questionGroup:actionscript.QuestionGroup):XML + { + var newNode:XML = <questiongroup/>; + newNode.setLocalName("questiongroup"); + newNode.@header = questionGroup.header; + newNode.@description = questionGroup.description; + newNode.@sequenceNo = questionGroup.sequenceNo; + newNode.@hours = questionGroup.getHours(); + newNode.@min = questionGroup.getMinutes(); + newNode.@sec = questionGroup.getSeconds(); + newNode.@id = questionGroup.id; + + return newNode; + } + + private function createQuestionNode(question:actionscript.questions.Question):XML + { + var newQNode:XML = <question/>; + newQNode.setLocalName("question"); + var choices:String=""; + if(question.type.toLowerCase() == "psychometric") { + var psychometricResult:actionscript.questions.Psychometric = actionscript.questions.Psychometric(question); + /*Alert.show("Id is: " + psychometricResult.id); + Alert.show("Question is: " + psychometricResult.question); + Alert.show("Type is: " + psychometricResult.type); + Alert.show("SeQNo is: " + psychometricResult.sequenceNo);*/ + + var newPNode:XML = <psychometric/>; + newPNode.setLocalName("psychometric"); + newPNode.@id = psychometricResult.id; + newPNode.@scale = psychometricResult.scale; + newPNode.@maxSliderValue = psychometricResult.maxSliderValue; + + newQNode.@sequenceNo = psychometricResult.sequenceNo; + 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); + choices = psychometricResult.choices[k]; + } + else + { + choices = choices + psychometricResult.choices[k]; + } + choices = choices + "," + } + //Alert.show("choices are: " + choices); + + newPNode.@choices = choices; + } + psychometricQuestions.appendChild(newPNode); + } + else if(question.type.toLowerCase() == "categorical") + { + var categoricalResult:actionscript.questions.Categorical = actionscript.questions.Categorical(question); + + newQNode.@sequenceNo = categoricalResult.sequenceNo; + 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 ) + { + questionGroup[0].appendChild(newQNode); + currentState = "none"; + btnsaveQuestion.enabled = false; + }*/ + //false means it is simple type, otherwise it is relative type + var flagType:Boolean = false; + + var newCNode:XML = <categorical/>; + newCNode.setLocalName("categorical"); + newCNode.@id = categoricalResult.id; + categoricalQuestions.appendChild(newCNode); + + if(categoricalResult.categoricalOptions != null) + { - for(var i:int = 0; i < categoricalResult.categoricalOptions.length ; i++) - { - var options:actionscript.questions.CategoricalOption = new actionscript.questions.CategoricalOption(); - options = actionscript.questions.CategoricalOption(categoricalResult.categoricalOptions.getItemAt(i)); - var newOptionNode:XML = <option/>; - newOptionNode.setLocalName("option"); - newOptionNode.@name = options.optionKey; - if(options.choices.length == 0) - { - flagType = false - } - else - { - flagType = true; - choices=""; - - for(k = 0; k < options.choices.length; k++) + for(var i:int = 0; i < categoricalResult.categoricalOptions.length ; i++) + { + var options:actionscript.questions.CategoricalOption = new actionscript.questions.CategoricalOption(); + options = actionscript.questions.CategoricalOption(categoricalResult.categoricalOptions.getItemAt(i)); + var newOptionNode:XML = <option/>; + newOptionNode.setLocalName("option"); + newOptionNode.@name = options.optionKey; + if(options.choices.length == 0) { - - if(choices == "") - { - choices = options.choices[k]; - } - else - { - choices = choices + options.choices[k]; - } - choices = choices + "," + flagType = false + } + else + { + flagType = true; + choices=""; - } - //Alert.show("choices are: " + choices); - - newOptionNode.@choices = choices; - } - if(flagType) - newCNode.@type = "relative"; - else - newCNode.@type = "simple"; - newCNode.appendChild(newOptionNode); - } + for(k = 0; k < options.choices.length; k++) + { + + if(choices == "") + { + choices = options.choices[k]; + } + else + { + choices = choices + options.choices[k]; + } + choices = choices + "," + } + //Alert.show("choices are: " + choices); + + newOptionNode.@choices = choices; + } + if(flagType) + { + newCNode.@type = "relative"; + } + else + { + newCNode.@type = "simple"; + } + newCNode.appendChild(newOptionNode); + } + } } - + //if question type is strategy, day by day decision, forecasting fish, forecasting fishermen + else + { + newQNode.@sequenceNo = question.sequenceNo; + newQNode.@title = question.question; + newQNode.@type = question.type; + newQNode.@id = question.id; + newQNode.@communication = question.communicationQ; + //Alert.show("communication : " + question.communicationQ); + } + return newQNode; } - //if question type is strategy, day by day decision, forecasting fish, forecasting fishermen - else + + private function faultHandler(event:FaultEvent):void { - newQNode.@sequenceNo = question.sequenceNo; - newQNode.@title = question.question; - newQNode.@type = question.type; - newQNode.@id = question.id; - newQNode.@communication = question.communicationQ; - //Alert.show("communication : " + question.communicationQ); - } - return newQNode; - - } - - private function faultHandler(event:FaultEvent):void - { Alert.show("event fault is " + event.fault.getStackTrace()); - } + } - private function treeLabel(item:Object):String - { + private function treeLabel(item:Object):String + { var node:XML = XML(item); if( node.localName() == "module" ) + { return node.@title; - + } else if( node.localName() == "block" ) + { return node.@name; - + } else if( node.localName() == "questiongroup" ) + { return node.@header; - + } else if( node.localName() == "question" ) + { return node.@type; - + } else + { return null; - + } } private function treeLabelPsychometricQ(item:Object):String { var node:XML = XML(item); if( node.localName() == "psychometric" ) + { return node.@scale; - + } else + { return node.@name; - + } } private function treeLabelCategoricalQ(item:Object):String @@ -400,18 +390,20 @@ var node:XML = XML(item); if( node.localName() == "categorical" ) + { return node.@type; - + } else + { return node.@name; + } } - public function isDurationValid(hours:Number,minutes:Number,seconds:Number):Boolean - { + public function isDurationValid(hours:Number,minutes:Number,seconds:Number):Boolean + { return (hours == 0 && minutes == 0 && seconds == 0); - - } + } //Module Functionality Start private function addModule():void @@ -464,7 +456,9 @@ Alert.show("Sequence number : " + seqNo + " already exists!"); } else + { roQuestionCreator.saveModule(seqNo, title, getDuration(moduleInfo.getHours(),moduleInfo.getMinutes(),moduleInfo.getSeconds())); + } } else @@ -477,7 +471,9 @@ Alert.show("Sequence number : " + seqNo + " already exists!"); } else + { roQuestionCreator.updateModule(moduleInfo.getId(),seqNo, title, getDuration(moduleInfo.getHours(),moduleInfo.getMinutes(),moduleInfo.getSeconds())); + } } @@ -530,7 +526,9 @@ moduleXML.@sec = module.getSeconds(); } else + { Alert.show("Error in updating module!"); + } } @@ -597,43 +595,44 @@ //check the sequence number first, if sequence number already exists throw an error, otherwise create block var checkSeqNoBlock:XMLList = module.block.(@sequenceNo == blockInfo.getSequenceNo()); - if(blockInfo.getId() == 0) - { - if(checkSeqNoBlock.length() > 0) - { - Alert.show("Sequence number " + blockInfo.getSequenceNo() + " already exists!"); - } - else - { - roQuestionCreator.saveBlock(int(blockInfo.getSequenceNo()),blockInfo.getName(),getDuration(blockInfo.getHours(),blockInfo.getMinutes(),blockInfo.getSeconds()),int(module[0].@id)); - } - } - else - { - //Alert.show("length : " + checkSeqNoBlock.length().toString()); - //check if the sequence number exists, do not update the module - if(checkSeqNoBlock.length() > 1) - { - Alert.show("Sequence number : " + blockInfo.getSequenceNo() + " already exists!"); - } - else - roQuestionCreator.updateBlock(blockInfo.getId(), int(blockInfo.getSequenceNo()),blockInfo.getName(),getDuration(blockInfo.getHours(),blockInfo.getMinutes(),blockInfo.getSeconds()),int(module[0].@id)); - } - - currentState = "none"; - btnsaveBlock.enabled = false; + if(blockInfo.getId() == 0) + { + if(checkSeqNoBlock.length() > 0) + { + Alert.show("Sequence number " + blockInfo.getSequenceNo() + " already exists!"); + } + else + { + roQuestionCreator.saveBlock(int(blockInfo.getSequenceNo()),blockInfo.getName(),getDuration(blockInfo.getHours(),blockInfo.getMinutes(),blockInfo.getSeconds()),int(module[0].@id)); + } + } + else + { + //Alert.show("length : " + checkSeqNoBlock.length().toString()); + //check if the sequence number exists, do not update the module + if(checkSeqNoBlock.length() > 1) + { + Alert.show("Sequence number : " + blockInfo.getSequenceNo() + " already exists!"); + } + else + { + roQuestionCreator.updateBlock(blockInfo.getId(), int(blockInfo.getSequenceNo()),blockInfo.getName(),getDuration(blockInfo.getHours(),blockInfo.getMinutes(),blockInfo.getSeconds()),int(module[0].@id)); + } } - } - } - - else - { - Alert.show("Please fill the form correctly"); - return; - } - } - - } + + currentState = "none"; + btnsaveBlock.enabled = false; + } + } + } + + else + { + Alert.show("Please fill the form correctly"); + return; + } + } + } //when block is created, the result will come to resultSaveBlockHandler public function resultSaveBlockHandler(event:ResultEvent):void @@ -652,9 +651,9 @@ } } else + { Alert.show("Error in creating Block!"); - - + } } public function resultUpdateBlockHandler(event:ResultEvent):void @@ -674,133 +673,135 @@ } } else + { Alert.show("Error in creating Block!"); + } } //Block functioanlity End //QuestionGroup functionality Start - private function addQuestionGroup():void - { - currentState = "questionGroup"; - var obj:DisplayObject = pnlComponent.getChildAt(1); - var questionGroupInfo:custom.db.QuestionGroup = custom.db.QuestionGroup(obj); - questionGroupInfo.reset(); + private function addQuestionGroup():void + { + currentState = "questionGroup"; + var obj:DisplayObject = pnlComponent.getChildAt(1); + var questionGroupInfo:custom.db.QuestionGroup = custom.db.QuestionGroup(obj); + questionGroupInfo.reset(); + + btnsaveModule.enabled = false; + btnsaveBlock.enabled = false; + btnsaveQuestionGroup.enabled = true; + btnsaveQuestion.enabled = false; + + } - btnsaveModule.enabled = false; - btnsaveBlock.enabled = false; - btnsaveQuestionGroup.enabled = true; - btnsaveQuestion.enabled = false; - - } - - private function saveQuestionGroup(event:Event):void - { - - var selectedNode:XML = tree.selectedItem as XML; - var obj:DisplayObject = pnlComponent.getChildAt(1); - var questionGroupInfo:custom.db.QuestionGroup = custom.db.QuestionGroup(obj); - - if(tree.selectedItem == null) - { + private function saveQuestionGroup(event:Event):void + { + + var selectedNode:XML = tree.selectedItem as XML; + var obj:DisplayObject = pnlComponent.getChildAt(1); + var questionGroupInfo:custom.db.QuestionGroup = custom.db.QuestionGroup(obj); + + if(tree.selectedItem == null) + { Alert.show("Please select the block from tree to which Question Group should be added."); return; - } - else - { - - //if(tree.getParentItem(tree.selectedItem) == null) - if(selectedNode.localName() == "module") - { - Alert.show("You can not add QuestionGroup to Module."); - return; - } - else - { - if(selectedNode.localName() == "questiongroup" && questionGroupInfo.getId() == 0) - { - Alert.show("You can not add QuestionGroup to QuestionGroup."); - return; - } - - else - { - //find out the parent module - var parentModule:XML = tree.getParentItem(tree.selectedItem) as XML; - - var isQuestionGroupFormValid:Boolean = questionGroupInfo.validateForm(event); - - if(isQuestionGroupFormValid) - { - var durationflag:Boolean = this.isDurationValid(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()); - if(durationflag) - { - Alert.show("Please enter the valid duration for the given module."); - } - else - { - var node:XML; - /** - * Check if the selected node is block, if it is new Question Group needs to be created. - else if selected node is Question Group, then Question Group needs to be updated.*/ - - if(selectedNode.localName() == "block") - { - node = selectedNode; - } - else if(selectedNode.localName() == "questiongroup") - { - var parentNode:XML = tree.getParentItem(tree.selectedItem) as XML; - node = parentNode; - } - var block:XMLList = survey.module.block.(@id == node.@id); - //Alert.show("block id is : " + block.@id + "length is: " + block.length().toString()); - if( block.length() > 0 ) - { - //check the sequence number first, if sequence number already exists throw an error, otherwise create module - var checkSeqNoQuestionGroup:XMLList = block.questiongroup.(@sequenceNo == questionGroupInfo.getSequenceNo()); - //Alert.show("length : " + checkSeqNoQuestionGroup.length().toString()); - if(questionGroupInfo.getId() == 0) + } + else + { + + //if(tree.getParentItem(tree.selectedItem) == null) + if(selectedNode.localName() == "module") + { + Alert.show("You can not add QuestionGroup to Module."); + return; + } + else + { + if(selectedNode.localName() == "questiongroup" && questionGroupInfo.getId() == 0) + { + Alert.show("You can not add QuestionGroup to QuestionGroup."); + return; + } + else + { + //find out the parent module + var parentModule:XML = tree.getParentItem(tree.selectedItem) as XML; + + var isQuestionGroupFormValid:Boolean = questionGroupInfo.validateForm(event); + + if(isQuestionGroupFormValid) + { + var durationflag:Boolean = this.isDurationValid(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()); + if(durationflag) + { + Alert.show("Please enter the valid duration for the given module."); + } + else + { + var node:XML; + /** + * Check if the selected node is block, if it is new Question Group needs to be created. + else if selected node is Question Group, then Question Group needs to be updated.*/ + + if(selectedNode.localName() == "block") + { + node = selectedNode; + } + else if(selectedNode.localName() == "questiongroup") + { + var parentNode:XML = tree.getParentItem(tree.selectedItem) as XML; + node = parentNode; + } + var block:XMLList = survey.module.block.(@id == node.@id); + //Alert.show("block id is : " + block.@id + "length is: " + block.length().toString()); + if( block.length() > 0 ) + { + //check the sequence number first, if sequence number already exists throw an error, otherwise create module + var checkSeqNoQuestionGroup:XMLList = block.questiongroup.(@sequenceNo == questionGroupInfo.getSequenceNo()); + //Alert.show("length : " + checkSeqNoQuestionGroup.length().toString()); + if(questionGroupInfo.getId() == 0) + { + if(checkSeqNoQuestionGroup.length() > 0) + { + Alert.show("Sequence number " + questionGroupInfo.getSequenceNo() + " already exists!"); + } + else + { + roQuestionCreator.saveQuestionGroup(int(questionGroupInfo.getSequenceNo()),questionGroupInfo.getHeader(),questionGroupInfo.getDescription(),getDuration(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()),int(block[0].@id)); + } + } + else + { + //Alert.show("length : " + checkSeqNoQuestionGroup.length().toString()); + //check if the sequence number exists, do not update the module + if(checkSeqNoQuestionGroup.length() > 1) + { + Alert.show("Sequence number : " + questionGroupInfo.getSequenceNo() + " already exists!"); + } + else + { + roQuestionCreator.updateQuestionGroup(int(questionGroupInfo.getSequenceNo()),questionGroupInfo.getHeader(),questionGroupInfo.getDescription(),getDuration(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()),int(block[0].@id),questionGroup.getId()); + } + + } + currentState = "none"; + btnsaveQuestionGroup.enabled = false; + } + } + } + else { - if(checkSeqNoQuestionGroup.length() > 0) - { - Alert.show("Sequence number " + questionGroupInfo.getSequenceNo() + " already exists!"); - } - else - { - roQuestionCreator.saveQuestionGroup(int(questionGroupInfo.getSequenceNo()),questionGroupInfo.getHeader(),questionGroupInfo.getDescription(),getDuration(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()),int(block[0].@id)); - } - } - else - { - //Alert.show("length : " + checkSeqNoQuestionGroup.length().toString()); - //check if the sequence number exists, do not update the module - if(checkSeqNoQuestionGroup.length() > 1) - { - Alert.show("Sequence number : " + questionGroupInfo.getSequenceNo() + " already exists!"); - } - else - roQuestionCreator.updateQuestionGroup(int(questionGroupInfo.getSequenceNo()),questionGroupInfo.getHeader(),questionGroupInfo.getDescription(),getDuration(questionGroupInfo.getHours(),questionGroupInfo.getMinutes(),questionGroupInfo.getSeconds()),int(block[0].@id),questionGroup.getId()); - - } - currentState = "none"; - btnsaveQuestionGroup.enabled = false; - } - - } - } - else - { - Alert.show("Please fill the form correctly"); - return; - } - } - } - } - } + Alert.show("Please fill the form correctly"); + return; + } + } + } + } + } - //when QuestionGroup is created, the result will come to resultSaveQuestionGroupHandler + //when QuestionGroup is created, the result will come to resultSaveQuestionGroupHandler public function resultSaveQuestionGroupHandler(event:ResultEvent):void { var questionGroup:actionscript.QuestionGroup = actionscript.QuestionGroup(event.result as Object); @@ -820,8 +821,9 @@ } } else + { Alert.show("Error in creating QuestionGroup!"); - + } } //when QuestionGroup is updated, the result will come to resultUpdateQuestionGroupHandler @@ -838,8 +840,8 @@ //Alert.show("Length is: " + questionGroupXML.length()); if(questionGroupXML.length() > 0) { - // Alert.show("header is :" + questionGroup.header); - // Alert.show("questionGroup description is :" + questionGroup.description); + //Alert.show("header is :" + questionGroup.header); + //Alert.show("questionGroup description is :" + questionGroup.description); //Alert.show("questionGroup.sequenceNo is :" + questionGroup.sequenceNo); questionGroupXML[0].@header = questionGroup.header; @@ -852,106 +854,106 @@ } } else + { Alert.show("Error in updating QuestionGroup!"); - } + } + } - //QuestionGroup functionality End - - - //Question functionality Start - private function addQuestion():void - { - currentState = "question"; - var obj:DisplayObject = pnlComponent.getChildAt(1); - var questionInfo:custom.db.Question = custom.db.Question(obj); - questionInfo.reset(); + //QuestionGroup functionality End - btnsaveModule.enabled = false; - btnsaveBlock.enabled = false; - btnsaveQuestionGroup.enabled = false; - btnsaveQuestion.enabled = true; - } - - private function QuestionHandler(event:Event):void - { - if(question.cmbType.selectedItem.data.toString().toLowerCase() == "psychometric") + + //Question functionality Start + private function addQuestion():void { - currentState = "psychometric"; - psychometric.reset(); - } - else if(question.cmbType.selectedItem.data.toString().toLowerCase() == "categorical") - { - currentState = "categorical"; - categorical.reset(); - } - else - { currentState = "question"; + var obj:DisplayObject = pnlComponent.getChildAt(1); + var questionInfo:custom.db.Question = custom.db.Question(obj); + questionInfo.reset(); + btnsaveModule.enabled = false; + btnsaveBlock.enabled = false; + btnsaveQuestionGroup.enabled = false; + btnsaveQuestion.enabled = true; } - - } - - private function CategoricalTypeHandler(event:Event):void - { - if(categorical.cmbType.selectedItem.toString().toLowerCase() == "relative") + + private function QuestionHandler(event:Event):void { - currentState = "relative"; - categoricalRelative.reset(); + if(question.cmbType.selectedItem.data.toString().toLowerCase() == "psychometric") + { + currentState = "psychometric"; + psychometric.reset(); + } + else if(question.cmbType.selectedItem.data.toString().toLowerCase() == "categorical") + { + currentState = "categorical"; + categorical.reset(); + } + else + { + currentState = "question"; + } } - else if(categorical.cmbType.selectedItem.toString().toLowerCase() == "simple") - { - currentState = "simple"; - categoricalSimple.reset(); - } - } + private function CategoricalTypeHandler(event:Event):void + { + if(categorical.cmbType.selectedItem.toString().toLowerCase() == "relative") + { + currentState = "relative"; + categoricalRelative.reset(); + } + else if(categorical.cmbType.selectedItem.toString().toLowerCase() == "simple") + { + currentState = "simple"; + categoricalSimple.reset(); + } + + } - private function saveQuestion(event:Event):void - { - var selectedNode:XML = tree.selectedItem as XML; - var node:XML; - - if(tree.selectedItem == null) - { + private function saveQuestion(event:Event):void + { + var selectedNode:XML = tree.selectedItem as XML; + var node:XML; + + if(tree.selectedItem == null) + { Alert.show("Please select the block from tree to which Question Group should be added."); return; - } - else - { - if(selectedNode.localName().toString().toLowerCase() == "module" || selectedNode.localName().toString().toLowerCase() == "block") - { - Alert.show("You can not add Question to Module or Block."); - return; - } - else - { - if(selectedNode.localName().toString().toLowerCase() == "questiongroup") - { - node = selectedNode; - } - else if(selectedNode.localName().toString().toLowerCase() == "question") - { - var parentNode:XML = tree.getParentItem(tree.selectedItem) as XML; - node = parentNode; - } - - - var obj:DisplayObject = pnlComponent.getChildAt(1); - var questionInfo:custom.db.Question = custom.db.Question(obj); - var isQuestionFormValid:Boolean = questionInfo.validateForm(event); - - if(isQuestionFormValid) - { - //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()); - if(questionGroup.length() > 0 ) - { - var checkSeqNoQuestion:XMLList = questionGroup.question.(@sequenceNo == questionInfo.getSequenceNo()); - //Alert.show("checkSeqNoQuestion length: " + checkSeqNoQuestion.length()); + } + else + { + if(selectedNode.localName().toString().toLowerCase() == "module" || selectedNode.localName().toString().toLowerCase() == "block") + { + Alert.show("You can not add Question to Module or Block."); + return; + } + else + { + if(selectedNode.localName().toString().toLowerCase() == "questiongroup") + { + node = selectedNode; + } + else if(selectedNode.localName().toString().toLowerCase() == "question") + { + var parentNode:XML = tree.getParentItem(tree.selectedItem) as XML; + node = parentNode; + } + + + var obj:DisplayObject = pnlComponent.getChildAt(1); + var questionInfo:custom.db.Question = custom.db.Question(obj); + var isQuestionFormValid:Boolean = questionInfo.validateForm(event); + + if(isQuestionFormValid) + { + //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()); + if(questionGroup.length() > 0 ) + { + var checkSeqNoQuestion:XMLList = questionGroup.question.(@sequenceNo == questionInfo.getSequenceNo()); + //Alert.show("checkSeqNoQuestion length: " + checkSeqNoQuestion.length()); if(currentState == "psychometric") { var psychobj:DisplayObject = pnlComponent.getChildAt(2); @@ -991,7 +993,6 @@ } } - else if(currentState == "relative") { var catobj:DisplayObject = pnlComponent.getChildAt(3); @@ -1044,8 +1045,8 @@ var catSimpleobj:DisplayObject = pnlComponent.getChildAt(3); var compCategoricalSimple:custom.db.questions.CategoricalSimple = custom.db.questions.CategoricalSimple(catSimpleobj); var categoricalSimpleQuestion:actionscript.questions.Categorical = new actionscript.questions.Categorical(); - - + + var Simpledict:Dictionary = new Dictionary(); Simpledict = compCategoricalSimple.getDictionary(); for (var option:Object in Simpledict) @@ -1118,202 +1119,198 @@ Alert.show("Sequence number " + questionInfo.getSequenceNo() + " already exists!"); } else + { roQuestionCreator.updateQuestion(question,int(node.@id), questionInfo.getId()); - } - - } - } - } - - - } - } - - } + } + } + } + } + } + } + } + } - public function resultSaveQuestionHandler(event:ResultEvent):void - { - var question_Object:actionscript.questions.Question = actionscript.questions.Question(event.result as Object); - if(question_Object != null) + public function resultSaveQuestionHandler(event:ResultEvent):void { + var question_Object:actionscript.questions.Question = actionscript.questions.Question(event.result as Object); + if(question_Object != null) + { var newQuestionNode:XML = createQuestionNode(question_Object); //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()); if( questionGroup.length() > 0 ) { - questionGroup[0].appendChild(newQuestionNode); - currentState = "none"; + questionGroup[0].appendChild(newQuestionNode); + currentState = "none"; btnsaveQuestion.enabled = false; - } + } + } + else + { + Alert.show("Error in creating Question!"); + } } - else - Alert.show("Error in creating Question!"); - - } - - public function resultUpdateQuestionHandler(event:ResultEvent):void - { - var question:actionscript.questions.Question = actionscript.questions.Question(event.result as Object); - if(question == null) + public function resultUpdateQuestionHandler(event:ResultEvent):void { - Alert.show("Error in creating Question!"); + var question:actionscript.questions.Question = actionscript.questions.Question(event.result as Object); + if(question == null) + { + Alert.show("Error in creating Question!"); + } + else + { + var newNode:XML = <question/>; + newNode.setLocalName("question"); + var newQNode:XML = <question/>; + newQNode.setLocalName("question"); + var choices:String=""; + if(question.type.toLowerCase() == "psychometric") + { + var psychometricResult:actionscript.questions.Psychometric = actionscript.questions.Psychometric(question); + /*Alert.show("Id is: " + psychometricResult.id); + Alert.show("Question is: " + psychometricResult.question); + Alert.show("Type is: " + psychometricResult.type); + Alert.show("SeQNo is: " + psychometricResult.sequenceNo);*/ + + var newPNode:XML = <psychometric/>; + newPNode.setLocalName("psychometric"); + var psychometricList:XMLList = psychometricQuestions.psychometric.(@id == psychometricResult.id); + + if( psychometricList.length() > 0 ) + { + newPNode.@scale = psychometricResult.scale; + newPNode.@maxSliderValue = psychometricResult.maxSliderValue; + + newQNode.@sequenceNo = psychometricResult.sequenceNo; + newQNode.@title = psychometricResult.question; + newQNode.@type = psychometricResult.type; + newQNode.@communication = psychometricResult.communicationQ; + choices = ""; + if(psychometricResult.choices != null) + { + for(var k:int = 0; k < psychometricResult.choices.length; k++) + { + if(choices == "") + { + choices = psychometricResult.choices[k]; + } + else + { + choices = choices + psychometricResult.choices[k]; + } + choices = choices + "," + } + newPNode.@choices = choices; + } + } + } + else if(question.type.toLowerCase() == "categorical") + { + var categoricalResult:actionscript.questions.Categorical = actionscript.questions.Categorical(question); + newQNode.@sequenceNo = categoricalResult.sequenceNo; + 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; + + var newCNode:XML = <categorical/>; + newCNode.setLocalName("categorical"); + + var categoricalList:XMLList = categoricalQuestions.categorical.(@id == categoricalResult.id); + + if( categoricalList.length() > 0 ) + { + //remove all the <option> tags and then add those rather than modifying those. It is simple. + var children:XMLList = categoricalList.children(); + + for(var l:Number=0; l < children.length(); l++) + { + delete children[i]; + } + + if(categoricalResult.categoricalOptions != null) + { + for(var i:int = 0; i < categoricalResult.categoricalOptions.length ; i++) + { + var options:actionscript.questions.CategoricalOption = new actionscript.questions.CategoricalOption(); + options = actionscript.questions.CategoricalOption(categoricalResult.categoricalOptions.getItemAt(i)); + var newOptionNode:XML = <option/>; + newOptionNode.setLocalName("option"); + newOptionNode.@name = options.optionKey; + if(options.choices.length == 0) + { + flagType = false + } + else + { + flagType = true; + choices=""; + + for(k = 0; k < options.choices.length; k++) + { + if(choices == "") + { + choices = options.choices[k]; + } + + else + { + choices = choices + options.choices[k]; + } + + choices = choices + "," + } + newOptionNode.@choices = choices; + } + if(flagType) + { + newCNode.@type = "relative"; + } + else + { + newCNode.@type = "simple"; + } + newCNode.appendChild(newOptionNode); + } + } + } + } + } } - else - { - var newNode:XML = <question/>; - newNode.setLocalName("question"); - var newQNode:XML = <question/>; - newQNode.setLocalName("question"); - var choices:String=""; - if(question.type.toLowerCase() == "psychometric") + //Question functionality Stop + + public function removeItem():void { - var psychometricResult:actionscript.questions.Psychometric = actionscript.questions.Psychometric(question); - /*Alert.show("Id is: " + psychometricResult.id); - Alert.show("Question is: " + psychometricResult.question); - Alert.show("Type is: " + psychometricResult.type); - Alert.show("SeQNo is: " + psychometricResult.sequenceNo);*/ + currentState = "none"; + btnsaveModule.enabled = false; + btnsaveBlock.enabled = false; + btnsaveQuestion.enabled = false; + btnsaveQuestionGroup.enabled = false; - var newPNode:XML = <psychometric/>; - newPNode.setLocalName("psychometric"); - var psychometricList:XMLList = psychometricQuestions.psychometric.(@id == psychometricResult.id); - - if( psychometricList.length() > 0 ) - { - newPNode.@scale = psychometricResult.scale; - newPNode.@maxSliderValue = psychometricResult.maxSliderValue; - - newQNode.@sequenceNo = psychometricResult.sequenceNo; - newQNode.@title = psychometricResult.question; - newQNode.@type = psychometricResult.type; - newQNode.@communication = psychometricResult.communicationQ; - choices = ""; - if(psychometricResult.choices != null) - { - - for(var k:int = 0; k < psychometricResult.choices.length; k++) - { - if(choices == "") - choices = psychometricResult.choices[k]; - - else - choices = choices + psychometricResult.choices[k]; - - choices = choices + "," - - } - - newPNode.@choices = choices; - } - - } - - } - else if(question.type.toLowerCase() == "categorical") - { - var categoricalResult:actionscript.questions.Categorical = actionscript.questions.Categorical(question); - - newQNode.@sequenceNo = categoricalResult.sequenceNo; - 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; - - var newCNode:XML = <categorical/>; - newCNode.setLocalName("categorical"); - - var categoricalList:XMLList = categoricalQuestions.categorical.(@id == categoricalResult.id); - - if( categoricalList.length() > 0 ) - { - //remove all the <option> tags and then add those rather than modifying those. It is simple. - var children:XMLList = categoricalList.children(); - - for(var l:Number=0; l < children.length(); l++) - { - delete children[i]; - } - - - if(categoricalResult.categoricalOptions != null) + var node:XML = XML(tree.selectedItem); + if( node == null ) + { + Alert.show("Please select the Item from tree."); + return; + } + + var children:XMLList = XMLList(node.parent()).children(); + for(var i:Number=0; i < children.length(); i++) + { + if( children[i].@name == node.@name ) { - - for(var i:int = 0; i < categoricalResult.categoricalOptions.length ; i++) - { - var options:actionscript.questions.CategoricalOption = new actionscript.questions.CategoricalOption(); - options = actionscript.questions.CategoricalOption(categoricalResult.categoricalOptions.getItemAt(i)); - var newOptionNode:XML = <option/>; - newOptionNode.setLocalName("option"); - newOptionNode.@name = options.optionKey; - if(options.choices.length == 0) - { - flagType = false - } - else - { - flagType = true; - choices=""; - - for(k = 0; k < options.choices.length; k++) - { - if(choices == "") - choices = options.choices[k]; - - else - choices = choices + options.choices[k]; - - choices = choices + "," - } - newOptionNode.@choices = choices; - } - if(flagType) - newCNode.@type = "relative"; - else - newCNode.@type = "simple"; - newCNode.appendChild(newOptionNode); - } + delete children[i].@*; } } - } - } - - } - //Question functionality Stop - public function removeItem():void - { - currentState = "none"; - btnsaveModule.enabled = false; - btnsaveBlock.enabled = false; - btnsaveQuestion.enabled = false; - btnsaveQuestionGroup.enabled = false; - - var node:XML = XML(tree.selectedItem); - if( node == null ) - { - Alert.show("Please select the Item from tree."); - return; - - } - - var children:XMLList = XMLList(node.parent()).children(); - for(var i:Number=0; i < children.length(); i++) - { - - if( children[i].@name == node.@name ) - { - delete children[i].@*; - } - - } - - } + } - private function treeChanged(event:Event):void + private function treeChanged(event:Event):void { var selectedNode:int; @@ -1451,14 +1448,10 @@ for(var i:int = 0; i < outputchoices.length; i++) { - dict[str].addItem(outputchoices[i]); - } - } compRelative.setDictionary(dict); -... [truncated message content] |
From: Kalin J. <kj...@as...> - 2009-08-04 18:33:49
|
Today I arrived at 11:00am, and began discussing my work over the last week. I will continue to discuss changes I have made, commit my previous code. I will be working to make sure that my code can properly handle when it receives a block. After this, I will center the content within the application, but it will not re-size itself right now. Intermittently, I will be talking to Seema regarding the program and changes to be made. |
From: <al...@us...> - 2009-08-04 06:05:29
|
Revision: 213 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=213&view=rev Author: alllee Date: 2009-08-04 06:05:21 +0000 (Tue, 04 Aug 2009) Log Message: ----------- quicktime movie creation appears to work. still need to tweak frame rate, should create a frame for each movement/token collection Modified Paths: -------------- foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java Modified: foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java =================================================================== --- foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java 2009-08-03 19:34:52 UTC (rev 212) +++ foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java 2009-08-04 06:05:21 UTC (rev 213) @@ -8,6 +8,7 @@ import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; +import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -19,8 +20,8 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.imageio.ImageIO; import javax.swing.JFrame; +import javax.swing.SwingUtilities; import edu.asu.commons.event.ChatRequest; import edu.asu.commons.event.PersistableEvent; @@ -95,69 +96,107 @@ public MovieCreatorProcessor(VideoFormat videoFormat) { this.videoFormat = videoFormat; } - + @Override public void process(SavedRoundData savedRoundData, OutputStream stream) { - try { - // hmm, there needs to be one output stream per group because we write 1 video per group. -// QuickTimeOutputStream quickTimeOutputStream = new QuickTimeOutputStream(stream, videoFormat); - ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); - RoundConfiguration roundConfiguration = (RoundConfiguration) savedRoundData.getRoundParameters(); - List<GroupView> groupViewList = new ArrayList<GroupView>(); - serverDataModel.reinitialize(); - List<JFrame> jframes = new ArrayList<JFrame>(); - Dimension dimension = new Dimension(800, 600); -// int i = 0; - for (GroupDataModel groupDataModel: serverDataModel.getGroups()) { - GroupView groupView = new GroupView(dimension, groupDataModel); - groupView.setup(roundConfiguration); - groupViewList.add(groupView); - JFrame jframe = new JFrame("Group: " + groupViewList.size()); - jframe.setPreferredSize(dimension); - jframe.add(groupView); - jframe.pack(); - jframe.setVisible(true); - jframes.add(jframe); - } - int secondHasPassedCheck = -1; - // grab out all add client events to initialize the state of the game properly. - for (PersistableEvent event: savedRoundData.getActions()) { - if (event instanceof AddClientEvent) { - serverDataModel.apply(event); - } - } - for (PersistableEvent event: savedRoundData.getActions()) { - int elapsedTimeInSeconds = savedRoundData.getElapsedTimeInSeconds(event); - System.err.println("elapsed time in seconds: " + elapsedTimeInSeconds); - serverDataModel.apply(event); - if (elapsedTimeInSeconds > secondHasPassedCheck) { - secondHasPassedCheck = elapsedTimeInSeconds; - // take a snapshot of each group... - for (GroupView groupView: groupViewList) { - Graphics2D graphics = (Graphics2D) groupView.getGraphics(); - BufferedImage bufferedImage = graphics.getDeviceConfiguration().createCompatibleImage(800, 600); -// write a frame to the quicktime movie... -// quickTimeOutputStream.writeFrame(bufferedImage, 40); - // write buffered image out to named sequentially. - ImageIO.write(bufferedImage, videoFormat.name(), new File(elapsedTimeInSeconds + "-group-" + groupViewList.indexOf(groupView) + "." + videoFormat.name())); - } - } - } - for (JFrame jframe : jframes) { - jframe.setVisible(false); - jframe.dispose(); - } - + // hmm, there needs to be one output stream per group because we write 1 video per group. + // QuickTimeOutputStream quickTimeOutputStream = new QuickTimeOutputStream(stream, videoFormat); + ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); + RoundConfiguration roundConfiguration = (RoundConfiguration) savedRoundData.getRoundParameters(); + final List<GroupView> groupViewList = new ArrayList<GroupView>(); + final Map<GroupView, QuickTimeOutputStream> groupViewMap = new HashMap<GroupView, QuickTimeOutputStream>(); + serverDataModel.reinitialize(); + List<JFrame> jframes = new ArrayList<JFrame>(); + Dimension dimension = new Dimension(800, 800); + File savedRoundDataFile = new File(savedRoundData.getSaveFilePath()); + String saveFilePath = savedRoundDataFile.getName(); + for (GroupDataModel groupDataModel: serverDataModel.getGroups()) { + GroupView groupView = new GroupView(dimension, groupDataModel); + groupView.setup(roundConfiguration); + groupViewList.add(groupView); + try { + File groupMovieFile = new File(savedRoundDataFile.getCanonicalPath() + "-group-" + groupViewList.size() + "-" + saveFilePath + ".mov"); + groupViewMap.put(groupView, new QuickTimeOutputStream(groupMovieFile, videoFormat)); + } + catch (IOException exception) { + exception.printStackTrace(); + } + JFrame jframe = new JFrame("Group: " + groupViewList.size()); + jframe.add(groupView); + jframe.pack(); + jframe.setVisible(true); + jframes.add(jframe); } - catch (IOException exception) { - exception.printStackTrace(); - throw new RuntimeException(exception); + int secondHasPassedCheck = -1; + // grab out all add client events to initialize the state of the game properly. + for (PersistableEvent event: savedRoundData.getActions()) { + if (event instanceof AddClientEvent) { + System.err.println("Adding client: " + event); + serverDataModel.apply(event); + } } - - + for (PersistableEvent event: savedRoundData.getActions()) { + final int elapsedTimeInSeconds = savedRoundData.getElapsedTimeInSeconds(event); + System.err.println("elapsed time in seconds: " + elapsedTimeInSeconds + ":" + event); + serverDataModel.apply(event); + if (elapsedTimeInSeconds > secondHasPassedCheck) { + secondHasPassedCheck = elapsedTimeInSeconds; + // take a snapshot of each group... + for (final GroupView groupView: groupViewList) { + try { +// groupView.repaint(); + final Dimension groupViewSize = groupView.getSize(); + SwingUtilities.invokeAndWait(new Runnable() { + public void run() { + Graphics2D graphics = (Graphics2D) groupView.getGraphics(); + + BufferedImage bufferedImage = graphics.getDeviceConfiguration().createCompatibleImage(groupViewSize.width, groupViewSize.height); + Graphics2D bufferedImageGraphics = bufferedImage.createGraphics(); + groupView.paint(bufferedImageGraphics); + try { + // currently each frame is 1 second.. maybe we can divvy this up so it's .5 seconds instead. + groupViewMap.get(groupView).writeFrame(bufferedImage, 600); + } + catch (IOException exception) { + exception.printStackTrace(); + throw new RuntimeException(exception); + } + + // write buffered image out to sequentially named file..? +// try { +// ImageIO.write(bufferedImage, videoFormat.name(), new File(elapsedTimeInSeconds + "-group-" + groupViewList.indexOf(groupView) + "." + videoFormat.name())); +// } +// catch (IOException e) { +// e.printStackTrace(); +// throw new RuntimeException(e); +// } + } + }); + } + catch (InterruptedException e) { + e.printStackTrace(); + } + catch (InvocationTargetException e) { + e.printStackTrace(); + } + } + } + } + for (QuickTimeOutputStream out : groupViewMap.values()) { + try { + out.close(); + } + catch (IOException exception) { + exception.printStackTrace(); + } + } + for (JFrame jframe : jframes) { + jframe.setVisible(false); + jframe.dispose(); + } - } + @Override public void process(SavedRoundData savedRoundData, PrintWriter writer) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2009-08-03 19:35:00
|
Revision: 212 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=212&view=rev Author: seematalele Date: 2009-08-03 19:34:52 +0000 (Mon, 03 Aug 2009) Log Message: ----------- In revision 211 conflicts were not resolved properly. Those conflicts are resolved properly now. Revision Links: -------------- http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=211&view=rev Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java 2009-08-03 18:30:50 UTC (rev 211) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/QuestionGroup.java 2009-08-03 19:34:52 UTC (rev 212) @@ -19,7 +19,6 @@ import javax.persistence.OrderBy; import javax.persistence.Table; -import sun.security.action.GetLongAction; /* 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-08-03 18:30:50 UTC (rev 211) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-08-03 19:34:52 UTC (rev 212) @@ -14,7 +14,6 @@ import edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao; import edu.asu.commons.mme.dao.HibernateModuleDao; import edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao; -import edu.asu.commons.mme.dao.HibernateModuleDao; import edu.asu.commons.mme.dao.HibernateQuestionDao; import edu.asu.commons.mme.dao.HibernateQuestionGroupDao; import edu.asu.commons.mme.entity.Block; @@ -23,7 +22,6 @@ 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.Module; import edu.asu.commons.mme.entity.Question; import edu.asu.commons.mme.entity.QuestionGroup; import edu.asu.commons.mme.entity.Round; @@ -46,8 +44,6 @@ private HibernateQuestionGroupDao questionGroupDao; private HibernatePsychometricQuestionDao psychometricQuestionDao; private HibernateCategoricalQuestionDao categoricalQuestionDao; - private HibernateModuleDao moduleDao; - private HibernateQuestionGroupDao questionGroupDao; Module module; Block block; @@ -702,173 +698,6 @@ } - Module module; - Block block; - QuestionGroup questionGroup; - - public Module saveModule(Integer sequenceNo, String description, Integer duration) - { - module = new Module(); - module.setSequenceNo(sequenceNo); - module.setDescription(description); - module.setDuration(duration); - moduleDao.save(module); - getLogger().debug("module is created with Id: " + module.getId()); - - return module; - - } - - public Module updateModule(Long id, Integer sequenceNo, String description, Integer duration) - { - getLogger().debug("Id came from client is: " + id); - - module = moduleDao.findByProperty("id", id); - Hibernate.initialize(module); - List<Block> listBlock = module.getBlocks(); - Iterator<Block> iterateBlock = listBlock.iterator(); - while(iterateBlock.hasNext()) - { - Block block = iterateBlock.next(); - Hibernate.initialize(block); - List<QuestionGroup> questionGroup = block.getQuestionGroups(); - Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); - { - - while(iteratorquestion.hasNext()) - { - Hibernate.initialize(iteratorquestion.next()); - } - } - - } - if( module != null) - { - module.setSequenceNo(sequenceNo); - module.setDescription(description); - module.setDuration(duration); - moduleDao.save(module); - getLogger().debug("module is updated with Id: " + module.getId()); - - } - - return module; - - } - - public Block saveBlock(Integer sequenceNo, String description, Integer duration, Long module_Id) - { - - Block block = new Block(); - - block.setSequenceNo(sequenceNo); - block.setDescription(description); - block.setDuration(duration); - - module = moduleDao.find(module_Id); - Hibernate.initialize(module); - List<Block> listBlock = module.getBlocks(); - Iterator<Block> iterateBlock = listBlock.iterator(); - while(iterateBlock.hasNext()) - { - Block moduleblock = iterateBlock.next(); - Hibernate.initialize(moduleblock); - List<QuestionGroup> questionGroup = moduleblock.getQuestionGroups(); - Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); - { - - while(iteratorquestion.hasNext()) - { - Hibernate.initialize(iteratorquestion.next()); - } - } - - } - block.setModule(module); - blockDao.save(block); - getLogger().debug("block is created with Id: " + block.getId()); - return block; - - } - - public Block updateBlock(Long id, Integer sequenceNo, String description, Integer duration, Long module_Id) - { - getLogger().debug("Id came from client is: " + id); - - block = blockDao.findByProperty("id", id); - Hibernate.initialize(block); - List<QuestionGroup> questionGroup = block.getQuestionGroups(); - Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); - { - - while(iteratorquestion.hasNext()) - { - Hibernate.initialize(iteratorquestion.next()); - } - } - if(block != null) - { - block.setSequenceNo(sequenceNo); - block.setDescription(description); - block.setDuration(duration); - module = moduleDao.find(module_Id); - Hibernate.initialize(module); - List<Block> listBlock = module.getBlocks(); - Iterator<Block> iterateBlock = listBlock.iterator(); - while(iterateBlock.hasNext()) - { - Block moduleblock = iterateBlock.next(); - Hibernate.initialize(moduleblock); - List<QuestionGroup> blockquestionGroup = moduleblock.getQuestionGroups(); - Iterator<QuestionGroup> blockiteratorquestion = blockquestionGroup.iterator(); - { - - while(blockiteratorquestion.hasNext()) - { - Hibernate.initialize(blockiteratorquestion.next()); - } - } - - } - block.setModule(module); - blockDao.save(block); - getLogger().debug("block is updated with Id: " + block.getId()); - } - return block; - - } - - public QuestionGroup saveQuestionGroup(Integer sequenceNo, String description, Long block_id) - { - - questionGroup = new QuestionGroup(); - questionGroup.setSequenceNo(sequenceNo); - questionGroup.setDescription(description); - questionGroup.setBlock(blockDao.find(block_id)); - save(questionGroup); - getLogger().debug("QuestionGroup is created with Id: " + questionGroup.getId()); - return questionGroup; - - } - - public QuestionGroup updateQuestionGroup(Long id, Integer sequenceNo, String description, Long block_id) - { - getLogger().debug("Id came from client is: " + id); - - questionGroup = questionGroupDao.findByProperty("id", id); - Hibernate.initialize(questionGroup); - - if(questionGroup != null) - { - questionGroup.setSequenceNo(sequenceNo); - questionGroup.setDescription(description); - questionGroup.setBlock(blockDao.find(block_id)); - save(questionGroup); - getLogger().debug("questionGroup is updated with Id: " + questionGroup.getId()); - } - return questionGroup; - } - public void createQuestions() { // check if we need to recreate these questions. block = blockDao.find(3L); @@ -1013,14 +842,6 @@ public void setQuestionGroupDao(HibernateQuestionGroupDao questionGroupDao) { this.questionGroupDao = questionGroupDao; } - public void setModuleDao(HibernateModuleDao moduleDao) { - this.moduleDao = moduleDao; - } - - public void setQuestionGroupDao(HibernateQuestionGroupDao questionGroupDao) { - this.questionGroupDao = questionGroupDao; - } - public void setPsychometricQuestionDao(HibernatePsychometricQuestionDao psychometricQuestionDao) { this.psychometricQuestionDao = psychometricQuestionDao; @@ -1030,4 +851,3 @@ } } -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2009-08-03 18:31:03
|
Revision: 211 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=211&view=rev Author: seematalele Date: 2009-08-03 18:30:50 +0000 (Mon, 03 Aug 2009) Log Message: ----------- Resolved the conflicts in QuestionCreatorService.java and applicationContext.xml files Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 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-08-03 06:34:04 UTC (rev 210) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/QuestionCreatorService.java 2009-08-03 18:30:50 UTC (rev 211) @@ -14,6 +14,7 @@ import edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao; import edu.asu.commons.mme.dao.HibernateModuleDao; import edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao; +import edu.asu.commons.mme.dao.HibernateModuleDao; import edu.asu.commons.mme.dao.HibernateQuestionDao; import edu.asu.commons.mme.dao.HibernateQuestionGroupDao; import edu.asu.commons.mme.entity.Block; @@ -22,6 +23,7 @@ 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.Module; import edu.asu.commons.mme.entity.Question; import edu.asu.commons.mme.entity.QuestionGroup; import edu.asu.commons.mme.entity.Round; @@ -44,6 +46,8 @@ private HibernateQuestionGroupDao questionGroupDao; private HibernatePsychometricQuestionDao psychometricQuestionDao; private HibernateCategoricalQuestionDao categoricalQuestionDao; + private HibernateModuleDao moduleDao; + private HibernateQuestionGroupDao questionGroupDao; Module module; Block block; @@ -698,6 +702,173 @@ } + Module module; + Block block; + QuestionGroup questionGroup; + + public Module saveModule(Integer sequenceNo, String description, Integer duration) + { + module = new Module(); + module.setSequenceNo(sequenceNo); + module.setDescription(description); + module.setDuration(duration); + moduleDao.save(module); + getLogger().debug("module is created with Id: " + module.getId()); + + return module; + + } + + public Module updateModule(Long id, Integer sequenceNo, String description, Integer duration) + { + getLogger().debug("Id came from client is: " + id); + + module = moduleDao.findByProperty("id", id); + Hibernate.initialize(module); + List<Block> listBlock = module.getBlocks(); + Iterator<Block> iterateBlock = listBlock.iterator(); + while(iterateBlock.hasNext()) + { + Block block = iterateBlock.next(); + Hibernate.initialize(block); + List<QuestionGroup> questionGroup = block.getQuestionGroups(); + Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); + { + + while(iteratorquestion.hasNext()) + { + Hibernate.initialize(iteratorquestion.next()); + } + } + + } + if( module != null) + { + module.setSequenceNo(sequenceNo); + module.setDescription(description); + module.setDuration(duration); + moduleDao.save(module); + getLogger().debug("module is updated with Id: " + module.getId()); + + } + + return module; + + } + + public Block saveBlock(Integer sequenceNo, String description, Integer duration, Long module_Id) + { + + Block block = new Block(); + + block.setSequenceNo(sequenceNo); + block.setDescription(description); + block.setDuration(duration); + + module = moduleDao.find(module_Id); + Hibernate.initialize(module); + List<Block> listBlock = module.getBlocks(); + Iterator<Block> iterateBlock = listBlock.iterator(); + while(iterateBlock.hasNext()) + { + Block moduleblock = iterateBlock.next(); + Hibernate.initialize(moduleblock); + List<QuestionGroup> questionGroup = moduleblock.getQuestionGroups(); + Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); + { + + while(iteratorquestion.hasNext()) + { + Hibernate.initialize(iteratorquestion.next()); + } + } + + } + block.setModule(module); + blockDao.save(block); + getLogger().debug("block is created with Id: " + block.getId()); + return block; + + } + + public Block updateBlock(Long id, Integer sequenceNo, String description, Integer duration, Long module_Id) + { + getLogger().debug("Id came from client is: " + id); + + block = blockDao.findByProperty("id", id); + Hibernate.initialize(block); + List<QuestionGroup> questionGroup = block.getQuestionGroups(); + Iterator<QuestionGroup> iteratorquestion = questionGroup.iterator(); + { + + while(iteratorquestion.hasNext()) + { + Hibernate.initialize(iteratorquestion.next()); + } + } + if(block != null) + { + block.setSequenceNo(sequenceNo); + block.setDescription(description); + block.setDuration(duration); + module = moduleDao.find(module_Id); + Hibernate.initialize(module); + List<Block> listBlock = module.getBlocks(); + Iterator<Block> iterateBlock = listBlock.iterator(); + while(iterateBlock.hasNext()) + { + Block moduleblock = iterateBlock.next(); + Hibernate.initialize(moduleblock); + List<QuestionGroup> blockquestionGroup = moduleblock.getQuestionGroups(); + Iterator<QuestionGroup> blockiteratorquestion = blockquestionGroup.iterator(); + { + + while(blockiteratorquestion.hasNext()) + { + Hibernate.initialize(blockiteratorquestion.next()); + } + } + + } + block.setModule(module); + blockDao.save(block); + getLogger().debug("block is updated with Id: " + block.getId()); + } + return block; + + } + + public QuestionGroup saveQuestionGroup(Integer sequenceNo, String description, Long block_id) + { + + questionGroup = new QuestionGroup(); + questionGroup.setSequenceNo(sequenceNo); + questionGroup.setDescription(description); + questionGroup.setBlock(blockDao.find(block_id)); + save(questionGroup); + getLogger().debug("QuestionGroup is created with Id: " + questionGroup.getId()); + return questionGroup; + + } + + public QuestionGroup updateQuestionGroup(Long id, Integer sequenceNo, String description, Long block_id) + { + getLogger().debug("Id came from client is: " + id); + + questionGroup = questionGroupDao.findByProperty("id", id); + Hibernate.initialize(questionGroup); + + if(questionGroup != null) + { + questionGroup.setSequenceNo(sequenceNo); + questionGroup.setDescription(description); + questionGroup.setBlock(blockDao.find(block_id)); + save(questionGroup); + getLogger().debug("questionGroup is updated with Id: " + questionGroup.getId()); + } + return questionGroup; + } + public void createQuestions() { // check if we need to recreate these questions. block = blockDao.find(3L); @@ -842,6 +1013,14 @@ public void setQuestionGroupDao(HibernateQuestionGroupDao questionGroupDao) { this.questionGroupDao = questionGroupDao; } + public void setModuleDao(HibernateModuleDao moduleDao) { + this.moduleDao = moduleDao; + } + + public void setQuestionGroupDao(HibernateQuestionGroupDao questionGroupDao) { + this.questionGroupDao = questionGroupDao; + } + public void setPsychometricQuestionDao(HibernatePsychometricQuestionDao psychometricQuestionDao) { this.psychometricQuestionDao = psychometricQuestionDao; @@ -851,3 +1030,4 @@ } } +} Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-08-03 06:34:04 UTC (rev 210) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-08-03 18:30:50 UTC (rev 211) @@ -1,85 +1,89 @@ -<?xml version="1.0"?> -<!-- - vim:sts=2:sw=2: ---> -<!-- - $Id: applicationContext.xml 617 2008-03-28 17:27:23Z alllee $ ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:flex="http://www.springframework.org/schema/flex" - xmlns:security="http://www.springframework.org/schema/security" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:aop="http://www.springframework.org/schema/aop" - xmlns:tx="http://www.springframework.org/schema/tx" - xsi:schemaLocation=" - - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx-2.0.xsd - http://www.springframework.org/schema/aop - http://www.springframework.org/schema/aop/spring-aop-2.0.xsd - http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/flex - http://www.springframework.org/schema/flex/spring-flex-1.0.xsd - http://www.springframework.org/schema/security - http://www.springframework.org/schema/security/spring-security-2.0.4.xsd"> - - -<!-- Flex related information started --> - <flex:message-broker /> - -<!-- XXX: Split these out into separate XML files and import them if this file gets too large --> -<!-- spring managed daos --> - <bean id='studentDao' class='edu.asu.commons.mme.dao.HibernateStudentDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - +<?xml version="1.0"?> +<!-- + vim:sts=2:sw=2: +--> +<!-- + $Id: applicationContext.xml 617 2008-03-28 17:27:23Z alllee $ +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:flex="http://www.springframework.org/schema/flex" + xmlns:security="http://www.springframework.org/schema/security" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xmlns:tx="http://www.springframework.org/schema/tx" + xsi:schemaLocation=" + + http://www.springframework.org/schema/tx + http://www.springframework.org/schema/tx/spring-tx-2.0.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/aop/spring-aop-2.0.xsd + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/flex + http://www.springframework.org/schema/flex/spring-flex-1.0.xsd + http://www.springframework.org/schema/security + http://www.springframework.org/schema/security/spring-security-2.0.4.xsd"> + + +<!-- Flex related information started --> + <flex:message-broker /> + +<!-- XXX: Split these out into separate XML files and import them if this file gets too large --> +<!-- spring managed daos --> + <bean id='studentDao' class='edu.asu.commons.mme.dao.HibernateStudentDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + <bean id='roundConfigDao' class='edu.asu.commons.mme.dao.HibernateRoundConfigDao'> <property name='sessionFactory' ref='sessionFactory'/> </bean> - <bean id='moduleDao' class="edu.asu.commons.mme.dao.HibernateModuleDao"> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='blockDao' class='edu.asu.commons.mme.dao.HibernateBlockDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='questionDao' class='edu.asu.commons.mme.dao.HibernateQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='psychometricQuestionDao' class='edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - - <bean id='categoricalQuestionDao' class='edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - - <bean id='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='studentResponseDao' class='edu.asu.commons.mme.dao.HibernateStudentResponseDao'> - <property name='sessionFactory' ref='sessionFactory'/> - </bean> - - <bean id='dayByDayDecisionsDao' class='edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao'> - <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='moduleDao' class="edu.asu.commons.mme.dao.HibernateModuleDao"> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='blockDao' class='edu.asu.commons.mme.dao.HibernateBlockDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='questionDao' class='edu.asu.commons.mme.dao.HibernateQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='psychometricQuestionDao' class='edu.asu.commons.mme.dao.HibernatePsychometricQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + + <bean id='categoricalQuestionDao' class='edu.asu.commons.mme.dao.HibernateCategoricalQuestionDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + + <bean id='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='studentResponseDao' class='edu.asu.commons.mme.dao.HibernateStudentResponseDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + + <bean id='dayByDayDecisionsDao' class='edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao'> + <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='questionGroupDao' class='edu.asu.commons.mme.dao.HibernateQuestionGroupDao'> + <property name='sessionFactory' ref='sessionFactory'/> + </bean> + <bean id='dayByDayDecisionsService' class='edu.asu.commons.mme.service.DayByDayDecisionsService'> <property name='dao' ref='dayByDayDecisionsDao'/> </bean> @@ -98,74 +102,78 @@ </bean> - <bean id='questionCreatorService' class='edu.asu.commons.mme.service.QuestionCreatorService'> - <property name='dao' ref='questionDao'/> - <property name='blockDao' ref='blockDao'/> - <property name='moduleDao' ref='moduleDao'/> - <property name='questionGroupDao' ref='questionGroupDao'/> - <property name='psychometricQuestionDao' ref='psychometricQuestionDao'/> - <property name='categoricalQuestionDao' ref='categoricalQuestionDao'/> - </bean> - - <bean id='startupService' class='edu.asu.commons.mme.service.StartupService'> - <property name='questionCreatorService' ref='questionCreatorService'/> + <bean id='questionCreatorService' class='edu.asu.commons.mme.service.QuestionCreatorService'> + <property name='dao' ref='questionDao'/> + <property name='blockDao' ref='blockDao'/> + <property name='moduleDao' ref='moduleDao'/> + <property name='questionGroupDao' ref='questionGroupDao'/> + <property name='psychometricQuestionDao' ref='psychometricQuestionDao'/> + <property name='categoricalQuestionDao' ref='categoricalQuestionDao'/> + <property name='moduleDao' ref='moduleDao'/> + <property name='questionGroupDao' ref='questionGroupDao'/> + + </bean> + + <bean id='startupService' class='edu.asu.commons.mme.service.StartupService'> + <property name='questionCreatorService' ref='questionCreatorService'/> <property name='studentService' ref='studentService'/> - </bean> + </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'/> - </bean> - -<!-- spring managed service layer --> - <bean id='moduleService' class="edu.asu.commons.mme.service.ModuleService"> - <property name='dao' ref='moduleDao'/> - </bean> - - -<!-- Expose services for BlazeDS remoting --> - <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:remote-service ref="locationService" /> - -<!-- Flex related information ended--> - - <bean id="mmeDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> - <property name="driverClassName" value="${hibernate.connection.driver_class}"/> - <property name="url" value="${hibernate.connection.url}"/> - <property name="username" value="${hibernate.connection.user}"/> - <property name="password" value="${hibernate.connection.password}"/> - </bean> - - <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> - <property name="location" value="/WEB-INF/hibernate.properties"/> - <property name="beanName" value="mmeDataSource"/> - </bean> - - <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> - <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/> - <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/> - <property name="hibernateProperties"> - <props> - <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop> - <prop key="hibernate.show_sql">false</prop> - </props> - </property> - <property name="dataSource" ref="mmeDataSource"/> - </bean> - - <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> - <property name="sessionFactory" ref="sessionFactory"/> - </bean> - <!-- XXX: don't need proxy-target-class if services are interfaces instead --> - <tx:annotation-driven proxy-target-class="true"/> - -</beans> + + <bean id='studentService' class='edu.asu.commons.mme.service.StudentService'> + <property name='dao' ref='studentDao'/> + </bean> + +<!-- spring managed service layer --> + <bean id='moduleService' class="edu.asu.commons.mme.service.ModuleService"> + <property name='dao' ref='moduleDao'/> + </bean> + + +<!-- Expose services for BlazeDS remoting --> + <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:remote-service ref="locationService" /> + <flex:remote-service ref="questionCreatorService" /> + +<!-- Flex related information ended--> + + <bean id="mmeDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> + <property name="driverClassName" value="${hibernate.connection.driver_class}"/> + <property name="url" value="${hibernate.connection.url}"/> + <property name="username" value="${hibernate.connection.user}"/> + <property name="password" value="${hibernate.connection.password}"/> + </bean> + + <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location" value="/WEB-INF/hibernate.properties"/> + <property name="beanName" value="mmeDataSource"/> + </bean> + + <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> + <property name="configLocation" value="/WEB-INF/hibernate.cfg.xml"/> + <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/> + <property name="hibernateProperties"> + <props> + <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop> + <prop key="hibernate.show_sql">false</prop> + </props> + </property> + <property name="dataSource" ref="mmeDataSource"/> + </bean> + + <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> + <property name="sessionFactory" ref="sessionFactory"/> + </bean> + <!-- XXX: don't need proxy-target-class if services are interfaces instead --> + <tx:annotation-driven proxy-target-class="true"/> + +</beans> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2009-08-03 06:34:12
|
Revision: 210 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=210&view=rev Author: alllee Date: 2009-08-03 06:34:04 +0000 (Mon, 03 Aug 2009) Log Message: ----------- rudimentary image snapshotting almost functional; the image is appearing onscreen but not getting buffered offscreen properly via createCompatibleImage. Modified Paths: -------------- foraging/trunk/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java foraging/trunk/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java Modified: foraging/trunk/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java =================================================================== --- foraging/trunk/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java 2009-07-26 20:00:24 UTC (rev 209) +++ foraging/trunk/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java 2009-08-03 06:34:04 UTC (rev 210) @@ -95,7 +95,7 @@ clientState.reset(); } getRemovedResources().addAll(resourceDistribution.values()); - addedResources.clear(); + getAddedResources().clear(); resourceDistribution.clear(); } Modified: foraging/trunk/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java =================================================================== --- foraging/trunk/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java 2009-07-26 20:00:24 UTC (rev 209) +++ foraging/trunk/src/main/java/edu/asu/commons/foraging/model/ServerDataModel.java 2009-08-03 06:34:04 UTC (rev 210) @@ -15,6 +15,7 @@ import java.util.Set; import java.util.logging.Logger; +import edu.asu.commons.event.Event; import edu.asu.commons.event.EventChannel; import edu.asu.commons.event.EventTypeChannel; import edu.asu.commons.event.PersistableEvent; @@ -48,13 +49,13 @@ private static final long serialVersionUID = 8166812955398387600L; - private final transient Logger logger = Logger.getLogger( getClass().getName() ); + private transient Logger logger = Logger.getLogger( getClass().getName() ); - private final transient Random random = new Random(); + private transient Random random = new Random(); private transient FractalTerrain terrain; - // Maps client Identifiers to the Group that client belongs to. + // Maps client Identifiers to the GroupDataModel that the client belongs to private final Map<Identifier, GroupDataModel> clientsToGroups = new HashMap<Identifier, GroupDataModel>(); public ServerDataModel() { @@ -115,25 +116,30 @@ GroupDataModel group = ace.getGroup(); group.setServerDataModel(this); addClientToGroup(clientData, group); - // XXX: this must occur after we add the client to the group because group.addClient sets - // the position as well according to the spacing algorithm. + // XXX: this must occur after we add the client to the group because addClientToGroup() sets + // the position according to the spacing algorithm. clientData.setPosition(ace.getPosition()); // AddClientEvent ace = (AddClientEvent) persistableEvent; // addClient(ace.getClientData()); - } + } + else if (event instanceof ResourcesAddedEvent) { + ResourcesAddedEvent resourcesAddedEvent = (ResourcesAddedEvent) event; + addResources(resourcesAddedEvent.getGroup(), resourcesAddedEvent.getResources()); + } else if (event instanceof MovementEvent) { MovementEvent movementEvent = (MovementEvent) event; moveClient(movementEvent.getId(), movementEvent.getDirection()); } else if (event instanceof ResourceAddedEvent) { - ResourceAddedEvent fae = (ResourceAddedEvent) event; - addResource(fae.getGroup(), fae.getResource()); + ResourceAddedEvent resourceAddedEvent = (ResourceAddedEvent) event; + addResource(resourceAddedEvent.getGroup(), resourceAddedEvent.getResource()); } else if (event instanceof RealTimeSanctionRequest) { // getGroup(event.getId()).handle(event); } else if (event instanceof ResetTokenDistributionRequest) { + getGroup(event.getId()).resetResourceDistribution(); } else if (event instanceof TokenCollectedEvent) { @@ -358,6 +364,28 @@ } } + /** + * Resets this server data model by performing the following: + * + * 1. Sets event channel to a no-op event channel. + */ + public void setNullEventChannel() { + super.channel = new EventTypeChannel() { + public void handle(Event event) { } + }; + } + + public void resetGroupResourceDistributions() { + for (GroupDataModel group: getGroups()) { + group.resetResourceDistribution(); + } + } + + public void reinitialize() { + setNullEventChannel(); + resetGroupResourceDistributions(); + } + public boolean isLastRound() { return getRoundConfiguration().isLastRound(); } @@ -366,7 +394,12 @@ objectInputStream.defaultReadObject(); for (GroupDataModel group: getGroups()) { group.setServerDataModel(this); + // should we clear the resource distribution for all groups as well? However, this means we won't be able to get the residual token counts + // from the + // group.resetResourceDistribution(); } super.channel = new EventTypeChannel(); + logger = Logger.getLogger( getClass().getName() ); + random = new Random(); } } Modified: foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java =================================================================== --- foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java 2009-07-26 20:00:24 UTC (rev 209) +++ foraging/trunk/src/main/java/edu/asu/commons/foraging/util/ForagingSaveFileConverter.java 2009-08-03 06:34:04 UTC (rev 210) @@ -1,7 +1,9 @@ package edu.asu.commons.foraging.util; import java.awt.Dimension; +import java.awt.Graphics2D; import java.awt.Point; +import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.io.OutputStream; @@ -17,13 +19,16 @@ import java.util.SortedSet; import java.util.TreeSet; +import javax.imageio.ImageIO; +import javax.swing.JFrame; + import edu.asu.commons.event.ChatRequest; import edu.asu.commons.event.PersistableEvent; import edu.asu.commons.experiment.Persister; import edu.asu.commons.experiment.SaveFileProcessor; import edu.asu.commons.experiment.SavedRoundData; -import edu.asu.commons.foraging.client.SubjectView; import edu.asu.commons.foraging.conf.RoundConfiguration; +import edu.asu.commons.foraging.event.AddClientEvent; import edu.asu.commons.foraging.event.ClientPoseUpdate; import edu.asu.commons.foraging.event.HarvestFruitRequest; import edu.asu.commons.foraging.event.HarvestResourceRequest; @@ -31,6 +36,7 @@ import edu.asu.commons.foraging.event.ResourceAddedEvent; import edu.asu.commons.foraging.event.ResourcesAddedEvent; import edu.asu.commons.foraging.event.TokenCollectedEvent; +import edu.asu.commons.foraging.facilitator.GroupView; import edu.asu.commons.foraging.model.ClientData; import edu.asu.commons.foraging.model.Direction; import edu.asu.commons.foraging.model.GroupDataModel; @@ -57,11 +63,12 @@ if (allSaveFilesDirectory.exists() && allSaveFilesDirectory.isDirectory()) { List<SaveFileProcessor> processors = new ArrayList<SaveFileProcessor>(); processors.addAll(Arrays.asList( - new AllDataProcessor(), - new AggregateTimeIntervalProcessor(), - new SummaryProcessor(), - new CollectedTokenSpatialDistributionProcessor(), - new MovementStatisticsProcessor() + new MovieCreatorProcessor() +// new AllDataProcessor(), +// new AggregateTimeIntervalProcessor(), +// new SummaryProcessor(), +// new CollectedTokenSpatialDistributionProcessor(), +// new MovementStatisticsProcessor() )); Persister.processSaveFiles(allSaveFilesDirectory, processors); return true; @@ -79,16 +86,67 @@ private static class MovieCreatorProcessor extends SaveFileProcessor.Base { - private VideoFormat videoFormat = VideoFormat.PNG; + private VideoFormat videoFormat; + + public MovieCreatorProcessor() { + this(VideoFormat.PNG); + } + + public MovieCreatorProcessor(VideoFormat videoFormat) { + this.videoFormat = videoFormat; + } @Override public void process(SavedRoundData savedRoundData, OutputStream stream) { try { - QuickTimeOutputStream outputStream = new QuickTimeOutputStream(stream); + // hmm, there needs to be one output stream per group because we write 1 video per group. +// QuickTimeOutputStream quickTimeOutputStream = new QuickTimeOutputStream(stream, videoFormat); ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); + RoundConfiguration roundConfiguration = (RoundConfiguration) savedRoundData.getRoundParameters(); + List<GroupView> groupViewList = new ArrayList<GroupView>(); + serverDataModel.reinitialize(); + List<JFrame> jframes = new ArrayList<JFrame>(); + Dimension dimension = new Dimension(800, 600); +// int i = 0; + for (GroupDataModel groupDataModel: serverDataModel.getGroups()) { + GroupView groupView = new GroupView(dimension, groupDataModel); + groupView.setup(roundConfiguration); + groupViewList.add(groupView); + JFrame jframe = new JFrame("Group: " + groupViewList.size()); + jframe.setPreferredSize(dimension); + jframe.add(groupView); + jframe.pack(); + jframe.setVisible(true); + jframes.add(jframe); + } + int secondHasPassedCheck = -1; + // grab out all add client events to initialize the state of the game properly. for (PersistableEvent event: savedRoundData.getActions()) { - + if (event instanceof AddClientEvent) { + serverDataModel.apply(event); + } } + for (PersistableEvent event: savedRoundData.getActions()) { + int elapsedTimeInSeconds = savedRoundData.getElapsedTimeInSeconds(event); + System.err.println("elapsed time in seconds: " + elapsedTimeInSeconds); + serverDataModel.apply(event); + if (elapsedTimeInSeconds > secondHasPassedCheck) { + secondHasPassedCheck = elapsedTimeInSeconds; + // take a snapshot of each group... + for (GroupView groupView: groupViewList) { + Graphics2D graphics = (Graphics2D) groupView.getGraphics(); + BufferedImage bufferedImage = graphics.getDeviceConfiguration().createCompatibleImage(800, 600); +// write a frame to the quicktime movie... +// quickTimeOutputStream.writeFrame(bufferedImage, 40); + // write buffered image out to named sequentially. + ImageIO.write(bufferedImage, videoFormat.name(), new File(elapsedTimeInSeconds + "-group-" + groupViewList.indexOf(groupView) + "." + videoFormat.name())); + } + } + } + for (JFrame jframe : jframes) { + jframe.setVisible(false); + jframe.dispose(); + } } catch (IOException exception) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2009-08-01 03:59:18
|
I check out tonight at 21:30pm (3.5hr) The implementation of CSS seems to be very much browser-dependant, and I have not yet found a standardized way to center the page. I can center it horizontally, but vertical centering does not seem to be advisable. I have found a javascript code to find an IP address, but it does not seem to be passing through to flex side. I feel I am not getting as much done because it takes very long time to compile each file, and then reboot the server each time; I have to re compile every minute or two. On Fri, Jul 31, 2009 at 5:15 PM, Kalin Jonas <kj...@as...> wrote: > Today I work from home from 17:00pm > I will be working to find out if there is a way to center the contents of > an HTML file both vertically and horizontally that is browser-independent. > I will also try to make the content center itself within the application > itself. > I can't really test the program with the server, because it will not let me > fetch block-by-block yet. (the code has not been written) > I will work on finishing DayByDayOutput if it is not finished already, or > trying to figure out how to update information windows. > |
From: Kalin J. <kj...@as...> - 2009-08-01 01:08:01
|
Today I work from home from 17:00pm I will be working to find out if there is a way to center the contents of an HTML file both vertically and horizontally that is browser-independent. I will also try to make the content center itself within the application itself. I can't really test the program with the server, because it will not let me fetch block-by-block yet. (the code has not been written) I will work on finishing DayByDayOutput if it is not finished already, or trying to figure out how to update information windows. |
From: Kalin J. <kj...@as...> - 2009-07-27 20:06:49
|
I am checking out today at 13:15pm I have corrected most of the spacing problems in the InitialiseDatabase.mxml file, after some effort, but I still do not understand how the functions work. My efforts to include CSS in the main file have succeeded, but I later discovered that the method I was using "margins: auto" actually relies on the browser to center the component, so I will need to research another method later. On Mon, Jul 27, 2009 at 10:32 AM, Kalin Jonas <kj...@as...> wrote: > Today I will work from home starting at 10:15 am > I will see if there is any way to format the page using html or css, and > try to implement it if there is. > After that, I will be trying to sift through the InitializeDatabase.mxml > file to see if I can find any information on why the "simple" Categorical > questions will not save into the database. > I will correct ambiguous or incorrect spacing and delete large, commented > sections of code in an attempt to shrink the file to manageable size, though > it appears to be far too long for a single file. > |
From: Kalin J. <kj...@as...> - 2009-07-27 17:32:19
|
Today I will work from home starting at 10:15 am I will see if there is any way to format the page using html or css, and try to implement it if there is. After that, I will be trying to sift through the InitializeDatabase.mxml file to see if I can find any information on why the "simple" Categorical questions will not save into the database. I will correct ambiguous or incorrect spacing and delete large, commented sections of code in an attempt to shrink the file to manageable size, though it appears to be far too long for a single file. |
From: <kj...@us...> - 2009-07-26 20:00:34
|
Revision: 209 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=209&view=rev Author: kjonas Date: 2009-07-26 20:00:24 +0000 (Sun, 26 Jul 2009) Log Message: ----------- Completed each question group up until the point where there is a categorical question, and no further within the page, so as to avoid potential problems with sequenceNumber. Modified Paths: -------------- mentalmodels/trunk/src/main/db/init-mme.sql Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-26 00:26:27 UTC (rev 208) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-26 20:00:24 UTC (rev 209) @@ -55,7 +55,7 @@ `id` bigint(20) NOT NULL AUTO_INCREMENT, `optionKey` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -64,7 +64,7 @@ LOCK TABLES `categorical_option` WRITE; /*!40000 ALTER TABLE `categorical_option` DISABLE KEYS */; -INSERT INTO `categorical_option` VALUES (1,'Focus on own earnings'),(2,'Focus on fish population'),(3,'Focus on what the others might do or think'),(7,'Focus on fish population'),(8,'Focus on what the others might do or think'),(9,'Focus on own earnings'),(10,'Focus on what the others might do or think'),(11,'Focus on fish population'),(12,'Focus on own earnings'),(13,'Focus on what the others might do or think:'),(14,'Focus on fish population'),(15,'Focus on own earnings'); +INSERT INTO `categorical_option` VALUES (1,'Focus on own earnings'),(2,'Focus on fish population'),(3,'Focus on what the others might do or think'),(7,'Focus on fish population'),(8,'Focus on what the others might do or think'),(9,'Focus on own earnings'),(10,'Focus on what the others might do or think'),(11,'Focus on fish population'),(12,'Focus on own earnings'),(13,'Focus on what the others might do or think:'),(14,'Focus on fish population'),(15,'Focus on own earnings'),(16,'The group agreed upon a quite clear rule of how to fish.'),(17,'Some sort of (maybe only vague) agreement of how to coordinate the fishing emerged.'),(18,'Several options of how to coordinate the fishing were discussed but there wasn’t any agreement.'),(19,'No agreement emerged, but I got a vague idea of how to synchronize my fishing with the others.'),(20,'The communication never touched the topic of how to fish or design the strategy.'),(21,'Fishing or the strategy were discussed but not in the form of coordinating ones actions.'),(22,'The group agreed upon a quite clear rule of how to fish.'),(23,'Some sort of (maybe only vague) agreement of how to coordinate the fishing emerged.'),(24,'Several options of how to coordinate the fishing were discussed but there wasn’t any agreement.'),(25,'No agreement emerged, but I got a vague idea of how to synchronize my fishing with the others.'),(26,'The communication never touched the topic of how to fish or design the strategy.'),(27,'Fishing or the strategy were discussed but not in the form of coordinating ones actions.'),(28,'Some sort of (maybe only vague) agreement of how to coordinate the fishing emerged.'),(29,'Several options of how to coordinate the fishing were discussed but there wasn’t any agreement.'),(30,'1'),(31,'The communication never touched the topic of how to fish or design the strategy.'),(32,'The group agreed upon a quite clear rule of how to fish.'),(33,'Fishing or the strategy were discussed but not in the form of coordinating ones actions.'),(34,'2'),(35,'No agreement emerged, but I got a vague idea of how to synchronize my fishing with the others.'),(36,'Some sort of (maybe only vague) agreement of how to coordinate the fishing emerged.'),(37,'Several options of how to coordinate the fishing were discussed but there wasn’t any agreement.'),(38,'1'),(39,'1 to 6 months ago'),(40,'The communication never touched the topic of how to fish or design the strategy.'),(41,'1 to 4 weeks ago'),(42,'more than 6 months ago'),(43,'The group agreed upon a quite clear rule of how to fish.'),(44,'Fishing or the strategy were discussed but not in the form of coordinating ones actions.'),(45,'2'),(46,'No agreement emerged, but I got a vague idea of how to synchronize my fishing with the others.'),(47,'less then 1 week ago'); /*!40000 ALTER TABLE `categorical_option` ENABLE KEYS */; UNLOCK TABLES; @@ -116,7 +116,7 @@ LOCK TABLES `categorical_options_pivot` WRITE; /*!40000 ALTER TABLE `categorical_options_pivot` DISABLE KEYS */; -INSERT INTO `categorical_options_pivot` VALUES (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(10,7),(10,8),(10,9),(11,10),(11,11),(11,12),(13,13),(13,14),(13,15); +INSERT INTO `categorical_options_pivot` VALUES (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(10,7),(10,8),(10,9),(11,10),(11,11),(11,12),(13,13),(13,14),(13,15),(51,16),(51,17),(51,18),(51,19),(51,20),(51,21),(52,22),(52,23),(52,24),(52,25),(52,26),(52,27),(53,28),(53,29),(53,30),(53,31),(53,32),(53,33),(53,34),(53,35),(73,36),(73,37),(73,38),(73,39),(73,40),(73,41),(73,42),(73,43),(73,44),(73,45),(73,46),(73,47); /*!40000 ALTER TABLE `categorical_options_pivot` ENABLE KEYS */; UNLOCK TABLES; @@ -141,7 +141,7 @@ LOCK TABLES `categorical_question` WRITE; /*!40000 ALTER TABLE `categorical_question` DISABLE KEYS */; -INSERT INTO `categorical_question` VALUES (1),(2),(3),(10),(11),(13); +INSERT INTO `categorical_question` VALUES (1),(2),(3),(10),(11),(13),(51),(52),(53),(73); /*!40000 ALTER TABLE `categorical_question` ENABLE KEYS */; UNLOCK TABLES; @@ -477,7 +477,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),(10,'unipolar',40); +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),(10,'unipolar',41),(10,'unipolar',42),(10,'unipolar',43),(10,'unipolar',44),(10,'bipolar',45),(10,'unipolar',46),(10,'unipolar',47),(10,'unipolar',48),(10,'unipolar',49),(10,'bipolar',50),(10,'unipolar',54),(10,'unipolar',55),(10,'bipolar',56),(10,'bipolar',57),(10,'bipolar',58),(10,'unipolar',59),(10,'unipolar',60),(10,'unipolar',61),(10,'unipolar',62),(10,'bipolar',63),(10,'bipolar',67),(10,'unipolar',68),(10,'unipolar',69),(10,'unipolar',70),(10,'unipolar',71); /*!40000 ALTER TABLE `psychometric_question` ENABLE KEYS */; UNLOCK TABLES; @@ -502,7 +502,7 @@ 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'),(40,'I am very surprised'),(40,'I am not surprised 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'),(41,'very much'),(41,'not at all'),(42,'very much'),(42,'not at all'),(43,'very much'),(43,'not at all'),(44,'very much'),(45,'much more positively'),(45,'same as before'),(45,'much more negatively'),(46,'very much'),(46,'not at all'),(47,'very much'),(47,'not at all'),(48,'very much'),(48,'not at all'),(49,'very much'),(49,'not at all'),(50,'much more positively'),(50,'same as before'),(50,'much more negatively'),(54,'…developed by all group members'),(54,'…made up by a single player'),(55,'…very fair'),(55,'…not fair at all'),(56,'…leading to much higher earnings for the group'),(56,' '),(56,'…leading to much lower earnings for the group'),(57,'…protecting the fish population'),(57,' '),(57,'…destroying the fish population'),(58,'…overall a very good solution'),(58,' '),(58,'…overall a very bad solution'),(59,'totally clear'),(59,'not clear at all'),(60,'…totally understood'),(60,'…did not understand at all'),(61,'I will totally follow the rule'),(61,'I will not at all follow the rule'),(62,'totally follow the rule'),(62,'not at all follow the rule'),(63,'the group will do much better'),(63,' '),(63,'the group will do much worse'),(67,'very interesting'),(67,'neutral'),(67,'very boring'),(68,'very much effort'),(68,'no effort at all'),(69,'very difficult'),(69,'not at all difficult'),(70,'very difficult'),(70,'not at all difficult'),(71,'very clear'),(71,'not clear at all'); /*!40000 ALTER TABLE `psychometric_question_choices` ENABLE KEYS */; UNLOCK TABLES; @@ -523,7 +523,7 @@ 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; +) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -532,7 +532,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),(40,0,'',1,'psychometric',27); +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),(41,0,'… better understand the dynamics of the fish population.',1,'psychometric',29),(42,0,'… better understand the other fishermen in my group.',2,'psychometric',29),(43,0,'… better understand how to design the strategy.',3,'psychometric',29),(44,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',29),(45,0,'… appraise the other fishermen in my group differently. Now I think about the others…',5,'psychometric',29),(46,0,'… better understand the dynamics of the fish population.',1,'psychometric',30),(47,0,'… better understand the other fishermen.',2,'psychometric',30),(48,0,'… better understand how to design the strategy.',3,'psychometric',30),(49,0,'… feel a ‘team spirit’ in the group.',4,'psychometric',30),(50,0,'… appraise the other fishermen in my group differently. Now I think about the others …',5,'psychometric',30),(51,0,'Did the communication have any form of reference to how to fish or design the strategy?',1,'categorical',31),(52,0,'Did the communication have any form of reference to how to fish or design the strategy?',1,'categorical',31),(53,0,'test',1,'categorical',31),(54,0,'',1,'psychometric',32),(55,0,'',2,'psychometric',32),(56,0,'',3,'psychometric',32),(57,0,'',4,'psychometric',32),(58,0,'',5,'psychometric',32),(59,0,'How clear is it to you, that you have to fish conforming to this rule, agreement or coordination attempt?',1,'psychometric',33),(60,0,'Do you think the other fishermen understood how they have to act according to this rule?<br>I think the others… ',2,'psychometric',33),(61,0,'Will you follow the rule, agreement, or coordination attempt that emerged from communication?<br>I will follow the rule…',3,'psychometric',33),(62,0,'Do you think, the other fishermen in you group will follow the rule, agreement, or coordination attempt?<br>\rI think, the others will… ',4,'psychometric',33),(63,0,'Considering the effects you expect for following the rule and your expectations of how the group will follow the rule, do you think the group will do better or worse due to the rule?',5,'psychometric',33),(64,0,'New understanding of fish dynamics',1,'text',34),(65,0,'New Expectations on how the others of the group will act',2,'text',34),(66,0,'Ideas for improving your strategy',3,'text',34),(67,0,'How interesting was the experiment for you?',1,'psychometric',35),(68,0,'How would you rate the effort you invested to design your strategy?',2,'psychometric',35),(69,0,'How difficult was it to understand the problem?',3,'psychometric',35),(70,0,'How difficult was it to find a good strategy?',4,'psychometric',35),(71,0,'How clear was it what you had to do?',5,'psychometric',35),(72,0,'How many times have you participated in problem solving experiments similar to this one?',1,'text',36),(73,0,'If you already participated in such experiments, when was the last time?',2,'categorical',36),(74,0,'Comments and Feedback',1,'text',37); /*!40000 ALTER TABLE `question` ENABLE KEYS */; UNLOCK TABLES; @@ -553,7 +553,7 @@ PRIMARY KEY (`id`), KEY `FK8F8090E61F51CEC1` (`block_id`), CONSTRAINT `FK8F8090E61F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -562,7 +562,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),(26,'',60,'<b>Your strategy resulted in the following actions</b>',1,6),(27,'<p>First we want to know your emotional reactions to the results:</p>',30,'<b>What are your emotional reactions to the outcome?</b>',2,6),(28,'You can now chat for 5 minutes with the other fishermen in your group. You can talk about whatever you want as long as you…\r<ul><li>…do not reveal your identity.</li>\r<li>…do not threaten others with any consequence after the experiment is finished.</li>\r<li>…do not promise others side-payments after the experiment is completed.</li></ul>\rThe interface works like a text messenger. In the text box at the bottom you write your text and by clicking on “Send” you send this text to all other group members. In the large box in the center of the window you see all messages that have been sent during the communication.<br>\rAfter five minutes the “Send” button will be deactivated and the “Next” button activated. Please click then on “Next” to answer some questions about the communication. You can return to this page to see the communication protocol again.\r',360,'<b>Chat with the other fishermen in your group</b>',1,7),(29,'Due to the conversation, I now…',30,'<b>Did the communication have any effect on you?</b>',1,15),(30,'Due to the conversation, the other fishermen in my group…',30,'<b>What do you think were the effects of the communication on the others?</b>',2,15),(31,'',60,'<b>Did the communication lead to some sort of coordination of the fishing?</b>',3,15),(32,'The rule, agreement, or coordination attempt is… ',30,'<b>What is your opinion about the rule(s) that emerged from communication?</b>',4,15),(33,'',30,'<b>What will be the effects of the rule?</b>',5,15),(34,'In the fields below note what you have learned from the communication to improve your strategy.<br>\rThink about your understanding of the dynamics of the fish population, your expectations about the behavior of the other fishermen in your group and possibilities to improve your strategy. For each of these aspects a separate field is offered. This information will be available in the next round of designing your strategy.<br>\rIf you have no entry for one of the fields below, write “none” in the respective field.<br>\rThe information you write into these fields will be available the next time you edit your strategy.',300,'<b>Lessons learned<b>',6,15); +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),(26,'',60,'<b>Your strategy resulted in the following actions</b>',1,6),(27,'<p>First we want to know your emotional reactions to the results:</p>',30,'<b>What are your emotional reactions to the outcome?</b>',2,6),(28,'You can now chat for 5 minutes with the other fishermen in your group. You can talk about whatever you want as long as you…\r<ul><li>…do not reveal your identity.</li>\r<li>…do not threaten others with any consequence after the experiment is finished.</li>\r<li>…do not promise others side-payments after the experiment is completed.</li></ul>\rThe interface works like a text messenger. In the text box at the bottom you write your text and by clicking on “Send” you send this text to all other group members. In the large box in the center of the window you see all messages that have been sent during the communication.<br>\rAfter five minutes the “Send” button will be deactivated and the “Next” button activated. Please click then on “Next” to answer some questions about the communication. You can return to this page to see the communication protocol again.\r',360,'<b>Chat with the other fishermen in your group</b>',1,7),(29,'Due to the conversation, I now…',30,'<b>Did the communication have any effect on you?</b>',1,15),(30,'Due to the conversation, the other fishermen in my group…',30,'<b>What do you think were the effects of the communication on the others?</b>',2,15),(31,'',60,'<b>Did the communication lead to some sort of coordination of the fishing?</b>',3,15),(32,'The rule, agreement, or coordination attempt is… ',30,'<b>What is your opinion about the rule(s) that emerged from co... [truncated message content] |
From: Kalin J. <kj...@as...> - 2009-07-26 19:59:50
|
I check out today at 13:00pm (3hr) I cannot find the source of this error, as the code for the Initialize Database application is extensive, and Seema has been the only one working on it. I have completed each question group up until the point where there is a categorical question, and no further within the page, so as to avoid problems with sequenceNumber. When Seema returns, this should be addressed immediately. In either case, most of Modules 3 and 4 have been entered into the database, with the above exception. On Sun, Jul 26, 2009 at 12:21 PM, Kalin Jonas <kj...@as...> wrote: > I have found it quite impossible to insert siple categorical questions into > the database. The form Seema designed will allow me to type and select all > options, but when I choose type as Simple, it will not respond when I click > SaveQuestion > > > On Sun, Jul 26, 2009 at 10:11 AM, Kalin Jonas <kj...@as...> wrote: > >> Today I work from home at 10:00am >> I will continue to enter the third module into the database, and begin >> working on the fourth. >> Then I will begin copying the first game round into the second, and making >> the necessary changes. >> > > |
From: Kalin J. <kj...@as...> - 2009-07-26 19:21:26
|
I have found it quite impossible to insert siple categorical questions into the database. The form Seema designed will allow me to type and select all options, but when I choose type as Simple, it will not respond when I click SaveQuestion On Sun, Jul 26, 2009 at 10:11 AM, Kalin Jonas <kj...@as...> wrote: > Today I work from home at 10:00am > I will continue to enter the third module into the database, and begin > working on the fourth. > Then I will begin copying the first game round into the second, and making > the necessary changes. > |
From: Kalin J. <kj...@as...> - 2009-07-26 17:12:08
|
Today I work from home at 10:00am I will continue to enter the third module into the database, and begin working on the fourth. Then I will begin copying the first game round into the second, and making the necessary changes. |
From: Kalin J. <kj...@as...> - 2009-07-26 00:36:13
|
I return from lunch break at 16:15pm, and work until 17:15pm (3.25 hr total today) I have been working today on formatting the content for Module 3 into html. I remarked earlier that the server would not run due to naming errors. I have spent the last 30 minutes browsing through all files mentioned in the error messages, and any related files, renaming all instances of DayByDayDecisions and related classes with similar names, so that they all appear in proper InterCaps form. I re-compiled and ran the server, and everything is again operating. I finished entering just the questiongroups for module 3 into the database, and committed. Tomorrow I will finish entering the Communication Round into the database, as far as I can, and work on entering Module 4 as well. On Sat, Jul 25, 2009 at 3:19 PM, Kalin Jonas <kj...@as...> wrote: > I am signing out for a lunch break at 15:15pm > > > On Sat, Jul 25, 2009 at 2:33 PM, Kalin Jonas <kj...@as...> wrote: > >> I am going to try to rename all forms of DayByDayDecisons into proper >> intercaps; hopefully I will not further damage the program. >> If this goes successfully, the server should be able to run again; if not, >> then I will have to use an older revision, if that will work. >> >> >> On Sat, Jul 25, 2009 at 2:18 PM, Kalin Jonas <kj...@as...> wrote: >> >>> It has come to my attention that the spelling of DayByDayDecisions and >>> related classes/components/services has been very inconsistent. >>> As a direct result of this, the server will no longer run. >>> I am not aware of the location of the file where the error originated, >>> but I have discovered at least 4 different spellings of the term. >>> As I cannot repair the appropriate file(s), I will not be able to test >>> the server, or edit the database, until Seema returns to aid me in fixing >>> this. >>> >>> >>> On Sat, Jul 25, 2009 at 12:56 PM, Kalin Jonas <kj...@as...> wrote: >>> >>>> Today I work from home starting at 13:00pm >>>> I will be working on formatting the text for the database for Module 3, >>>> and when finished, work on module 2B, so that all three remaining modules >>>> can be put into the database. >>>> With any remaining free time today, I will carefully experiment with >>>> these, and start trying to put them into the database. >>>> >>> >>> >> > |
From: <kj...@us...> - 2009-07-26 00:26:36
|
Revision: 208 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=208&view=rev Author: kjonas Date: 2009-07-26 00:26:27 +0000 (Sun, 26 Jul 2009) Log Message: ----------- renamed all variables, entities, services with names including DayByDayDecisions to be spelled with consistent names throughout project. added blocks and question groups (not questions) for Module 3. Flex code should be trying to fetch block-by-block, though java does not return it yet. Modified Paths: -------------- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as mentalmodels/trunk/src/main/db/init-mme.sql mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml mentalmodels/trunk/src/main/webapp/WEB-INF/hibernate.cfg.xml Added Paths: ----------- mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as mentalmodels/trunk/flex/src/actionscript/DayByDayDecisions.as mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDayByDayDecisionsDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayByDayDecisions.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionsService.java Removed Paths: ------------- mentalmodels/trunk/flex/src/actionscript/questions/DayByDayDecisions.as mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java Added: mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/CustomNumericStepper.as 2009-07-26 00:26:27 UTC (rev 208) @@ -0,0 +1,20 @@ +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/DayByDayDecisions.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/DayByDayDecisions.as (rev 0) +++ mentalmodels/trunk/flex/src/actionscript/DayByDayDecisions.as 2009-07-26 00:26:27 UTC (rev 208) @@ -0,0 +1,17 @@ +package actionscript.questions +{ + import mx.collections.ArrayCollection; + + [Bindable] + [RemoteClass(alias="edu.asu.commons.mme.entity.DayByDayDecisions")] + public class DayByDayDecisions + { + public var id:Number; + public var dayNumber:int; + public var location:Location; + public var earnings:Number; + public var money:Number; + public var student:Student; + public var otherStudents:ArrayCollection; + } +} \ No newline at end of file Modified: mentalmodels/trunk/flex/src/actionscript/PageDisplay.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/flex/src/actionscript/PageDisplay.as 2009-07-26 00:26:27 UTC (rev 208) @@ -272,76 +272,5 @@ // Alert.show(messages); } } - - public function getQuestionResults():ArrayCollection - { - var curr:VBox = currentPage as VBox; - var questionResults:ArrayCollection = new ArrayCollection(); - var messages:String = ""; - - if(curr != null) - { - var tempQuestion:DisplayObject; - for(var i:int=0; i < curr.numChildren; i++) - { - tempQuestion = (curr.getChildAt(i) as DisplayObject); - var tempArray:ArrayCollection; - - if(tempQuestion == null) - { - messages += "(-)"; - } - else if(tempQuestion is ForecastingPeopleQuestionC) - { - messages += "(FP)"; - (tempQuestion as ForecastingPeopleQuestionC); - } - else if(tempQuestion is ForecastingFishQuestionC) - { - messages += "(FF)"; - (tempQuestion as ForecastingFishQuestionC); - } - else if(tempQuestion is CategoricalQuestionC) - { - messages += "(C)"; - tempArray = new ArrayCollection(); - tempArray.addItem((tempQuestion as CategoricalQuestionC).comboTopic.selectedItem); - var tempStr:String = (tempQuestion as CategoricalQuestionC).comboSpecific.selectedItem as String; - if(tempStr != null) - { - tempArray.addItem(tempStr); - } - } - else if(tempQuestion is PsychometricQuestionC) - { - messages += "(P)"; - (tempQuestion as PsychometricQuestionC).slider1.getValue(); - } - else if(tempQuestion is StrategyDesignQuestionC) - { - messages += "(S)"; - (tempQuestion as StrategyDesignQuestionC); - } - else if(tempQuestion is DayByDayDecisions) - { - messages += "(D)"; - (tempQuestion as DayByDayDecisionsQuestionC); - } - else if(tempQuestion is TextQuestionC) - { - messages += "(T)"; - (tempQuestion as TextQuestionC).textAnswer.text; - } - else - { - messages += "(-)"; - } - } -// Alert.show(messages); - } - - return questionResults; - } - } } \ No newline at end of file Deleted: mentalmodels/trunk/flex/src/actionscript/questions/DayByDayDecisions.as =================================================================== --- mentalmodels/trunk/flex/src/actionscript/questions/DayByDayDecisions.as 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/flex/src/actionscript/questions/DayByDayDecisions.as 2009-07-26 00:26:27 UTC (rev 208) @@ -1,11 +0,0 @@ -package actionscript.questions -{ - import mx.collections.ArrayCollection; - - [Bindable] - [RemoteClass(alias="edu.asu.commons.mme.entity.DayByDayDecisionsQuestion")] - public class DayByDayDecisions extends Question - { - - } -} \ No newline at end of file Modified: mentalmodels/trunk/src/main/db/init-mme.sql =================================================================== --- mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/db/init-mme.sql 2009-07-26 00:26:27 UTC (rev 208) @@ -31,7 +31,7 @@ PRIMARY KEY (`id`), KEY `FK597C48D4D4A8AF3` (`module_id`), CONSTRAINT `FK597C48D4D4A8AF3` FOREIGN KEY (`module_id`) REFERENCES `module` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -40,7 +40,7 @@ LOCK TABLES `block` WRITE; /*!40000 ALTER TABLE `block` DISABLE KEYS */; -INSERT INTO `block` VALUES (1,'Introduction',1080,1,1),(2,'Design Strategy',1080,1,2),(3,'Characterizing own strategy',1020,2,2),(4,'Editing strategy',300,3,2),(5,'Day-by-day decisions game',360,4,2),(6,'Evaluation of Outcomes',660,5,2),(7,'Communication',840,1,3),(8,'Design Strategy',300,1,4),(9,'Characterizing own strategy',540,2,4),(10,'Editing strategy',180,3,4),(11,'Day-by-day decisions game',360,4,4),(12,'Evaluation of Outcomes',360,5,4),(13,'Final data gathering',120,1,5),(14,'Debriefing',120,2,5); +INSERT INTO `block` VALUES (1,'Introduction',1080,1,1),(2,'Design Strategy',1080,1,2),(3,'Characterizing own strategy',1020,2,2),(4,'Editing strategy',300,3,2),(5,'Day-by-day decisions game',360,4,2),(6,'Evaluation of Outcomes',660,5,2),(7,'Communication',360,1,3),(8,'Design Strategy',300,1,4),(9,'Characterizing own strategy',540,2,4),(10,'Editing strategy',180,3,4),(11,'Day-by-day decisions game',360,4,4),(12,'Evaluation of Outcomes',360,5,4),(13,'Final data gathering',120,1,5),(14,'Debriefing',120,2,5),(15,'Communication - Questions',480,2,3); /*!40000 ALTER TABLE `block` ENABLE KEYS */; UNLOCK TABLES; @@ -207,6 +207,33 @@ UNLOCK TABLES; -- +-- Table structure for table `day_by_day_decision_student` +-- + +DROP TABLE IF EXISTS `day_by_day_decision_student`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `day_by_day_decision_student` ( + `day_by_day_decision_id` bigint(20) NOT NULL, + `otherStudents_id` bigint(20) NOT NULL, + UNIQUE KEY `otherStudents_id` (`otherStudents_id`), + KEY `FK19B3660EED8740B` (`day_by_day_decision_id`), + KEY `FK19B366031A9F4B4` (`otherStudents_id`), + CONSTRAINT `FK19B366031A9F4B4` FOREIGN KEY (`otherStudents_id`) REFERENCES `student` (`id`), + CONSTRAINT `FK19B3660EED8740B` FOREIGN KEY (`day_by_day_decision_id`) REFERENCES `day_by_day_decision` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `day_by_day_decision_student` +-- + +LOCK TABLES `day_by_day_decision_student` WRITE; +/*!40000 ALTER TABLE `day_by_day_decision_student` DISABLE KEYS */; +/*!40000 ALTER TABLE `day_by_day_decision_student` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `forecasting_question` -- @@ -526,7 +553,7 @@ PRIMARY KEY (`id`), KEY `FK8F8090E61F51CEC1` (`block_id`), CONSTRAINT `FK8F8090E61F51CEC1` FOREIGN KEY (`block_id`) REFERENCES `block` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1; +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -535,7 +562,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),(26,'',60,'<b>Your strategy resulted in the following actions</b>',1,6),(27,'<p>First we want to know your emotional reactions to the results:</p>',30,'<b>What are your emotional reactions to the outcome?</b>',2,6); +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),(26,'',60,'<b>Your strategy resulted in the following actions</b>',1,6),(27,'<p>First we want to know your emotional reactions to the results:</p>',30,'<b>What are your emotional reactions to the outcome?</b>',2,6),(28,'You can now chat for 5 minutes with the other fishermen in your group. You can talk about whatever you want as long as you…\r<ul><li>…do not reveal your identity.</li>\r<li>…do not threaten others with any consequence after the experiment is finished.</li>\r<li>…do not promise others side-payments after the experiment is completed.</li></ul>\rThe interface works like a text messenger. In the text box at the bottom you write your text and by clicking on “Send” you send this text to all other group members. In the large box in the center of the window you see all messages that have been sent during the communication.<br>\rAfter five minutes the “Send” button will be deactivated and the “Next” button activated. Please click then on “Next” to answer some questions about the communication. You can return to this page to see the communication protocol again.\r',360,'<b>Chat with the other fishermen in your group</b>',1,7),(29,'Due to the conversation, I now…',30,'<b>Did the communication have any effect on you?</b>',1,15),(30,'Due to the conversation, the other fishermen in my group…',30,'<b>What do you think were the effects of the communication on the others?</b>',2,15),(31,'',60,'<b>Did the communication lead to some sort of coordination of the fishing?</b>',3,15),(32,'The rule, agreement, or coordination attempt is… ',30,'<b>What is your opinion about the rule(s) that emerged from communication?</b>',4,15),(33,'',30,'<b>What will be the effects of the rule?</b>',5,15),(34,'In the fields below note what you have learned from the communication to improve your strategy.<br>\rThink about your understanding of the dynamics of the fish population, your expectations about the behavior of the other fishermen in your group and possibilities to improve your strategy. For each of these aspects a separate field is offered. This information will be available in the next round of designing your strategy.<br>\rIf you have no entry for one of the fields below, write “none” in the respective field.<br>\rThe information you write into these fields will be available the next time you edit your strategy.',300,'<b>Lessons learned<b>',6,15); /*!40000 ALTER TABLE `question_group` ENABLE KEYS */; UNLOCK TABLES; @@ -792,4 +819,4 @@ /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2009-07-23 12:48:05 +-- Dump completed on 2009-07-25 17:05:22 Added: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDayByDayDecisionsDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDayByDayDecisionsDao.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDayByDayDecisionsDao.java 2009-07-26 00:26:27 UTC (rev 208) @@ -0,0 +1,13 @@ +package edu.asu.commons.mme.dao; + +import edu.asu.commons.mme.entity.DayByDayDecisions; + +public class HibernateDayByDayDecisionsDao extends HibernateDao<DayByDayDecisions>{ + + public HibernateDayByDayDecisionsDao() { + super(DayByDayDecisions.class); + // TODO Auto-generated constructor stub + } + + +} Deleted: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/dao/HibernateDaybyDayDecisionDao.java 2009-07-26 00:26:27 UTC (rev 208) @@ -1,13 +0,0 @@ -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/entity/DayByDayDecisions.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayByDayDecisions.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DayByDayDecisions.java 2009-07-26 00:26:27 UTC (rev 208) @@ -0,0 +1,106 @@ +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 DayByDayDecisions implements Serializable { + + private static final long serialVersionUID = 7159061961616165928L; + + @Id + @GeneratedValue + private Long id; + + @Column(nullable=false) + private Integer dayNumber; + + @ManyToOne + @JoinColumn(nullable=false) + private Location location; + + //earning will be in pound + @Column(nullable=false) + private Double earnings; + + + @Column(nullable=false) + private Double money; + + @ManyToOne + @JoinColumn(nullable=false) + private Student student; + + @CollectionOfElements(fetch = FetchType.EAGER) + private List<Student> otherStudents; + + 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; + } + + public void setDayNumber(Integer dayNumber) { + this.dayNumber = dayNumber; + } + + public Integer getDayNumber() { + return dayNumber; + } + + public void setOtherStudents(List<Student> otherStudents) { + this.otherStudents = otherStudents; + } + + public List<Student> getOtherStudents() { + return otherStudents; + } + +} Deleted: 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-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/entity/DaybyDayDecision.java 2009-07-26 00:26:27 UTC (rev 208) @@ -1,106 +0,0 @@ -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 { - - private static final long serialVersionUID = 7159061961616165928L; - - @Id - @GeneratedValue - private Long id; - - @Column(nullable=false) - private Integer dayNumber; - - @ManyToOne - @JoinColumn(nullable=false) - private Location location; - - //earning will be in pound - @Column(nullable=false) - private Double earnings; - - - @Column(nullable=false) - private Double money; - - @ManyToOne - @JoinColumn(nullable=false) - private Student student; - - @CollectionOfElements(fetch = FetchType.EAGER) - private List<Student> otherStudents; - - 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; - } - - public void setDayNumber(Integer dayNumber) { - this.dayNumber = dayNumber; - } - - 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-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2009-07-26 00:26:27 UTC (rev 208) @@ -2,11 +2,11 @@ import java.util.List; -import edu.asu.commons.mme.dao.HibernateDaybyDayDecisionDao; +import edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao; 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.DayByDayDecisions; import edu.asu.commons.mme.entity.Location; import edu.asu.commons.mme.entity.Student; import edu.asu.commons.mme.entity.StudentResponse; @@ -15,8 +15,8 @@ private HibernateStudentResponseDao studentResponseDao; private HibernateStudentDao studentDao; - //private HibernateDaybyDayDecisionDao dayBydayDecisionDao; - private DayByDayDecisionService daybydayDecisionService; + //private HibernateDayByDayDecisionsDao dayByDayDecisionsDao; + private DayByDayDecisionsService dayByDayDecisionsService; private ModuleService moduleService; @@ -40,25 +40,25 @@ return moduleService.getNextBlock(); } - public void daybydayOutput(DaybyDayDecision studentDecision) + public void daybydayOutput(DayByDayDecisions studentDecision) { - daybydayDecisionService.saveStudentDecision(studentDecision); + dayByDayDecisionsService.saveStudentDecision(studentDecision); } public void setStudentDao(HibernateStudentDao studentDao) { this.studentDao = studentDao; } - /*public void setDayBydayDecisionDao(HibernateDaybyDayDecisionDao dayBydayDecisionDao) { - this.dayBydayDecisionDao = dayBydayDecisionDao; + /*public void setDayByDayDecisionsDao(HibernateDayByDayDecisionsDao dayByDayDecisionsDao) { + this.dayByDayDecisionsDao = dayByDayDecisionsDao; }*/ - public void setDaybydayDecisionService(DayByDayDecisionService daybydayDecisionService) { - this.daybydayDecisionService = daybydayDecisionService; + public void setDayByDayDecisionsService(DayByDayDecisionsService dayByDayDecisionsService) { + this.dayByDayDecisionsService = dayByDayDecisionsService; } - public DayByDayDecisionService getDaybydayDecisionService() { - return daybydayDecisionService; + public DayByDayDecisionsService getDayByDayDecisionsService() { + return dayByDayDecisionsService; } } Deleted: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionService.java 2009-07-26 00:26:27 UTC (rev 208) @@ -1,46 +0,0 @@ -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/DayByDayDecisionsService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionsService.java (rev 0) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/DayByDayDecisionsService.java 2009-07-26 00:26:27 UTC (rev 208) @@ -0,0 +1,46 @@ +package edu.asu.commons.mme.service; + +import java.util.ArrayList; +import java.util.List; + +import edu.asu.commons.mme.dao.HibernateDayByDayDecisionsDao; +import edu.asu.commons.mme.entity.DayByDayDecisions; +import edu.asu.commons.mme.entity.Question; +import edu.asu.commons.mme.entity.Student; + +public class DayByDayDecisionsService extends Service.Base<DayByDayDecisions, HibernateDayByDayDecisionsDao> { + + private List<DayByDayDecisions> studentdecisions = new ArrayList<DayByDayDecisions>(); + + public void setStudentdecisions(List<DayByDayDecisions> studentdecisions) { + this.studentdecisions = studentdecisions; + } + + public List<DayByDayDecisions> getStudentdecisions() { + return studentdecisions; + } + + public void saveStudentDecision(DayByDayDecisions studentDecision) + { + if (studentdecisions == null) { + studentdecisions = new ArrayList<DayByDayDecisions>(); + studentdecisions.add(studentDecision); + + } + else + { + if(!this.studentdecisions.contains(studentDecision)) + { + studentdecisions.add(studentDecision); + + } + else + { + System.out.println("Student Decision already exists!!"); + } + } + + + } + +} Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/EarningService.java 2009-07-26 00:26:27 UTC (rev 208) @@ -2,7 +2,7 @@ import java.util.List; -import edu.asu.commons.mme.entity.DaybyDayDecision; +import edu.asu.commons.mme.entity.DayByDayDecisions; import flex.messaging.MessageBroker; import flex.messaging.messages.AsyncMessage; import flex.messaging.util.UUIDUtils; @@ -10,7 +10,7 @@ public class EarningService extends Thread { - public EarningService(List<DaybyDayDecision> studentDecisions) + public EarningService(List<DayByDayDecisions> studentDecisions) { } Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml =================================================================== --- mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-24 23:11:25 UTC (rev 207) +++ mentalmodels/trunk/src/main/webapp/WEB-INF/applicationContext.xml 2009-07-26 00:26:27 UTC (rev 208) @@ -1,171 +1,171 @@ -<?xml version="1.0"?> -<!-- - vim:sts=2:sw=2: ---> -<!-- - $Id: applicationContext.xml 617 2008-03-28 17:27:23Z alllee $ ---> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:flex="http://www.springframework.org/schema/flex" - xmlns:security="http://www.springframework.org/schema/security" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:aop="http://www.springframework.org/schema/aop" - xmlns:tx="http://www.springframework.org/schema/tx" - xsi:schemaLocation=" - - http://www.springframework.org/schema/tx - http://www.springframework.org/schema/tx/spring-tx-2.0.xsd - http://www.springframework.org/schema/aop - http://www.springframe... [truncated message content] |
From: Kalin J. <kj...@as...> - 2009-07-25 22:20:01
|
I am signing out for a lunch break at 15:15pm On Sat, Jul 25, 2009 at 2:33 PM, Kalin Jonas <kj...@as...> wrote: > I am going to try to rename all forms of DayByDayDecisons into proper > intercaps; hopefully I will not further damage the program. > If this goes successfully, the server should be able to run again; if not, > then I will have to use an older revision, if that will work. > > > On Sat, Jul 25, 2009 at 2:18 PM, Kalin Jonas <kj...@as...> wrote: > >> It has come to my attention that the spelling of DayByDayDecisions and >> related classes/components/services has been very inconsistent. >> As a direct result of this, the server will no longer run. >> I am not aware of the location of the file where the error originated, but >> I have discovered at least 4 different spellings of the term. >> As I cannot repair the appropriate file(s), I will not be able to test the >> server, or edit the database, until Seema returns to aid me in fixing this. >> >> >> On Sat, Jul 25, 2009 at 12:56 PM, Kalin Jonas <kj...@as...> wrote: >> >>> Today I work from home starting at 13:00pm >>> I will be working on formatting the text for the database for Module 3, >>> and when finished, work on module 2B, so that all three remaining modules >>> can be put into the database. >>> With any remaining free time today, I will carefully experiment with >>> these, and start trying to put them into the database. >>> >> >> > |
From: Kalin J. <kj...@as...> - 2009-07-25 21:41:22
|
I am going to try to rename all forms of DayByDayDecisons into proper intercaps; hopefully I will not further damage the program. If this goes successfully, the server should be able to run again; if not, then I will have to use an older revision, if that will work. On Sat, Jul 25, 2009 at 2:18 PM, Kalin Jonas <kj...@as...> wrote: > It has come to my attention that the spelling of DayByDayDecisions and > related classes/components/services has been very inconsistent. > As a direct result of this, the server will no longer run. > I am not aware of the location of the file where the error originated, but > I have discovered at least 4 different spellings of the term. > As I cannot repair the appropriate file(s), I will not be able to test the > server, or edit the database, until Seema returns to aid me in fixing this. > > > On Sat, Jul 25, 2009 at 12:56 PM, Kalin Jonas <kj...@as...> wrote: > >> Today I work from home starting at 13:00pm >> I will be working on formatting the text for the database for Module 3, >> and when finished, work on module 2B, so that all three remaining modules >> can be put into the database. >> With any remaining free time today, I will carefully experiment with >> these, and start trying to put them into the database. >> > > |
From: Kalin J. <kj...@as...> - 2009-07-25 21:18:56
|
It has come to my attention that the spelling of DayByDayDecisions and related classes/components/services has been very inconsistent. As a direct result of this, the server will no longer run. I am not aware of the location of the file where the error originated, but I have discovered at least 4 different spellings of the term. As I cannot repair the appropriate file(s), I will not be able to test the server, or edit the database, until Seema returns to aid me in fixing this. On Sat, Jul 25, 2009 at 12:56 PM, Kalin Jonas <kj...@as...> wrote: > Today I work from home starting at 13:00pm > I will be working on formatting the text for the database for Module 3, and > when finished, work on module 2B, so that all three remaining modules can be > put into the database. > With any remaining free time today, I will carefully experiment with these, > and start trying to put them into the database. > |
From: Kalin J. <kj...@as...> - 2009-07-25 19:56:21
|
Today I work from home starting at 13:00pm I will be working on formatting the text for the database for Module 3, and when finished, work on module 2B, so that all three remaining modules can be put into the database. With any remaining free time today, I will carefully experiment with these, and start trying to put them into the database. |