virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 22)
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: Bitbucket <com...@bi...> - 2012-01-31 05:17:56
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/570cb75dcb0c/ changeset: 570cb75dcb0c branch: stable user: alllee date: 2012-01-31 06:17:46 summary: merging vote treatment configuration fixes from default -> stable affected #: 4 files diff -r 1dfe234f466011215ddca77824e49f728aa939f4 -r 570cb75dcb0c7feeabcb03b238ddc0155250f92e src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java @@ -19,7 +19,7 @@ import edu.asu.commons.util.Utils; /** - * $Id: SummaryProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * * @author <a href='mailto:all...@as...'>Allen Lee</a> @@ -41,7 +41,7 @@ } }); for (ClientData data : clientDataList) { - clientTokens.add(String.format("%s, %s, %s", data.getId(), data.getAssignedNumber(), data.getTotalTokens())); + clientTokens.add(String.format("%s, %s", data, data.getTotalTokens())); totalConsumedGroupTokens += data.getTotalTokens(); } writer.println( @@ -84,4 +84,4 @@ public String getOutputFileExtension() { return "-summary.txt"; } -} \ No newline at end of file +} diff -r 1dfe234f466011215ddca77824e49f728aa939f4 -r 570cb75dcb0c7feeabcb03b238ddc0155250f92e src/main/java/edu/asu/commons/foraging/model/ClientData.java --- a/src/main/java/edu/asu/commons/foraging/model/ClientData.java +++ b/src/main/java/edu/asu/commons/foraging/model/ClientData.java @@ -600,7 +600,13 @@ } public String toString() { - return String.format("[%s #%d]", id, assignedNumber); + String surveyId = id.getSurveyId(); + if (surveyId == null || surveyId.trim().isEmpty()) { + return String.format("%s, #%d", id, assignedNumber); + } + else { + return String.format("%s, Survey id: %s, #%d", id, surveyId, assignedNumber); + } } public void addTrustGameEarnings(double trustGameEarnings) { diff -r 1dfe234f466011215ddca77824e49f728aa939f4 -r 570cb75dcb0c7feeabcb03b238ddc0155250f92e src/main/resources/configuration/iu/2011/vote/round4.xml --- a/src/main/resources/configuration/iu/2011/vote/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote/round4.xml @@ -35,79 +35,6 @@ ]]></entry> -<entry key='voting-results'> - <![CDATA[ - <h1>Nomination Results</h1> - <h2>Selected Strategy</h2> - <hr> - <p><b> {first(selectedRules)} </b></p> - {if (tiebreaker)} - <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> - <h2>Other Nominated Strategies</h2> - <hr> - <ol> - {rest(selectedRules): {selectedRule | <li><b>{selectedRule}</b></li>}} - </ol> - {endif} - ]]> -</entry> - -<entry key='initial-voting-instructions'> - <![CDATA[ -<h1>Important New Instructions!</h1> -<h2>Strategies for managing how players collect tokens for the rest of the experiment</h2> -<hr> -<p> -In a moment, you will have the option to implement one of five strategies for how you -and the three other people in your group collect tokens for the rest of the -experiment. -</p> - -<h2>Procedure for Deciding the Strategy</h2> -<hr> -<p> - Each of the {self.clientsPerGroup} people in your group can nominate one of the five - potential strategies. The single strategy that receives the most nominations - wins. -</p> -<p> - <b>If there is a tie</b>, one of the tied options will be selected at random by - the computer. Each of the tied strategies will have an equal chance of being - selected. -</p> - -<h2>Implementation</h2> -<hr> - <p>Neither the computer nor the experimenter will intervene to implement the - strategy. - </p> - - <p> - <b>Do you have any questions?</b> If you have any questions at this time, - raise your hand and someone will come over to your station and answer it. - </p> - ]]> -</entry> - - -<entry key='voting-instructions'> -<![CDATA[ -<h1>Strategy Nomination Instructions</h1> -<hr> -<p> -To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the -results on the next screen. The results will be presented to each person in -your group. -</p> -<h2>Your selection will be anonymous</h2> -<hr> -<p> -The identity of people who nominated a particular strategy will NOT be revealed. -Therefore, neither you nor the experimenter will know who nominated a particular -strategy. -</p> -]]> -</entry><entry key='external-survey-enabled'>true</entry><entry key='survey-url'> diff -r 1dfe234f466011215ddca77824e49f728aa939f4 -r 570cb75dcb0c7feeabcb03b238ddc0155250f92e src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -320,4 +320,23 @@ ]]></entry> +<entry key='voting-instructions'> +<![CDATA[ +<h1>Strategy Nomination Instructions</h1> +<hr> +<p> +To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the +results on the next screen. The results will be presented to each person in +your group. +</p> +<h2>Your selection will be anonymous</h2> +<hr> +<p> +The identity of people who nominated a particular strategy will NOT be revealed. +Therefore, neither you nor the experimenter will know who nominated a particular +strategy. +</p> +]]> +</entry> + </properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-31 05:14:41
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/dedbf30aad77/ changeset: dedbf30aad77 user: alllee date: 2012-01-31 06:14:31 summary: removing old voting-results from round4.xml IU vote treatment. it was overriding the correct template in server.xml. adding survey id to ClientData toString if it is not empty so it can be rendered in the summary save file processor. affected #: 4 files diff -r fc39ae525508105e8b576b391b4ba3c53098f23a -r dedbf30aad77d957dd1b25dc411faa456f30c6c5 src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/SummaryProcessor.java @@ -19,7 +19,7 @@ import edu.asu.commons.util.Utils; /** - * $Id: SummaryProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * * @author <a href='mailto:all...@as...'>Allen Lee</a> @@ -41,7 +41,7 @@ } }); for (ClientData data : clientDataList) { - clientTokens.add(String.format("%s, %s, %s", data.getId(), data.getAssignedNumber(), data.getTotalTokens())); + clientTokens.add(String.format("%s, %s", data, data.getTotalTokens())); totalConsumedGroupTokens += data.getTotalTokens(); } writer.println( @@ -84,4 +84,4 @@ public String getOutputFileExtension() { return "-summary.txt"; } -} \ No newline at end of file +} diff -r fc39ae525508105e8b576b391b4ba3c53098f23a -r dedbf30aad77d957dd1b25dc411faa456f30c6c5 src/main/java/edu/asu/commons/foraging/model/ClientData.java --- a/src/main/java/edu/asu/commons/foraging/model/ClientData.java +++ b/src/main/java/edu/asu/commons/foraging/model/ClientData.java @@ -600,7 +600,13 @@ } public String toString() { - return String.format("[%s #%d]", id, assignedNumber); + String surveyId = id.getSurveyId(); + if (surveyId == null || surveyId.trim().isEmpty()) { + return String.format("%s, #%d", id, assignedNumber); + } + else { + return String.format("%s, Survey id: %s, #%d", id, surveyId, assignedNumber); + } } public void addTrustGameEarnings(double trustGameEarnings) { diff -r fc39ae525508105e8b576b391b4ba3c53098f23a -r dedbf30aad77d957dd1b25dc411faa456f30c6c5 src/main/resources/configuration/iu/2011/vote/round4.xml --- a/src/main/resources/configuration/iu/2011/vote/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote/round4.xml @@ -35,79 +35,6 @@ ]]></entry> -<entry key='voting-results'> - <![CDATA[ - <h1>Nomination Results</h1> - <h2>Selected Strategy</h2> - <hr> - <p><b> {first(selectedRules)} </b></p> - {if (tiebreaker)} - <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> - <h2>Other Nominated Strategies</h2> - <hr> - <ol> - {rest(selectedRules): {selectedRule | <li><b>{selectedRule}</b></li>}} - </ol> - {endif} - ]]> -</entry> - -<entry key='initial-voting-instructions'> - <![CDATA[ -<h1>Important New Instructions!</h1> -<h2>Strategies for managing how players collect tokens for the rest of the experiment</h2> -<hr> -<p> -In a moment, you will have the option to implement one of five strategies for how you -and the three other people in your group collect tokens for the rest of the -experiment. -</p> - -<h2>Procedure for Deciding the Strategy</h2> -<hr> -<p> - Each of the {self.clientsPerGroup} people in your group can nominate one of the five - potential strategies. The single strategy that receives the most nominations - wins. -</p> -<p> - <b>If there is a tie</b>, one of the tied options will be selected at random by - the computer. Each of the tied strategies will have an equal chance of being - selected. -</p> - -<h2>Implementation</h2> -<hr> - <p>Neither the computer nor the experimenter will intervene to implement the - strategy. - </p> - - <p> - <b>Do you have any questions?</b> If you have any questions at this time, - raise your hand and someone will come over to your station and answer it. - </p> - ]]> -</entry> - - -<entry key='voting-instructions'> -<![CDATA[ -<h1>Strategy Nomination Instructions</h1> -<hr> -<p> -To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the -results on the next screen. The results will be presented to each person in -your group. -</p> -<h2>Your selection will be anonymous</h2> -<hr> -<p> -The identity of people who nominated a particular strategy will NOT be revealed. -Therefore, neither you nor the experimenter will know who nominated a particular -strategy. -</p> -]]> -</entry><entry key='external-survey-enabled'>true</entry><entry key='survey-url'> diff -r fc39ae525508105e8b576b391b4ba3c53098f23a -r dedbf30aad77d957dd1b25dc411faa456f30c6c5 src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -320,4 +320,23 @@ ]]></entry> +<entry key='voting-instructions'> +<![CDATA[ +<h1>Strategy Nomination Instructions</h1> +<hr> +<p> +To nominate a strategy, click the radio button that is to the right of the one you choose; then click "submit". The computer will tally the nominations and then report the +results on the next screen. The results will be presented to each person in +your group. +</p> +<h2>Your selection will be anonymous</h2> +<hr> +<p> +The identity of people who nominated a particular strategy will NOT be revealed. +Therefore, neither you nor the experimenter will know who nominated a particular +strategy. +</p> +]]> +</entry> + </properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-31 00:00:43
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/1dfe234f4660/ changeset: 1dfe234f4660 branch: stable user: alllee date: 2012-01-31 01:00:32 summary: merging with default to fix critical bug with iu treatment where the selected rules were not being persisted properly and so in the event of a tiebreaker it would not be clear which strategy won. affected #: 7 files diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -170,8 +170,8 @@ addEventProcessor(new EventTypeProcessor<RuleSelectedUpdateEvent>(RuleSelectedUpdateEvent.class) { @Override public void handle(RuleSelectedUpdateEvent event) { - dataModel.setSelectedRules(event.getSelectedRules()); - getGameWindow2D().showVotingResults(event.getSelectedRules(), event.getVotingResults()); + dataModel.setSelectedRules(event.getSelectedStrategies()); + getGameWindow2D().showVotingResults(event.getSelectedStrategies(), event.getVotingResults()); } }); addEventProcessor(new EventTypeProcessor<ShowVoteScreenRequest>(ShowVoteScreenRequest.class) { diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java @@ -21,28 +21,23 @@ public class RuleSelectedUpdateEvent extends AbstractPersistableEvent { private static final long serialVersionUID = 4360213814026474451L; - private final List<ForagingStrategy> selectedRules; + private final List<ForagingStrategy> selectedStrategies; private final Map<ForagingStrategy, Integer> votingResults; - public RuleSelectedUpdateEvent(Identifier id, List<ForagingStrategy> selectedRules, Map<ForagingStrategy, Integer> votingResults) { - super(id, selectedRules.toString()); - this.selectedRules = selectedRules; + public RuleSelectedUpdateEvent(Identifier id, List<ForagingStrategy> selectedStrategies, Map<ForagingStrategy, Integer> votingResults) { + super(id, String.format("Strategies (first is tiebreaker): %s, All nominations: %s", selectedStrategies, votingResults)); + this.selectedStrategies = selectedStrategies; this.votingResults = votingResults; } public ForagingStrategy getSelectedRule() { - return selectedRules.get(0); + return selectedStrategies.get(0); } - public List<ForagingStrategy> getSelectedRules() { - return selectedRules; + public List<ForagingStrategy> getSelectedStrategies() { + return selectedStrategies; } - @Override - public String toString() { - return String.format("Selected first rule from %s", selectedRules); - } - public Map<ForagingStrategy, Integer> getVotingResults() { return votingResults; } diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -397,9 +397,10 @@ sendFacilitatorMessage(String.format( "%s selected [%s] from all rules (%s)", group, selectedRules, votingResults)); + transmit(new RuleSelectedUpdateEvent(id, selectedRules, votingResults)); } - + store(new RuleSelectedUpdateEvent(facilitatorId, selectedRules, votingResults)); } } } diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/asu/2011/t4/round6.xml --- a/src/main/resources/configuration/asu/2011/t4/round6.xml +++ b/src/main/resources/configuration/asu/2011/t4/round6.xml @@ -16,31 +16,4 @@ <entry key='always-explicit'>true</entry><entry key='max-cell-occupancy'>1</entry><entry key='trust-game'>true</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<h2>Survey</h2> -<hr> -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<h2>Payments</h2> -<hr> - <p>NOTE: Your computer number is <b>{id}</b></p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number, <b>{id}</b>, is -called, and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> - - - -]]> -</entry></properties> diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/stockholm/censored-chat/round1.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round1.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round1.xml @@ -16,7 +16,7 @@ <entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -30,10 +30,10 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with other randomly selected participants in this room. Each participant in the room has been randomly assigned to one of several -equal-sized {clientsPerGroup} person groups and everyone in your group has been -randomly assigned a number from 1 to {clientsPerGroup}. You will stay in the same +equal-sized {self.clientsPerGroup} person groups and everyone in your group has been +randomly assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for the entire experiment, and each person's number from 1 to -{clientsPerGroup} will remain the same throughout the experiment. The other members +{self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. </p> diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/stockholm/censored-chat/round4.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round4.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round4.xml @@ -54,7 +54,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also @@ -114,7 +114,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also diff -r b84e9726763bf4896f60e0ccc02385ea1fc27524 -r 1dfe234f466011215ddca77824e49f728aa939f4 src/main/resources/configuration/stockholm/censored-chat/server.xml --- a/src/main/resources/configuration/stockholm/censored-chat/server.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/server.xml @@ -213,17 +213,17 @@ room. </p><p> - You will see other participants labeled from 1 to {clientsPerGroup} in the chat + You will see other participants labeled from A to {self.lastChatHandle} in the chat window. You can send a chat message by typing into the textfield and pressing the enter key. </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 23:59:25
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/fc39ae525508/ changeset: fc39ae525508 user: alllee date: 2012-01-31 00:59:14 summary: clarifying strategies list for data files affected #: 1 file diff -r c5bc3c8664ec85281b8596d1110675e6b15353ab -r fc39ae525508105e8b576b391b4ba3c53098f23a src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/RuleSelectedUpdateEvent.java @@ -25,7 +25,7 @@ private final Map<ForagingStrategy, Integer> votingResults; public RuleSelectedUpdateEvent(Identifier id, List<ForagingStrategy> selectedStrategies, Map<ForagingStrategy, Integer> votingResults) { - super(id, String.format("Strategies: %s, All results: %s", selectedStrategies, votingResults)); + super(id, String.format("Strategies (first is tiebreaker): %s, All nominations: %s", selectedStrategies, votingResults)); this.selectedStrategies = selectedStrategies; this.votingResults = votingResults; } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 23:34:27
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b596f487eb4c/ changeset: b596f487eb4c user: alllee date: 2012-01-31 00:01:22 summary: removing unused instructions properties affected #: 1 file diff -r 609b2a2f8b2b47bf954336f1fe6ff2e46db1dbaa -r b596f487eb4c21cb755698a83cc238589e000aa2 src/main/resources/configuration/asu/2011/t4/round6.xml --- a/src/main/resources/configuration/asu/2011/t4/round6.xml +++ b/src/main/resources/configuration/asu/2011/t4/round6.xml @@ -16,31 +16,4 @@ <entry key='always-explicit'>true</entry><entry key='max-cell-occupancy'>1</entry><entry key='trust-game'>true</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<h2>Survey</h2> -<hr> -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<h2>Payments</h2> -<hr> - <p>NOTE: Your computer number is <b>{id}</b></p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number, <b>{id}</b>, is -called, and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> - - - -]]> -</entry></properties> https://bitbucket.org/virtualcommons/foraging/changeset/0e04172b06db/ changeset: 0e04172b06db user: alllee date: 2012-01-31 00:34:16 summary: fixing template attribute references for stockholm treatment affected #: 3 files diff -r b596f487eb4c21cb755698a83cc238589e000aa2 -r 0e04172b06dbbf23931786c7fa48a97276751d54 src/main/resources/configuration/stockholm/censored-chat/round1.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round1.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round1.xml @@ -16,7 +16,7 @@ <entry key="instructions"><![CDATA[ -<h1>Round {roundNumber} Instructions</h1> +<h1>Round {self.roundNumber} Instructions</h1><hr><p> This is the first round of the experiment. The length of the round is @@ -30,10 +30,10 @@ In this round the renewable resource will become five times bigger. You will share this larger environment with other randomly selected participants in this room. Each participant in the room has been randomly assigned to one of several -equal-sized {clientsPerGroup} person groups and everyone in your group has been -randomly assigned a number from 1 to {clientsPerGroup}. You will stay in the same +equal-sized {self.clientsPerGroup} person groups and everyone in your group has been +randomly assigned a number from 1 to {self.clientsPerGroup}. You will stay in the same group for the entire experiment, and each person's number from 1 to -{clientsPerGroup} will remain the same throughout the experiment. The other members +{self.clientsPerGroup} will remain the same throughout the experiment. The other members of your group will appear on the screen as blue dots <img src="@CODEBASE_URL@/images/gem-other.gif"> with a white number embedded in the dot. </p> diff -r b596f487eb4c21cb755698a83cc238589e000aa2 -r 0e04172b06dbbf23931786c7fa48a97276751d54 src/main/resources/configuration/stockholm/censored-chat/round4.xml --- a/src/main/resources/configuration/stockholm/censored-chat/round4.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/round4.xml @@ -54,7 +54,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also @@ -114,7 +114,7 @@ During the next round you will have the option to reduce the earnings of another participant at a cost to your own earnings. <ul> - <li>If you press the numeric key 1-{clientsPerGroup} corresponding + <li>If you press the numeric key 1-{self.clientsPerGroup} corresponding to another participant, you will reduce the number of tokens they have collected in this round by <b>{self.sanctionPenalty}</b> token(s). This will also diff -r b596f487eb4c21cb755698a83cc238589e000aa2 -r 0e04172b06dbbf23931786c7fa48a97276751d54 src/main/resources/configuration/stockholm/censored-chat/server.xml --- a/src/main/resources/configuration/stockholm/censored-chat/server.xml +++ b/src/main/resources/configuration/stockholm/censored-chat/server.xml @@ -213,17 +213,17 @@ room. </p><p> - You will see other participants labeled from 1 to {clientsPerGroup} in the chat + You will see other participants labeled from A to {self.lastChatHandle} in the chat window. You can send a chat message by typing into the textfield and pressing the enter key. </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr> -<p>Round {roundNumber} is the same as the previous round.</p> +<p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:38:21
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/b84e9726763b/ changeset: b84e9726763b branch: stable user: alllee date: 2012-01-30 23:38:10 summary: merge from default affected #: 1 file diff -r 208944912a665cf2995a816eadfd815b3f23dc15 -r b84e9726763bf4896f60e0ccc02385ea1fc27524 src/main/resources/configuration/iu/2011/vote/round7.xml --- a/src/main/resources/configuration/iu/2011/vote/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote/round7.xml @@ -18,21 +18,4 @@ <entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8&SURVEY_ID={surveyId}]]></entry> - - -<entry key="instructions"> -<![CDATA[ -<h2>Important New Instructions!</h2> -<hr> -<p> -<b>From this point forward, participants will NOT have the option to reduce the earnings of another participant.</b> -</p> - -<h2>Round {self.roundNumber}</h2> -<hr> -<p> -Round {self.roundNumber} is about to begin. The length of this round is again {duration}.</p> -<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> -]]> -</entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:38:06
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/609b2a2f8b2b/ changeset: 609b2a2f8b2b user: alllee date: 2012-01-30 23:37:54 summary: removing inappropriate instructions for round 7 as punishment isn't enabled affected #: 1 file diff -r 6ebbd98871e080bb9e755fb8057278655b33573e -r 609b2a2f8b2b47bf954336f1fe6ff2e46db1dbaa src/main/resources/configuration/iu/2011/vote/round7.xml --- a/src/main/resources/configuration/iu/2011/vote/round7.xml +++ b/src/main/resources/configuration/iu/2011/vote/round7.xml @@ -18,21 +18,4 @@ <entry key='survey-url'><![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_3efXdNaJ6EXZ0S8&SURVEY_ID={surveyId}]]></entry> - - -<entry key="instructions"> -<![CDATA[ -<h2>Important New Instructions!</h2> -<hr> -<p> -<b>From this point forward, participants will NOT have the option to reduce the earnings of another participant.</b> -</p> - -<h2>Round {self.roundNumber}</h2> -<hr> -<p> -Round {self.roundNumber} is about to begin. The length of this round is again {duration}.</p> -<p><b>Do you have any questions?</b> If you have any questions at this time please raise your hand and someone will come over to your station and answer it.</p> -]]> -</entry></properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:19:33
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/6ebbd98871e0/ changeset: 6ebbd98871e0 user: alllee date: 2012-01-30 23:19:23 summary: merging stable changes back into default, dev should continue on default as usual affected #: 6 files diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e pom.xml --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,7 @@ <releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository> + </repositories><dependencies><dependency><groupId>javax.jnlp</groupId> @@ -72,7 +73,8 @@ <dependency><groupId>junit</groupId><artifactId>junit</artifactId> - <version>4.5</version> + <version>4.10</version> + <scope>test</scope></dependency><dependency><groupId>edu.asu.commons</groupId> diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e src/main/resources/configuration/asu/2011/t2/server.xml --- a/src/main/resources/configuration/asu/2011/t2/server.xml +++ b/src/main/resources/configuration/asu/2011/t2/server.xml @@ -179,7 +179,7 @@ </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ <h3>Round {self.roundNumber} Instructions</h3><hr> @@ -236,7 +236,15 @@ <h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +When payments are ready we will call you up one by one. Please wait until your +computer number, <b>{clientData.id}</b>, is called to turn in your survey and +receive payment. Please answer the survey carefully and thank you for +participating. +</p> +<p> +NOTE: Please <b>answer the survey completely (there may be a back side)</b> +and <b>bring all your belongings with you</b> when you come up to +receive your payment to help us speed up the payment process. </p> {endif} ]]> diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e src/main/resources/configuration/asu/2011/t3/server.xml --- a/src/main/resources/configuration/asu/2011/t3/server.xml +++ b/src/main/resources/configuration/asu/2011/t3/server.xml @@ -179,7 +179,7 @@ </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ <h3>Round {self.roundNumber} Instructions</h3><hr> @@ -236,7 +236,15 @@ <h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +When payments are ready we will call you up one by one. Please wait until your +computer number, <b>{clientData.id}</b>, is called to turn in your survey and +receive payment. Please answer the survey carefully and thank you for +participating. +</p> +<p> +NOTE: Please <b>answer the survey completely (there may be a back side)</b> +and <b>bring all your belongings with you</b> when you come up to +receive your payment to help us speed up the payment process. </p> {endif} ]]> diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e src/main/resources/configuration/asu/2011/t4/server.xml --- a/src/main/resources/configuration/asu/2011/t4/server.xml +++ b/src/main/resources/configuration/asu/2011/t4/server.xml @@ -179,7 +179,7 @@ </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ <h3>Round {self.roundNumber} Instructions</h3><hr> @@ -236,7 +236,15 @@ <h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +When payments are ready we will call you up one by one. Please wait until your +computer number, <b>{clientData.id}</b>, is called to turn in your survey and +receive payment. Please answer the survey carefully and thank you for +participating. +</p> +<p> +NOTE: Please <b>answer the survey completely (there may be a back side)</b> +and <b>bring all your belongings with you</b> when you come up to +receive your payment to help us speed up the payment process. </p> {endif} ]]> diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e src/main/resources/web/client.jnlp --- a/src/main/resources/web/client.jnlp +++ b/src/main/resources/web/client.jnlp @@ -11,7 +11,7 @@ <resources><j2se version="1.6+"/><jar href="client.jar"/> - <jar href='stringtemplate.jar'/> + <jar href='ST4.jar'/><jar href='antlr-runtime.jar'/><jar href='@FRAMEWORK_JAR@'/><!-- diff -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 -r 6ebbd98871e080bb9e755fb8057278655b33573e src/main/resources/web/facilitator.jnlp --- a/src/main/resources/web/facilitator.jnlp +++ b/src/main/resources/web/facilitator.jnlp @@ -12,7 +12,7 @@ <resources><j2se version="1.6+"/><jar href="facilitator.jar"/> - <jar href='stringtemplate.jar'/> + <jar href='ST4.jar'/><jar href='antlr-runtime.jar'/><jar href='@FRAMEWORK_JAR@'/></resources> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:18:38
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/dae8c773bb86/ changeset: dae8c773bb86 branch: stable user: alllee date: 2012-01-30 23:15:08 summary: fixing unclosed tag affected #: 1 file diff -r baa828ddf2ce45f129bcb5cb63e1eeb3db6ee0da -r dae8c773bb862fe939d491ab69117c4c7aad9c88 pom.xml --- a/pom.xml +++ b/pom.xml @@ -63,6 +63,7 @@ <releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository> + </repositories><dependencies><dependency><groupId>javax.jnlp</groupId> https://bitbucket.org/virtualcommons/foraging/changeset/208944912a66/ changeset: 208944912a66 branch: stable user: alllee date: 2012-01-30 23:18:23 summary: adding junit dependency back in, appears to not get inherited from csidex properly? should investigate later. affected #: 1 file diff -r dae8c773bb862fe939d491ab69117c4c7aad9c88 -r 208944912a665cf2995a816eadfd815b3f23dc15 pom.xml --- a/pom.xml +++ b/pom.xml @@ -71,6 +71,12 @@ <version>1.6.0_30</version></dependency><dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.10</version> + <scope>test</scope> + </dependency> + <dependency><groupId>edu.asu.commons</groupId><artifactId>csidex</artifactId><version>0.3-SNAPSHOT</version> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:10:42
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/baa828ddf2ce/ changeset: baa828ddf2ce branch: stable user: alllee date: 2012-01-30 23:10:33 summary: merge with default, cleanup on pom and ivysettings to remove tdar archiva instance from dependency list affected #: 2 files diff -r 93bfd0aaab9199cc14920abb3932d8696089a2dc -r baa828ddf2ce45f129bcb5cb63e1eeb3db6ee0da ivysettings.xml --- a/ivysettings.xml +++ b/ivysettings.xml @@ -11,9 +11,9 @@ <ivy pattern='${local-m2-pattern}.pom' /><artifact pattern='${local-m2-pattern}.[ext]'/></filesystem> + <ibiblio name='central' m2compatible='true'/><ibiblio name='commons.snapshots' m2compatible='true' root='http://dev.commons.asu.edu/archiva/repository/snapshots'/><ibiblio name='commons.internal' m2compatible='true' root='http://dev.commons.asu.edu/archiva/repository/internal'/> - <ibiblio name='tdar-archiva' m2compatible='true' root='http://dev.tdar.org/archiva/repository/internal'/></chain></resolvers></ivysettings> diff -r 93bfd0aaab9199cc14920abb3932d8696089a2dc -r baa828ddf2ce45f129bcb5cb63e1eeb3db6ee0da pom.xml --- a/pom.xml +++ b/pom.xml @@ -63,14 +63,6 @@ <releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository> - <repository> - <id>dev.tdar.org</id> - <name>tDAR Maven2 repository</name> - <url>http://dev.tdar.org/archiva/repository/internal</url> - <releases><enabled>true</enabled></releases> - <snapshots><enabled>false</enabled></snapshots> - </repository> - </repositories><dependencies><dependency><groupId>javax.jnlp</groupId> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 22:07:21
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/0fcf636f10c2/ changeset: 0fcf636f10c2 user: alllee date: 2012-01-30 23:07:10 summary: removing tdar archiva instance as it's causing timeout issues affected #: 14 files diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 ivysettings.xml --- a/ivysettings.xml +++ b/ivysettings.xml @@ -11,9 +11,9 @@ <ivy pattern='${local-m2-pattern}.pom' /><artifact pattern='${local-m2-pattern}.[ext]'/></filesystem> + <ibiblio name='central' m2compatible='true'/><ibiblio name='commons.snapshots' m2compatible='true' root='http://dev.commons.asu.edu/archiva/repository/snapshots'/><ibiblio name='commons.internal' m2compatible='true' root='http://dev.commons.asu.edu/archiva/repository/internal'/> - <ibiblio name='tdar-archiva' m2compatible='true' root='http://dev.tdar.org/archiva/repository/internal'/></chain></resolvers></ivysettings> diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 pom.xml --- a/pom.xml +++ b/pom.xml @@ -63,14 +63,6 @@ <releases><enabled>false</enabled></releases><snapshots><enabled>true</enabled></snapshots></repository> - <repository> - <id>dev.tdar.org</id> - <name>tDAR Maven2 repository</name> - <url>http://dev.tdar.org/archiva/repository/internal</url> - <releases><enabled>true</enabled></releases> - <snapshots><enabled>false</enabled></snapshots> - </repository> - </repositories><dependencies><dependency><groupId>javax.jnlp</groupId> diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/event/AddClientEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/AddClientEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/AddClientEvent.java @@ -8,10 +8,10 @@ import edu.asu.commons.foraging.model.GroupDataModel; /** - * $Id: AddClientEvent.java 4 2008-07-25 22:51:44Z alllee $ + * $Id$ * * @author Allen Lee, Deepali Bhagvat - * @version $Revision: 4 $ + * @version $Revision$ */ public class AddClientEvent extends AbstractPersistableEvent { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/ui/EmbeddedChatPanel.java --- a/src/main/java/edu/asu/commons/foraging/ui/EmbeddedChatPanel.java +++ b/src/main/java/edu/asu/commons/foraging/ui/EmbeddedChatPanel.java @@ -33,7 +33,7 @@ /** - * $Id: EmbeddedChatPanel.java 416 2009-12-25 05:17:14Z alllee $ + * $Id$ * * Chat panel used to communicate with other players within the 3D foraging visualization. * @@ -43,7 +43,7 @@ * FIXME: set the layout/bounds on this class properly. * * @author alllee - * @version $Revision: 416 $ + * @version $Revision$ */ @SuppressWarnings("serial") diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/ui/GameWindow3D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow3D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow3D.java @@ -18,12 +18,12 @@ import edu.asu.commons.net.Identifier; /** - * $Id: GameWindow3D.java 416 2009-12-25 05:17:14Z alllee $ + * $Id$ * * TODO: fix chat panel layout, scrolling messages cause the chat panel to overwhelm the game window. * * @author <a href='All...@as...'>Allen Lee</a>, Deepali Bhagvat - * @version $Revision: 416 $ + * @version $Revision$ */ public class GameWindow3D implements GameWindow { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/AvatarPreviewView.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/AvatarPreviewView.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/AvatarPreviewView.java @@ -15,7 +15,7 @@ /** * The AvatarPreviewView class displays avatar preview while designing the avatar. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ */ public class AvatarPreviewView extends GameView3d { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Fruit.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Fruit.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Fruit.java @@ -11,7 +11,7 @@ /** * The Fruit class represents fruits grown on the trees in the forestry experiment. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class Fruit { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Ground.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Ground.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Ground.java @@ -11,7 +11,7 @@ /** * The Ground class represents the forest ground in the foresty experiment visualization. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class Ground extends GraphicsObject { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/LeafClusterModel.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/LeafClusterModel.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/LeafClusterModel.java @@ -11,7 +11,7 @@ * The LeafClusterModel class is used to create leaf clusters in the tree foliage. The geometry is approximated as 2 triangles connected * to each other on one side. This is then buffered for rendering. This is a model type of class in the MVC architecture. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class LeafClusterModel { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Tree.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Tree.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Tree.java @@ -19,7 +19,7 @@ /** * The Tree class encapulates a growing tree in the forestry experiment visualization. The trees represent resources in the common pool resource. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class Tree{ diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeBranchModel.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeBranchModel.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeBranchModel.java @@ -14,7 +14,7 @@ * The TreeBranchModel class is used to create branch geometry. The geometry is a tapering bounding box. This is then buffered for * rendering. This is a model type of class in the MVC architecture. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class TreeBranchModel implements Serializable { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeModel.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeModel.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeModel.java @@ -19,7 +19,7 @@ * The TreeModel class is used to create tree geometry according to its age. This is then buffered for rendering. This is a model type of class * in the MVC architecture. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class TreeModel { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeView.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeView.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/TreeView.java @@ -15,7 +15,7 @@ * architecture. * * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class TreeView { diff -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac -r 0fcf636f10c29759643bceb55ec10fd1fbe926e4 src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Woodcutter.java --- a/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Woodcutter.java +++ b/src/main/java/edu/asu/commons/foraging/visualization/forestry/va/Woodcutter.java @@ -35,7 +35,7 @@ * in the forestry visualization. Animation files are used to animate the woodcutter to perform different actions. The actions supported are * standing, walking and axing. * @author <a href='dee...@as...'>Deepali Bhagvat</a> - * @version $Revision: 4 $ + * @version $Revision$ * */ public class Woodcutter extends GraphicsObject implements MovingObject { Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 21:11:08
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/e364327004b2/ changeset: e364327004b2 branch: stable user: alllee date: 2012-01-30 22:10:51 summary: removing junit from dependencies as it's already included in csidex affected #: 1 file diff -r 67cedb609d23928e25083a9d95e3c11c3917ea9f -r e364327004b270cec3a5312921c31dc9cfd823cb pom.xml --- a/pom.xml +++ b/pom.xml @@ -78,11 +78,6 @@ <version>1.6.0_30</version></dependency><dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.5</version> - </dependency> - <dependency><groupId>edu.asu.commons</groupId><artifactId>csidex</artifactId><version>0.3-SNAPSHOT</version> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 19:36:36
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/21750a5469be/ changeset: 21750a5469be branch: stable user: alllee date: 2012-01-30 20:36:18 summary: merging default back into stable, final updates for Spring 2012 IU experiments affected #: 87 files Diff too large to display. Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 19:34:30
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/14f5d16b9584/ changeset: 14f5d16b9584 user: alllee date: 2012-01-30 20:34:12 summary: fixing instructions for IU experiments (online qualtrics survey in the last round means we don't have a paper exit survey, etc.) minor refactoring on FacilitatorWindow, reordering menu items to hopefully be a little more sensible. Should redesign UI at some point when we have more time. affected #: 7 files diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java @@ -39,7 +39,6 @@ */ public class Facilitator extends BaseFacilitator<ServerConfiguration, RoundConfiguration> { - private final static Facilitator INSTANCE = new Facilitator(); private ServerDataModel serverDataModel; private FacilitatorWindow facilitatorWindow; private boolean experimentRunning = false; @@ -51,6 +50,14 @@ @SuppressWarnings("rawtypes") public Facilitator(ServerConfiguration configuration) { super(configuration); + } + + void createFacilitatorWindow(Dimension dimension) { + facilitatorWindow = new FacilitatorWindow(dimension, this); + if (getId() == null) { + // configure for unconnected functionality + facilitatorWindow.configureForReplay(); + } addEventProcessor(new EventTypeProcessor<SetConfigurationEvent>(SetConfigurationEvent.class) { public void handle(SetConfigurationEvent event) { RoundConfiguration configuration = (RoundConfiguration) event.getParameters(); @@ -58,10 +65,10 @@ } }); addEventProcessor(new EventTypeProcessor<TrustGameResultsFacilitatorEvent>(TrustGameResultsFacilitatorEvent.class){ - @Override - public void handle(TrustGameResultsFacilitatorEvent event) { - facilitatorWindow.updateTrustGame(event); - } + @Override + public void handle(TrustGameResultsFacilitatorEvent event) { + facilitatorWindow.updateTrustGame(event); + } }); addEventProcessor(new EventTypeProcessor<FacilitatorUpdateEvent>(FacilitatorUpdateEvent.class) { @@ -104,18 +111,6 @@ } - public static Facilitator getInstance() { - return INSTANCE; - } - - void createFacilitatorWindow(Dimension dimension) { - facilitatorWindow = new FacilitatorWindow(dimension, this); - if (getId() == null) { - // configure for unconnected functionality - facilitatorWindow.configureForReplay(); - } - } - /* * Send a request to server to start an experiment */ @@ -190,8 +185,7 @@ return facilitatorWindow; } - public void setRoundParameters( - List<RoundConfiguration> roundConfiguration) { + public void setRoundParameters(List<RoundConfiguration> roundConfiguration) { getServerConfiguration().setAllParameters(roundConfiguration); } @@ -204,14 +198,14 @@ } public static void main(String[] args) { - Runnable createGuiRunnable = new Runnable() { + SwingUtilities.invokeLater(new Runnable() { public void run() { Dimension dimension = new Dimension(700, 700); - Facilitator facilitator = Facilitator.getInstance(); + Facilitator facilitator = new Facilitator(); facilitator.connect(); JFrame frame = new JFrame(); - frame.setTitle("Facilitator window: " + facilitator.getId()); - frame.setSize((int) dimension.getWidth(), (int) dimension.getHeight()); + frame.setTitle("Facilitator: " + facilitator.getId()); + frame.setSize(dimension); facilitator.createFacilitatorWindow(dimension); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(facilitator.getFacilitatorWindow()); @@ -219,8 +213,7 @@ // frame.pack(); frame.setVisible(true); } - }; - SwingUtilities.invokeLater(createGuiRunnable); + }); } public RoundConfiguration getCurrentRoundConfiguration() { diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java @@ -129,15 +129,7 @@ // Round menu JMenu menu = new JMenu("Round"); menu.setMnemonic(KeyEvent.VK_R); - - startChatMenuItem = new JMenuItem("Start chat"); - startChatMenuItem.setEnabled(true); - startChatMenuItem.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - facilitator.sendBeginChatRoundRequest(); - } - }); - menu.add(startChatMenuItem); + showInstructionsMenuItem = new JMenuItem("Show Instructions"); showInstructionsMenuItem.setMnemonic(KeyEvent.VK_I); @@ -149,15 +141,7 @@ } }); menu.add(showInstructionsMenuItem); - - showTrustGameMenuItem = new JMenuItem("Show Trust Game"); - showTrustGameMenuItem.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - facilitator.sendShowTrustGameRequest(); - } - }); - menu.add(showTrustGameMenuItem); - + startRoundMenuItem = new JMenuItem("Start"); startRoundMenuItem.setMnemonic(KeyEvent.VK_T); startRoundMenuItem.setEnabled(false); @@ -177,17 +161,35 @@ } }); menu.add(stopRoundMenuItem); - + showExitInstructionsMenuItem = createMenuItem(menu, "Show exit instructions", new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - facilitator.sendShowExitInstructionsRequest(); - } + @Override + public void actionPerformed(ActionEvent e) { + facilitator.sendShowExitInstructionsRequest(); + } }); + startChatMenuItem = new JMenuItem("Start chat"); + startChatMenuItem.setEnabled(true); + startChatMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + facilitator.sendBeginChatRoundRequest(); + } + }); + menu.add(startChatMenuItem); + + showTrustGameMenuItem = new JMenuItem("Show Trust Game"); + showTrustGameMenuItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + facilitator.sendShowTrustGameRequest(); + } + }); + menu.add(showTrustGameMenuItem); + + menuBar.add(menu); - + // voting menu menu = new JMenu("Voting"); diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java @@ -1,7 +1,6 @@ package edu.asu.commons.foraging.model; import java.awt.Point; -import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -43,7 +42,7 @@ * @version $Revision$ */ -public class GroupDataModel implements Serializable, Comparable<GroupDataModel>, DataModel<ServerConfiguration, RoundConfiguration> { +public class GroupDataModel implements Comparable<GroupDataModel>, DataModel<ServerConfiguration, RoundConfiguration> { private static final long serialVersionUID = -4756267788191037505L; @@ -809,4 +808,9 @@ return selectedRules.get(0); } + @Override + public ServerConfiguration getExperimentConfiguration() { + return serverDataModel.getExperimentConfiguration(); + } + } diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/resources/configuration/iu/2011/vote-punish/round9.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round9.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round9.xml @@ -19,22 +19,25 @@ <![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm&SURVEY_ID={surveyId}]]></entry> -<entry key="last-round-debriefing"> +<entry key='survey-instructions'><![CDATA[ - <p> - This was the last round, but not the end of the experiment. We will now - determine your payments. While we are doing this, we request that you - carefully fill out a brief survey. - </p> - <p> - When we are ready we will call you one by one to the room next door. We will - pay you there in private. Please wait until your computer number is called, - and then proceed to the room next door to turn in your computer number and - your survey. - </p> - <p> - Please answer the survey carefully and thank you for participating. - </p> + <h1>Survey</h1> + <hr> + <p> + We would like to again ask you some quick questions. Please <a href='{surveyUrl}'>click here</a> to begin the survey. + </p> + <p> + We will continue after all of the surveys have been completed by all the + participants in the room. Please press the "Continue" button at the + bottom of the screen after you have successfully completed the survey. + </p> + <p> + If you encounter any problems with the survey <b>please inform the experimenter</b>. + </p> + <br> + <form> + <input type="submit" value="Continue" name="continue"> + </form> ]]></entry> diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -244,15 +244,16 @@ Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. </p> {if (showExitInstructions)} -<h2>Exit Survey</h2> +<h2>Final Round</h2><hr> -<p> -This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. -</p> + <p>This was the last round of the experiment.</p><h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +Please wait quietly while we prepare your payments. When payments are ready we will +call you up one by one. Please wait until your computer number, +<b>{clientData.id}</b>, is called before coming up to receive payment. Thank you +for participating. </p> {endif} ]]> @@ -308,16 +309,12 @@ <p><b>Do you have any questions?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it. - Otherwise, please click the continue button below. </p> - <form> - <input type="submit" value="Continue" name="continue"> - </form> ]]></entry><entry key='waiting-room-instructions'><![CDATA[ -<h1>Waiting Room</h1> +<h1>Please Wait</h1><hr><p>Please wait while the other participants complete their tasks.</p> ]]> diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/resources/configuration/iu/2011/vote/round9.xml --- a/src/main/resources/configuration/iu/2011/vote/round9.xml +++ b/src/main/resources/configuration/iu/2011/vote/round9.xml @@ -19,22 +19,25 @@ <![CDATA[https://qtrial.qualtrics.com/SE/?SID=SV_e8rPe7yyhue5OVm&SURVEY_ID={surveyId}]]></entry> -<entry key="last-round-debriefing"> +<entry key='survey-instructions'><![CDATA[ - <p> - This was the last round, but not the end of the experiment. We will now - determine your payments. While we are doing this, we request that you - carefully fill out a brief survey. - </p> - <p> - When we are ready we will call you one by one to the room next door. We will - pay you there in private. Please wait until your computer number is called, - and then proceed to the room next door to turn in your computer number and - your survey. - </p> - <p> - Please answer the survey carefully and thank you for participating. - </p> + <h1>Survey</h1> + <hr> + <p> + We would like to again ask you some quick questions. Please <a href='{surveyUrl}'>click here</a> to begin the survey. + </p> + <p> + We will continue after all of the surveys have been completed by all the + participants in the room. Please press the "Continue" button at the + bottom of the screen after you have successfully completed the survey. + </p> + <p> + If you encounter any problems with the survey <b>please inform the experimenter</b>. + </p> + <br> + <form> + <input type="submit" value="Continue" name="continue"> + </form> ]]></entry> diff -r da8f368535e463ba02486c618b09828c533ebb5d -r 14f5d16b9584e8d1c699fd9c63946844370cc9ac src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -244,15 +244,16 @@ Your <b>total income</b> is <b>{clientData.grandTotalIncome}</b>. </p> {if (showExitInstructions)} -<h2>Exit Survey</h2> +<h2>Final Round</h2><hr> -<p> -This was the last round, but not the end of the experiment. We ask that you please carefully fill out a brief survey as we prepare your payments. -</p> + <p>This was the last round of the experiment.</p><h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +Please wait quietly while we prepare your payments. When payments are ready we will +call you up one by one. Please wait until your computer number, +<b>{clientData.id}</b>, is called before coming up to receive payment. Thank you +for participating. </p> {endif} ]]> @@ -308,16 +309,12 @@ <p><b>Do you have any questions?</b> If you have any questions at this time, raise your hand and someone will come over to your station and answer it. - Otherwise, please click the continue button below. </p> - <form> - <input type="submit" value="Continue" name="continue"> - </form> ]]></entry><entry key='waiting-room-instructions'><![CDATA[ -<h1>Waiting Room</h1> +<h1>Please Wait</h1><hr><p>Please wait while the other participants complete their tasks.</p> ]]> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 07:11:40
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/da8f368535e4/ changeset: da8f368535e4 user: alllee date: 2012-01-30 08:11:29 summary: updating ignore set affected #: 1 file diff -r 5b5cf9c8fd6503ab114dc42a2266d796edfc75dd -r da8f368535e463ba02486c618b09828c533ebb5d .hgignore --- a/.hgignore +++ b/.hgignore @@ -1,11 +1,16 @@ syntax:glob - +src/main/resources/configuration/*.* *~ target *.jar -experiment-data/* +experiment-data build.properties -*.log -*.log.* +*.log* .classpath .project +tags +*.zip +manifest.mf +.settings +*.orig + Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 06:46:31
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/5b5cf9c8fd65/ changeset: 5b5cf9c8fd65 user: alllee date: 2012-01-30 07:46:18 summary: minor wording changes to waiting room instructions, updating vote treatment with voting results template changes affected #: 2 files diff -r ea1bc3108455b3683866c251aee35a6b19429491 -r 5b5cf9c8fd6503ab114dc42a2266d796edfc75dd src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -319,7 +319,7 @@ <![CDATA[ <h1>Waiting Room</h1><hr> -<p>Please wait while the rest of the participants to complete their tasks.</p> +<p>Please wait while the other participants complete their tasks.</p> ]]></entry> diff -r ea1bc3108455b3683866c251aee35a6b19429491 -r 5b5cf9c8fd6503ab114dc42a2266d796edfc75dd src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -260,7 +260,14 @@ <entry key='voting-results'><![CDATA[ <h1>Nomination Results</h1> - <h2>Selected Strategy</h2> + <hr> + <table border=3 cellspacing=3 cellpadding=3> + <tr><th>Strategy</th><th>Nominations</th></tr> + {nominations: { strategyNomination | + <tr bgcolor="#{if (strategyNomination.selected)}FFFFCC{else}CCCCCC{endif}"><td>{strategyNomination.strategy}</td><td>{strategyNomination.nominations}</td></tr> + }} + </table> + <h1>Selected Strategy</h1><hr> {if (tiebreaker)} <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> @@ -268,4 +275,52 @@ <p><b> {first(selectedRules)} </b></p> ]]></entry> +<entry key='initial-voting-instructions'> + <![CDATA[ +<h1>Important New Instructions!</h1> +<h2>Strategies for managing how players collect tokens for the rest of the experiment</h2> +<hr> +<p> +In a moment, you will have the option to implement one of five strategies for how you +and the three other people in your group collect tokens for the rest of the +experiment. +</p> + +<h2>Procedure for Deciding the Strategy</h2> +<hr> +<p> + Each of the {self.clientsPerGroup} people in your group can nominate one of the five + potential strategies. The single strategy that receives the most nominations + wins. +</p> +<p> + <b>If there is a tie</b>, one of the tied options will be selected at random by + the computer. Each of the tied strategies will have an equal chance of being + selected. +</p> + +<h2>Implementation</h2> +<hr> + <p>Neither the computer nor the experimenter will intervene to implement the + strategy. + </p> + + <p> + <b>Do you have any questions?</b> If you have any questions at this time, + raise your hand and someone will come over to your station and answer it. + Otherwise, please click the continue button below. + </p> + <form> + <input type="submit" value="Continue" name="continue"> + </form> + ]]> +</entry> +<entry key='waiting-room-instructions'> +<![CDATA[ +<h1>Waiting Room</h1> +<hr> +<p>Please wait while the other participants complete their tasks.</p> +]]> +</entry> + </properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-30 06:06:58
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/e076a4ba6648/ changeset: e076a4ba6648 user: alllee date: 2012-01-30 07:06:36 summary: transition to waiting screen after survey submission affected #: 3 files diff -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f -r e076a4ba66489cfcbf30f8a9f5b3e78e947494f9 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -176,7 +176,7 @@ }); addEventProcessor(new EventTypeProcessor<ShowVoteScreenRequest>(ShowVoteScreenRequest.class) { public void handle(ShowVoteScreenRequest request) { - getGameWindow2D().showVoteScreen(); + getGameWindow2D().showVotingScreen(); } }); addEventProcessor(new EventTypeProcessor<ShowSurveyInstructionsRequest>(ShowSurveyInstructionsRequest.class) { diff -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f -r e076a4ba66489cfcbf30f8a9f5b3e78e947494f9 src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -156,7 +156,7 @@ } public String getWaitingRoomInstructions() { - return assistant.getProperty("waiting-room-instructions"); + return assistant.getProperty("waiting-room-instructions", "<h1>Please wait</h1><hr><p>Please wait while the rest of the participants complete the task.</p>"); } } diff -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f -r e076a4ba66489cfcbf30f8a9f5b3e78e947494f9 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -739,9 +739,8 @@ } }); } - - - private JPanel getVotingPanel() { + + public void showVotingScreen() { if (votingPanel == null) { votingPanel = new JPanel(); votingPanel.setLayout(new BoxLayout(votingPanel, BoxLayout.Y_AXIS)); @@ -752,10 +751,10 @@ votingForm = new VotingForm(client); votingPanel.add(votingForm); votingPanel.setName(VotingForm.NAME); + add(votingPanel); } - return votingPanel; + showPanel(VotingForm.NAME); } - public void showVotingResults(final List<ForagingStrategy> selectedRules, final Map<ForagingStrategy, Integer> votingResults) { SwingUtilities.invokeLater(new Runnable() { @@ -770,14 +769,6 @@ }); } - - public void showVoteScreen() { - if (votingPanel == null) { - add(getVotingPanel()); - } - showPanel(VotingForm.NAME); - } - public void showSurveyInstructions() { SwingUtilities.invokeLater(new Runnable() { public void run() { Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-28 08:25:26
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/a690c3cae37d/ changeset: a690c3cae37d user: alllee date: 2012-01-28 08:22:58 summary: adding model object for ForagingNomination to render in StringTemplate properly affected #: 1 file diff -r f0dde60eb1da8e56456d2ae95c05980b9b13a5f8 -r a690c3cae37da929965e6292ebcee82431189312 src/main/java/edu/asu/commons/foraging/rules/iu/ForagingNomination.java --- /dev/null +++ b/src/main/java/edu/asu/commons/foraging/rules/iu/ForagingNomination.java @@ -0,0 +1,23 @@ +package edu.asu.commons.foraging.rules.iu; + +public class ForagingNomination { + + private final ForagingStrategy strategy; + private final Integer nominations; + private final boolean selectedStrategy; + public ForagingNomination(ForagingStrategy strategy, Integer nominations, boolean selectedStrategy) { + this.strategy = strategy; + this.nominations = nominations; + this.selectedStrategy = selectedStrategy; + } + public ForagingStrategy getStrategy() { + return strategy; + } + public Integer getNominations() { + return nominations; + } + public boolean isSelectedStrategy() { + return selectedStrategy; + } + +} https://bitbucket.org/virtualcommons/foraging/changeset/c3edd5171f5d/ changeset: c3edd5171f5d user: alllee date: 2012-01-28 09:25:05 summary: using ForagingStrategyNomination model object to properly render the voting results template and using ClientReadyEvent in lieu of specialized SurveyCompletedEvents. affected #: 9 files diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -2,6 +2,7 @@ import java.awt.Dimension; import java.text.NumberFormat; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -20,6 +21,7 @@ import edu.asu.commons.foraging.model.ResourceDispenser; import edu.asu.commons.foraging.model.ServerDataModel; import edu.asu.commons.foraging.rules.iu.ForagingStrategy; +import edu.asu.commons.foraging.rules.iu.ForagingStrategyNomination; import edu.asu.commons.net.Identifier; import edu.asu.commons.util.Duration; @@ -558,7 +560,7 @@ } public String getInitialVotingInstructions() { - return createStringTemplate(getProperty("initial-voting-instructions", getParentConfiguration().getInitialVotingInstructions())).render(); + return createStringTemplate(getProperty("initial-voting-instructions")).render(); } public List<ForagingStrategy> getForagingRules() { @@ -725,7 +727,11 @@ } public String generateVotingResults(List<ForagingStrategy> selectedRules, Map<ForagingStrategy, Integer> nominations) { - TreeMap<ForagingStrategy, Integer> sortedNominations = new TreeMap<ForagingStrategy, Integer>(nominations); + List<ForagingStrategyNomination> sortedNominations = new ArrayList<ForagingStrategyNomination>(); + for (Map.Entry<ForagingStrategy, Integer> entry: new TreeMap<ForagingStrategy, Integer>(nominations).entrySet()) { + ForagingStrategy strategy = entry.getKey(); + sortedNominations.add(new ForagingStrategyNomination(strategy, entry.getValue(), strategy.equals(selectedRules.get(0)))); + } setSelectedRules(selectedRules); ST template = createStringTemplate(getVotingResultsTemplate()); template.add("nominations", sortedNominations); diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -1,7 +1,6 @@ package edu.asu.commons.foraging.conf; import java.text.NumberFormat; -import java.util.Locale; import org.stringtemplate.v4.ST; @@ -156,4 +155,8 @@ return assistant.getIntProperty("server-sleep-interval", 50); } + public String getWaitingRoomInstructions() { + return assistant.getProperty("waiting-room-instructions"); + } + } diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java @@ -45,6 +45,13 @@ public int getBoardHeight() { return boardHeight; } + + public ServerConfiguration getExperimentConfiguration() { + if (roundConfiguration != null) { + return roundConfiguration.getParentConfiguration(); + } + return null; + } public RoundConfiguration getRoundConfiguration() { return roundConfiguration; diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/rules/iu/ForagingNomination.java --- a/src/main/java/edu/asu/commons/foraging/rules/iu/ForagingNomination.java +++ /dev/null @@ -1,23 +0,0 @@ -package edu.asu.commons.foraging.rules.iu; - -public class ForagingNomination { - - private final ForagingStrategy strategy; - private final Integer nominations; - private final boolean selectedStrategy; - public ForagingNomination(ForagingStrategy strategy, Integer nominations, boolean selectedStrategy) { - this.strategy = strategy; - this.nominations = nominations; - this.selectedStrategy = selectedStrategy; - } - public ForagingStrategy getStrategy() { - return strategy; - } - public Integer getNominations() { - return nominations; - } - public boolean isSelectedStrategy() { - return selectedStrategy; - } - -} diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/rules/iu/ForagingStrategyNomination.java --- /dev/null +++ b/src/main/java/edu/asu/commons/foraging/rules/iu/ForagingStrategyNomination.java @@ -0,0 +1,23 @@ +package edu.asu.commons.foraging.rules.iu; + +public class ForagingStrategyNomination { + + private final ForagingStrategy strategy; + private final Integer nominations; + private final boolean selected; + public ForagingStrategyNomination(ForagingStrategy strategy, Integer nominations, boolean selected) { + this.strategy = strategy; + this.nominations = nominations; + this.selected = selected; + } + public ForagingStrategy getStrategy() { + return strategy; + } + public Integer getNominations() { + return nominations; + } + public boolean isSelected() { + return selected; + } + +} diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -22,6 +22,7 @@ import edu.asu.commons.event.ChatEvent; import edu.asu.commons.event.ChatRequest; import edu.asu.commons.event.ClientMessageEvent; +import edu.asu.commons.event.ClientReadyEvent; import edu.asu.commons.event.EndRoundRequest; import edu.asu.commons.event.EventTypeProcessor; import edu.asu.commons.event.FacilitatorMessageEvent; @@ -64,7 +65,6 @@ import edu.asu.commons.foraging.event.RuleSelectedUpdateEvent; import edu.asu.commons.foraging.event.RuleVoteRequest; import edu.asu.commons.foraging.event.SanctionAppliedEvent; -import edu.asu.commons.foraging.event.SurveyCompletedEvent; import edu.asu.commons.foraging.event.SurveyIdSubmissionRequest; import edu.asu.commons.foraging.event.SynchronizeClientEvent; import edu.asu.commons.foraging.event.TrustGameResultsFacilitatorEvent; @@ -301,18 +301,16 @@ } } }); - addEventProcessor(new EventTypeProcessor<SurveyCompletedEvent>(SurveyCompletedEvent.class) { - private int submittedSurveys = 0; + addEventProcessor(new EventTypeProcessor<ClientReadyEvent>(ClientReadyEvent.class) { + private int readyClients = 0; @Override - public void handle(SurveyCompletedEvent event) { - if (getCurrentRoundConfiguration().isExternalSurveyEnabled()) { - submittedSurveys++; - sendFacilitatorMessage(String.format("Received %d of %d surveys: %s", submittedSurveys, clients.size(), event)); - if (submittedSurveys >= clients.size()) { - sendFacilitatorMessage("All surveys have been reported as completed, ready to continue."); - submittedSurveys = 0; - } - } + public void handle(ClientReadyEvent event) { + readyClients++; + sendFacilitatorMessage(String.format("%d of %d clients are ready: %s", readyClients, clients.size(), event)); + if (readyClients >= clients.size()) { + sendFacilitatorMessage("All clients are ready to move on."); + readyClients = 0; + } } }); diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -41,6 +41,7 @@ import javax.swing.text.html.HTMLEditorKit; import javax.swing.text.html.StyleSheet; +import edu.asu.commons.event.ClientReadyEvent; import edu.asu.commons.event.Event; import edu.asu.commons.event.EventChannel; import edu.asu.commons.foraging.client.ClientDataModel; @@ -53,7 +54,6 @@ import edu.asu.commons.foraging.event.QuizResponseEvent; import edu.asu.commons.foraging.event.RealTimeSanctionRequest; import edu.asu.commons.foraging.event.ResetTokenDistributionRequest; -import edu.asu.commons.foraging.event.SurveyCompletedEvent; import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.model.ClientData; import edu.asu.commons.foraging.model.Direction; @@ -190,17 +190,18 @@ } } - private ActionListener createSurveyFinishedListener() { + private ActionListener createClientReadyListener(final String confirmationMessage) { return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int selectedOption = JOptionPane.showConfirmDialog(getPanel(), - dataModel.getRoundConfiguration().getSurveyConfirmationMessage(), - "Confirm survey completion", JOptionPane.YES_NO_OPTION); + confirmationMessage, + "Continue?", JOptionPane.YES_NO_OPTION); switch (selectedOption) { case JOptionPane.YES_OPTION: - showInstructions(); - client.transmit(new SurveyCompletedEvent(client.getId())); + setInstructions(dataModel.getExperimentConfiguration().getWaitingRoomInstructions()); + showInstructionsPanel(); + client.transmit(new ClientReadyEvent(client.getId(), confirmationMessage)); instructionsEditorPane.setActionListener(null); break; default: @@ -731,6 +732,8 @@ public void showInitialVotingInstructions() { SwingUtilities.invokeLater(new Runnable() { public void run() { +// instructionsEditorPane.setActionListener(null); +// instructionsEditorPane.setActionListener(createClientReadyListener("Are you ready to submit your nominations?")); setInstructions(dataModel.getRoundConfiguration().getInitialVotingInstructions()); showInstructionsPanel(); } @@ -779,7 +782,7 @@ SwingUtilities.invokeLater(new Runnable() { public void run() { instructionsEditorPane.setActionListener(null); - instructionsEditorPane.setActionListener(createSurveyFinishedListener()); + instructionsEditorPane.setActionListener(createClientReadyListener(dataModel.getRoundConfiguration().getSurveyConfirmationMessage())); setInstructions(dataModel.getRoundConfiguration().getSurveyInstructions(dataModel.getId())); showInstructionsPanel(); } diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/resources/configuration/iu/2011/vote-punish/round4.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/round4.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/round4.xml @@ -65,43 +65,6 @@ </entry> -<entry key='initial-voting-instructions'> - <![CDATA[ -<h1>Important New Instructions!</h1> -<h2>Strategies for managing how players collect tokens for the rest of the experiment</h2> -<hr> -<p> -In a moment, you will have the option to implement one of five strategies for how you -and the three other people in your group collect tokens for the rest of the -experiment. -</p> - -<h2>Procedure for Deciding the Strategy</h2> -<hr> -<p> - Each of the {self.clientsPerGroup} people in your group can nominate one of the five - potential strategies. The single strategy that receives the most nominations - wins. -</p> -<p> - <b>If there is a tie</b>, one of the tied options will be selected at random by - the computer. Each of the tied strategies will have an equal chance of being - selected. -</p> - -<h2>Implementation</h2> -<hr> - <p>Neither the computer nor the experimenter will intervene to implement the - strategy. - </p> - - <p> - <b>Do you have any questions?</b> If you have any questions at this time, - raise your hand and someone will come over to your station and answer it. - </p> - ]]> -</entry> - <entry key='voting-instructions'><![CDATA[ diff -r a690c3cae37da929965e6292ebcee82431189312 -r c3edd5171f5d267af8e18e6451e94fdc36c9e88f src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -263,8 +263,8 @@ <hr><table border=3 cellspacing=3 cellpadding=3><tr><th>Strategy</th><th>Nominations</th></tr> - {nominations.keys: { rule | - <tr bgcolor="#{if (rule.equals(first(selectedRules)))}FFFFCC{else}CCCCCC{endif}"><td>{rule}</td><td>{nominations.(rule)}</td></tr> + {nominations: { strategyNomination | + <tr bgcolor="#{if (strategyNomination.selected)}FFFFCC{else}CCCCCC{endif}"><td>{strategyNomination.strategy}</td><td>{strategyNomination.nominations}</td></tr> }} </table><h1>Selected Strategy</h1> @@ -275,4 +275,52 @@ <p><b> {first(selectedRules)} </b></p> ]]></entry> +<entry key='initial-voting-instructions'> + <![CDATA[ +<h1>Important New Instructions!</h1> +<h2>Strategies for managing how players collect tokens for the rest of the experiment</h2> +<hr> +<p> +In a moment, you will have the option to implement one of five strategies for how you +and the three other people in your group collect tokens for the rest of the +experiment. +</p> + +<h2>Procedure for Deciding the Strategy</h2> +<hr> +<p> + Each of the {self.clientsPerGroup} people in your group can nominate one of the five + potential strategies. The single strategy that receives the most nominations + wins. +</p> +<p> + <b>If there is a tie</b>, one of the tied options will be selected at random by + the computer. Each of the tied strategies will have an equal chance of being + selected. +</p> + +<h2>Implementation</h2> +<hr> + <p>Neither the computer nor the experimenter will intervene to implement the + strategy. + </p> + + <p> + <b>Do you have any questions?</b> If you have any questions at this time, + raise your hand and someone will come over to your station and answer it. + Otherwise, please click the continue button below. + </p> + <form> + <input type="submit" value="Continue" name="continue"> + </form> + ]]> +</entry> +<entry key='waiting-room-instructions'> +<![CDATA[ +<h1>Waiting Room</h1> +<hr> +<p>Please wait while the rest of the participants to complete their tasks.</p> +]]> +</entry> + </properties> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-28 00:19:18
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/1f6bea9050a9/ changeset: 1f6bea9050a9 user: alllee date: 2012-01-28 01:18:57 summary: replacing VotingForm with results with data injected into the nomination results template affected #: 6 files diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.Map; import java.util.Properties; +import java.util.TreeMap; import java.util.concurrent.TimeUnit; import org.stringtemplate.v4.ST; @@ -723,9 +724,11 @@ return getProperty("submitted-vote-instructions", "<h1>Submitted</h1><hr><p>Your nomination has been recorded. The final results of the nomination will be shown once all the nominations in your group have been received.</p>"); } - public String getVotingResults(List<ForagingRule> selectedRules) { + public String generateVotingResults(List<ForagingRule> selectedRules, Map<ForagingRule, Integer> nominations) { + TreeMap<ForagingRule, Integer> sortedNominations = new TreeMap<ForagingRule, Integer>(nominations); setSelectedRules(selectedRules); ST template = createStringTemplate(getVotingResultsTemplate()); + template.add("nominations", sortedNominations); template.add("tiebreaker", selectedRules.size() > 1); template.add("selectedRules", selectedRules); return template.render(); diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.conf; import java.text.NumberFormat; +import java.util.Locale; import org.stringtemplate.v4.ST; @@ -33,7 +34,7 @@ private static final String SAME_ROUND_AS_PREVIOUS_INSTRUCTIONS = "<h3>Round {self.roundNumber} Instructions</h3><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p>"; private static final String DEFAULT_LOG_FILE_DESTINATION = "foraging-server.log"; private static final double DEFAULT_DOLLARS_PER_TOKEN = .02d; - + public ServerConfiguration() { super(); } diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/FacilitatorWindow.java @@ -59,8 +59,6 @@ private JLabel timeLeftLabel; - private JMenuItem copyToClipboardMenuItem; - private JMenuItem showInstructionsMenuItem; private JMenuItem startRoundMenuItem; @@ -216,7 +214,8 @@ }); menu.add(menuItem); - copyToClipboardMenuItem = createMenuItem(menu, "Copy to clipboard", new ActionListener() { + // create copy to clipboard menu item + createMenuItem(menu, "Copy to clipboard", new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String text = informationEditorPane.getSelectedText(); diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -109,13 +109,11 @@ private Identifier facilitatorId; - // FIXME: use java.util.concurrent constructs instead? CountDownLatch / CyclicBarrier? + // FIXME: investigate using java.util.concurrent constructs instead, e.g., CountDownLatch / CyclicBarrier private final Object roundSignal = new Object(); private final Object quizSignal = new Object(); private final Object facilitatorSignal = new Object(); private final Object agentDesignSignal = new Object(); - // FIXME: these latches don't quite do what we want. We need a way to reset them at each round. - // private CountDownLatch postRoundSanctionLatch; private StateMachine stateMachine = new ForagingStateMachine(); diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -119,6 +119,7 @@ private JPanel votingPanel; private VotingForm votingForm; private HtmlEditorPane votingInstructionsEditorPane; + private JScrollPane votingInstructionsScrollPane; // private EnergyLevel energyLevel; @@ -742,9 +743,9 @@ votingPanel = new JPanel(); votingPanel.setLayout(new BoxLayout(votingPanel, BoxLayout.Y_AXIS)); votingInstructionsEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); - JScrollPane scrollPane = new JScrollPane(votingInstructionsEditorPane); + votingInstructionsScrollPane = new JScrollPane(votingInstructionsEditorPane); votingInstructionsEditorPane.setText(client.getCurrentRoundConfiguration().getVotingInstructions()); - votingPanel.add(scrollPane); + votingPanel.add(votingInstructionsScrollPane); votingForm = new VotingForm(client); votingPanel.add(votingForm); votingPanel.setName(VotingForm.NAME); @@ -756,12 +757,11 @@ public void showVotingResults(final List<ForagingRule> selectedRules, final Map<ForagingRule, Integer> votingResults) { SwingUtilities.invokeLater(new Runnable() { public void run() { - VotingForm resultsForm = new VotingForm(client, votingResults); - votingPanel.remove(votingForm); - votingPanel.add(resultsForm); + votingPanel.removeAll(); + votingPanel.add(votingInstructionsScrollPane); votingPanel.revalidate(); RoundConfiguration currentRoundConfiguration = client.getCurrentRoundConfiguration(); - votingInstructionsEditorPane.setText(currentRoundConfiguration.getVotingResults(selectedRules)); + votingInstructionsEditorPane.setText(currentRoundConfiguration.generateVotingResults(selectedRules, votingResults)); showPanel(VotingForm.NAME); } }); diff -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 -r 1f6bea9050a9581fbf93618fa9f2499e7535a8e1 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -260,7 +260,14 @@ <entry key='voting-results'><![CDATA[ <h1>Nomination Results</h1> - <h2>Selected Strategy</h2> + <hr> + <table border=3 cellspacing=3 cellpadding=3> + <tr><th>Strategy</th><th>Nominations</th></tr> + {nominations.keys: { rule | + <tr bgcolor="#{if (rule.equals(first(selectedRules)))}FFFFCC{else}CCCCCC{endif}"><td>{rule}</td><td>{nominations.(rule)}</td></tr> + }} + </table> + <h1>Selected Strategy</h1><hr> {if (tiebreaker)} <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-27 00:12:20
|
5 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/19cb60c33bbf/ changeset: 19cb60c33bbf user: alllee date: 2012-01-26 21:25:33 summary: minor adjustments to instructions, making property names consistent, updating exit instructions affected #: 3 files diff -r 73ddec992afaa3c2b93cd1964c56671b04c97390 -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -294,7 +294,7 @@ * Returns the instructions for this round. If undefined at the round level it uses default instructions at the parent ServerConfiguration level. */ public String getInstructions() { - ST template = createStringTemplate(getProperty("instructions", getParentConfiguration().getSameRoundAsPreviousInstructions())); + ST template = createStringTemplate(getProperty("instructions", getParentConfiguration().getSameAsPreviousRoundInstructions())); // FIXME: probably should just lift these out into methods on RoundConfiguration // and refer to them as self.durationInMinutes or self.dollarsPerTokenCurrencyString, etc. template.add("duration", inMinutes(getDuration()) + " minutes"); diff -r 73ddec992afaa3c2b93cd1964c56671b04c97390 -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/ServerConfiguration.java @@ -30,7 +30,7 @@ private static final double DEFAULT_SHOW_UP_PAYMENT = 5.0d; private static final double DEFAULT_QUIZ_CORRECT_ANSWER_REWARD = 0.50d; - private static final String SAME_ROUND_AS_PREVIOUS_INSTRUCTIONS = "<h3>Round {roundNumber} Instructions</h3><hr><p>Round {roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p>"; + private static final String SAME_ROUND_AS_PREVIOUS_INSTRUCTIONS = "<h3>Round {self.roundNumber} Instructions</h3><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>The length of this round is {duration}.</p><p>If you have any questions please raise your hand. <b>Do you have any questions so far?</b></p>"; private static final String DEFAULT_LOG_FILE_DESTINATION = "foraging-server.log"; private static final double DEFAULT_DOLLARS_PER_TOKEN = .02d; @@ -96,8 +96,8 @@ return st.render(); } - public String getSameRoundAsPreviousInstructions() { - return assistant.getStringProperty("sameRoundAsPreviousInstructions", SAME_ROUND_AS_PREVIOUS_INSTRUCTIONS); + public String getSameAsPreviousRoundInstructions() { + return assistant.getStringProperty("same-as-previous-round-instructions", SAME_ROUND_AS_PREVIOUS_INSTRUCTIONS); } public String getFieldOfVisionInstructions() { diff -r 73ddec992afaa3c2b93cd1964c56671b04c97390 -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d src/main/resources/configuration/asu/2011/t1/server.xml --- a/src/main/resources/configuration/asu/2011/t1/server.xml +++ b/src/main/resources/configuration/asu/2011/t1/server.xml @@ -179,7 +179,7 @@ </p> ]]></entry> -<entry key="sameRoundAsPreviousInstructions"> +<entry key="same-as-previous-round-instructions"><![CDATA[ <h3>Round {self.roundNumber} Instructions</h3><hr> @@ -236,7 +236,15 @@ <h2>Payment</h2><hr><p> -When payments are ready we will call you up one by one. Please wait until your computer number, <b>{clientData.id}</b>, is called to turn in your survey and receive payment. Please answer the survey carefully and thank you for participating. +When payments are ready we will call you up one by one. Please wait until your +computer number, <b>{clientData.id}</b>, is called to turn in your survey and +receive payment. Please answer the survey carefully and thank you for +participating. +</p> +<p> +NOTE: Please <b>answer the survey completely (there may be a back side)</b> +and <b>bring all your belongings with you</b> when you come up to +receive your payment to help us speed up the payment process. </p> {endif} ]]> https://bitbucket.org/virtualcommons/foraging/changeset/e38c557207fe/ changeset: e38c557207fe user: alllee date: 2012-01-27 01:09:39 summary: starting to thread ShowExitInstructionsRequest support into client and server. at this point the TrustGameResultsClientEvent is no longer used but will be kept around in case we need to be more flexible about when we display trust game results to participants. affected #: 15 files diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/client/ForagingClient.java --- a/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java +++ b/src/main/java/edu/asu/commons/foraging/client/ForagingClient.java @@ -17,6 +17,8 @@ import edu.asu.commons.event.EventChannel; import edu.asu.commons.event.EventTypeProcessor; import edu.asu.commons.event.SetConfigurationEvent; +import edu.asu.commons.event.ShowExitInstructionsRequest; +import edu.asu.commons.event.ShowInstructionsRequest; import edu.asu.commons.event.SocketIdentifierUpdateRequest; import edu.asu.commons.foraging.conf.RoundConfiguration; import edu.asu.commons.foraging.conf.ServerConfiguration; @@ -33,15 +35,14 @@ import edu.asu.commons.foraging.event.RoundStartedEvent; import edu.asu.commons.foraging.event.RuleSelectedUpdateEvent; import edu.asu.commons.foraging.event.RuleVoteRequest; -import edu.asu.commons.foraging.event.ShowInstructionsRequest; import edu.asu.commons.foraging.event.ShowSurveyInstructionsRequest; import edu.asu.commons.foraging.event.ShowTrustGameRequest; import edu.asu.commons.foraging.event.ShowVoteScreenRequest; import edu.asu.commons.foraging.event.ShowVotingInstructionsRequest; import edu.asu.commons.foraging.event.SurveyIdSubmissionRequest; import edu.asu.commons.foraging.event.SynchronizeClientEvent; -import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.event.TrustGameSubmissionRequest; +import edu.asu.commons.foraging.model.GroupDataModel; import edu.asu.commons.foraging.rules.iu.ForagingRule; import edu.asu.commons.foraging.server.ForagingServer; import edu.asu.commons.foraging.ui.GameWindow; @@ -215,17 +216,14 @@ addEventProcessor(new EventTypeProcessor<SynchronizeClientEvent>(SynchronizeClientEvent.class) { public void handle(SynchronizeClientEvent event) { dataModel.setGroupDataModel(event.getGroupDataModel()); - -// if (dataModel.is2dExperiment()) { -// dataModel.update(event, getGameWindow2D()); -// } getGameWindow().update(event.getTimeLeft()); } }); - addEventProcessor(new EventTypeProcessor<TrustGameResultsClientEvent>(TrustGameResultsClientEvent.class) { + addEventProcessor(new EventTypeProcessor<ShowExitInstructionsRequest>(ShowExitInstructionsRequest.class) { @Override - public void handle(TrustGameResultsClientEvent event) { - getGameWindow2D().updateDebriefingWith(event); + public void handle(ShowExitInstructionsRequest request) { + dataModel.setGroupDataModel((GroupDataModel) request.getDataModel()); + getGameWindow2D().showExitInstructions(); } }); initialize2DEventProcessors(); @@ -273,7 +271,7 @@ //System.out.println("Sending post round sanction request"); SwingUtilities.invokeLater(new Runnable() { public void run() { - getGameWindow2D().switchInstructionsPane(); + getGameWindow2D().showInstructionsPanel(); } }); super.transmit(request); diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowFinalRoundDebriefingRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowFinalRoundDebriefingRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/ShowFinalRoundDebriefingRequest.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.event; import edu.asu.commons.event.AbstractEvent; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.net.Identifier; /** diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowInstructionsRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowInstructionsRequest.java +++ /dev/null @@ -1,27 +0,0 @@ -package edu.asu.commons.foraging.event; - -import edu.asu.commons.event.AbstractEvent; -import edu.asu.commons.net.Identifier; - -/** - * $Id$ - * - * - * - * @author <a href='mailto:all...@as...'>Allen Lee</a> - * @version $Rev$ - */ -public class ShowInstructionsRequest extends AbstractEvent implements ShowRequest<ShowInstructionsRequest> { - - private static final long serialVersionUID = 3774308614796618926L; - - public ShowInstructionsRequest(Identifier id) { - super(id); - } - - @Override - public ShowInstructionsRequest copy(Identifier id) { - return new ShowInstructionsRequest(id); - } - -} diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowRequest.java +++ /dev/null @@ -1,16 +0,0 @@ -package edu.asu.commons.foraging.event; - -import edu.asu.commons.event.FacilitatorRequest; -import edu.asu.commons.net.Identifier; - -/** - * $Id$ - * - * Marker interface for facilitator requests that should just pass through directly to the client. - * - * @author <a href='mailto:all...@as...'>Allen Lee</a> - * @version $Rev$ - */ -public interface ShowRequest<T extends ShowRequest<T>> extends FacilitatorRequest { - public T copy(Identifier id); -} diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowSurveyInstructionsRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowSurveyInstructionsRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/ShowSurveyInstructionsRequest.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.event; import edu.asu.commons.event.AbstractEvent; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.net.Identifier; public class ShowSurveyInstructionsRequest extends AbstractEvent implements ShowRequest<ShowSurveyInstructionsRequest> { diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowTrustGameRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowTrustGameRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/ShowTrustGameRequest.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.event; import edu.asu.commons.event.AbstractEvent; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.net.Identifier; public class ShowTrustGameRequest extends AbstractEvent implements ShowRequest<ShowTrustGameRequest> { diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowVoteScreenRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowVoteScreenRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/ShowVoteScreenRequest.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.event; import edu.asu.commons.event.AbstractEvent; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.net.Identifier; public class ShowVoteScreenRequest extends AbstractEvent implements ShowRequest<ShowVoteScreenRequest> { diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/ShowVotingInstructionsRequest.java --- a/src/main/java/edu/asu/commons/foraging/event/ShowVotingInstructionsRequest.java +++ b/src/main/java/edu/asu/commons/foraging/event/ShowVotingInstructionsRequest.java @@ -1,6 +1,7 @@ package edu.asu.commons.foraging.event; import edu.asu.commons.event.AbstractEvent; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.net.Identifier; public class ShowVotingInstructionsRequest extends AbstractEvent implements ShowRequest<ShowVotingInstructionsRequest> { diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/event/TrustGameResultsClientEvent.java --- a/src/main/java/edu/asu/commons/foraging/event/TrustGameResultsClientEvent.java +++ b/src/main/java/edu/asu/commons/foraging/event/TrustGameResultsClientEvent.java @@ -2,6 +2,7 @@ import edu.asu.commons.event.AbstractEvent; import edu.asu.commons.foraging.model.ClientData; +import edu.asu.commons.foraging.model.GroupDataModel; import edu.asu.commons.foraging.model.TrustGameResult; /** @@ -18,6 +19,9 @@ this.clientData = clientData; this.trustGameResult = result; } + public GroupDataModel getGroupDataModel() { + return clientData.getGroupDataModel(); + } public ClientData getClientData() { return clientData; } diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java --- a/src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java +++ b/src/main/java/edu/asu/commons/foraging/facilitator/Facilitator.java @@ -13,6 +13,7 @@ import edu.asu.commons.event.EventTypeProcessor; import edu.asu.commons.event.FacilitatorMessageEvent; import edu.asu.commons.event.SetConfigurationEvent; +import edu.asu.commons.event.ShowInstructionsRequest; import edu.asu.commons.facilitator.BaseFacilitator; import edu.asu.commons.foraging.conf.RoundConfiguration; import edu.asu.commons.foraging.conf.ServerConfiguration; @@ -21,7 +22,6 @@ import edu.asu.commons.foraging.event.FacilitatorSanctionUpdateEvent; import edu.asu.commons.foraging.event.FacilitatorUpdateEvent; import edu.asu.commons.foraging.event.QuizCompletedEvent; -import edu.asu.commons.foraging.event.ShowInstructionsRequest; import edu.asu.commons.foraging.event.ShowSurveyInstructionsRequest; import edu.asu.commons.foraging.event.ShowTrustGameRequest; import edu.asu.commons.foraging.event.ShowVoteScreenRequest; diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/ForagingDataModel.java @@ -5,6 +5,7 @@ import edu.asu.commons.event.EventChannel; import edu.asu.commons.experiment.DataModel; import edu.asu.commons.foraging.conf.RoundConfiguration; +import edu.asu.commons.foraging.conf.ServerConfiguration; @@ -17,7 +18,7 @@ * @version $Revision$ */ -public abstract class ForagingDataModel implements DataModel<RoundConfiguration> { +public abstract class ForagingDataModel implements DataModel<ServerConfiguration, RoundConfiguration> { private final static long serialVersionUID = 7171398197039872068L; diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java --- a/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java +++ b/src/main/java/edu/asu/commons/foraging/model/GroupDataModel.java @@ -17,6 +17,7 @@ import edu.asu.commons.event.EventChannel; import edu.asu.commons.experiment.DataModel; import edu.asu.commons.foraging.conf.RoundConfiguration; +import edu.asu.commons.foraging.conf.ServerConfiguration; import edu.asu.commons.foraging.event.ClientPositionUpdateEvent; import edu.asu.commons.foraging.event.EnforcementRankingRequest; import edu.asu.commons.foraging.event.LockResourceRequest; @@ -42,7 +43,7 @@ * @version $Revision$ */ -public class GroupDataModel implements Serializable, Comparable<GroupDataModel>, DataModel<RoundConfiguration> { +public class GroupDataModel implements Serializable, Comparable<GroupDataModel>, DataModel<ServerConfiguration, RoundConfiguration> { private static final long serialVersionUID = -4756267788191037505L; diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/server/ForagingServer.java --- a/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java +++ b/src/main/java/edu/asu/commons/foraging/server/ForagingServer.java @@ -28,6 +28,8 @@ import edu.asu.commons.event.FacilitatorRegistrationRequest; import edu.asu.commons.event.RoundStartedMarkerEvent; import edu.asu.commons.event.SetConfigurationEvent; +import edu.asu.commons.event.ShowExitInstructionsRequest; +import edu.asu.commons.event.ShowRequest; import edu.asu.commons.event.SocketIdentifierUpdateRequest; import edu.asu.commons.experiment.AbstractExperiment; import edu.asu.commons.experiment.IPersister; @@ -62,11 +64,9 @@ import edu.asu.commons.foraging.event.RuleSelectedUpdateEvent; import edu.asu.commons.foraging.event.RuleVoteRequest; import edu.asu.commons.foraging.event.SanctionAppliedEvent; -import edu.asu.commons.foraging.event.ShowRequest; import edu.asu.commons.foraging.event.SurveyCompletedEvent; import edu.asu.commons.foraging.event.SurveyIdSubmissionRequest; import edu.asu.commons.foraging.event.SynchronizeClientEvent; -import edu.asu.commons.foraging.event.TrustGameResultsClientEvent; import edu.asu.commons.foraging.event.TrustGameResultsFacilitatorEvent; import edu.asu.commons.foraging.event.TrustGameSubmissionEvent; import edu.asu.commons.foraging.event.TrustGameSubmissionRequest; @@ -711,7 +711,6 @@ // using an iterator to consume both players and ensure that a player doesn't // have the trust game calculated on them twice (except as a player 2 selection) - boolean lastRound = getConfiguration().isLastRound(); for (ListIterator<ClientData> iter = clientList.listIterator(); iter.hasNext();) { ClientData playerOne = iter.next(); ClientData playerTwo = first; @@ -729,15 +728,16 @@ logger.info("TRUST GAME: about to pair " + playerOne + " with " + playerTwo); TrustGameResult trustGameLog = serverDataModel.calculateTrustGame(playerOne, playerTwo); allTrustGameResults.add(trustGameLog); - if (lastRound) { - transmit(new TrustGameResultsClientEvent(playerOne, trustGameLog)); - transmit(new TrustGameResultsClientEvent(playerTwo, trustGameLog)); - } - sendFacilitatorMessage(String.format("Pairing %s with %s for trust game resulted in:\n%s", playerOne, playerTwo, trustGameLog)); } } + // show the exit instructions and update debriefing for all clients if this is the last round. + if (getConfiguration().isLastRound()) { + for (ClientData data: clients.values()) { + transmit(new ShowExitInstructionsRequest(data.getId(), data.getGroupDataModel())); + } + } transmitAndStore(new TrustGameResultsFacilitatorEvent(facilitatorId, serverDataModel, allTrustGameResults)); Utils.notify(facilitatorSignal); } diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/ui/ChatPanel.java --- a/src/main/java/edu/asu/commons/foraging/ui/ChatPanel.java +++ b/src/main/java/edu/asu/commons/foraging/ui/ChatPanel.java @@ -20,6 +20,7 @@ import edu.asu.commons.experiment.DataModel; import edu.asu.commons.foraging.client.ForagingClient; import edu.asu.commons.foraging.conf.RoundConfiguration; +import edu.asu.commons.foraging.conf.ServerConfiguration; import edu.asu.commons.foraging.event.FacilitatorCensoredChatRequest; import edu.asu.commons.net.Identifier; import edu.asu.commons.ui.UserInterfaceUtils; @@ -109,7 +110,7 @@ } } - public void initialize(DataModel<RoundConfiguration> dataModel) { + public void initialize(DataModel<ServerConfiguration, RoundConfiguration> dataModel) { this.participants = dataModel.getAllClientIdentifiers(); } diff -r 19cb60c33bbf668a4397c632e2d70c20a8efa34d -r e38c557207fe00de8e8c15278c54c8f33c593cb3 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -705,7 +705,7 @@ // FIXME: replace HTML strings with configuration template instructionsBuilder.append("<h3>Submission successful</h3><hr><p>Please wait while the rest of the submissions are gathered.</p>"); setInstructions(instructionsBuilder.toString()); - switchInstructionsPane(); + showInstructionsPanel(); } public void showInstructions() { @@ -720,7 +720,7 @@ instructionsEditorPane.setActionListener(createQuizListener(roundConfiguration)); } setInstructions(instructionsBuilder.toString()); - switchInstructionsPane(); + showInstructionsPanel(); instructionsEditorPane.setCaretPosition(0); } }); @@ -731,7 +731,7 @@ SwingUtilities.invokeLater(new Runnable() { public void run() { setInstructions(dataModel.getRoundConfiguration().getInitialVotingInstructions()); - switchInstructionsPane(); + showInstructionsPanel(); } }); } @@ -769,7 +769,9 @@ public void showVoteScreen() { - add(getVotingPanel()); + if (votingPanel == null) { + add(getVotingPanel()); + } showPanel(VotingForm.NAME); } @@ -779,12 +781,12 @@ instructionsEditorPane.setActionListener(null); instructionsEditorPane.setActionListener(createSurveyFinishedListener()); setInstructions(dataModel.getRoundConfiguration().getSurveyInstructions(dataModel.getId())); - switchInstructionsPane(); + showInstructionsPanel(); } }); } - public void switchInstructionsPane() { + public void showInstructionsPanel() { showPanel(INSTRUCTIONS_PANEL_NAME); } @@ -800,11 +802,16 @@ Runnable runnable = new Runnable() { public void run() { postSanctionDebriefingText(event); - switchInstructionsPane(); + showInstructionsPanel(); } }; SwingUtilities.invokeLater(runnable); } + + public void showExitInstructions() { + showDebriefing(dataModel.getClientData(), true); + showInstructionsPanel(); + } public synchronized void endRound(final EndRoundEvent event) { Runnable runnable = new Runnable() { @@ -823,11 +830,9 @@ } else { instructionsEditorPane.setText("Waiting for updated round totals from the server..."); - switchInstructionsPane(); + showInstructionsPanel(); } - // FIXME: replace with facilitator driven show exit instructions signal? - boolean showExitInstructions = event.isLastRound() && ! roundConfiguration.isTrustGameEnabled(); - showDebriefing(event.getClientData(), showExitInstructions); + showDebriefing(event.getClientData(), false); } }; try { @@ -880,12 +885,12 @@ public void surveyIdSubmitted() { setInstructions(dataModel.getRoundConfiguration().getWelcomeInstructions()); - switchInstructionsPane(); + showInstructionsPanel(); } public void ruleVoteSubmitted() { setInstructions(dataModel.getRoundConfiguration().getSubmittedVoteInstructions()); - switchInstructionsPane(); + showInstructionsPanel(); } public void updateDebriefingWith(TrustGameResultsClientEvent event) { https://bitbucket.org/virtualcommons/foraging/changeset/cb5bc1015e15/ changeset: cb5bc1015e15 user: alllee date: 2012-01-27 01:11:02 summary: removing unused 3d data (almost 3MB) to trim down our jarfile size affected #: 50 files Diff too large to display. https://bitbucket.org/virtualcommons/foraging/changeset/a7ba5358f519/ changeset: a7ba5358f519 user: alllee date: 2012-01-27 01:11:52 summary: updated pom and ivy to use csidex-0.3 snapshot affected #: 2 files diff -r cb5bc1015e15ce394a87e3344d3fb6b101310abb -r a7ba5358f519fafdb3d032e59ee1c02fb729550b ivy.xml --- a/ivy.xml +++ b/ivy.xml @@ -5,7 +5,7 @@ <ivy-module version="2.0"><info organisation="edu.asu.commons" module="foraging"/><dependencies> - <dependency org="edu.asu.commons" name="csidex" rev="0.2-SNAPSHOT" /> + <dependency org="edu.asu.commons" name="csidex" rev="0.3-SNAPSHOT" /><dependency org="net.java.dev.jogl" name="jogl" rev="1.1.1-rc6"/><dependency org="javax.media" name="jmf" rev="2.1.1e"/><dependency org="javax.jnlp" name="javaws" rev="1.6.0_30"/> diff -r cb5bc1015e15ce394a87e3344d3fb6b101310abb -r a7ba5358f519fafdb3d032e59ee1c02fb729550b pom.xml --- a/pom.xml +++ b/pom.xml @@ -85,7 +85,7 @@ <dependency><groupId>edu.asu.commons</groupId><artifactId>csidex</artifactId> - <version>0.2-SNAPSHOT</version> + <version>0.3-SNAPSHOT</version></dependency><dependency><groupId>net.java.dev.jogl</groupId> https://bitbucket.org/virtualcommons/foraging/changeset/f851afbbd248/ changeset: f851afbbd248 user: alllee date: 2012-01-27 01:12:00 summary: removing 3d data from ant build affected #: 1 file diff -r a7ba5358f519fafdb3d032e59ee1c02fb729550b -r f851afbbd24854dfdedb3b5fdbe8ae1370874d60 build.xml --- a/build.xml +++ b/build.xml @@ -206,9 +206,6 @@ <compilerarg value="-Xlint:unchecked"/><classpath refid="project.classpath"/></javac> - <copy todir="${build.dir}/data"> - <fileset dir="${resources.dir}/data"/> - </copy><copy todir="${build.dir}/images"><fileset dir="${resources.dir}/images"/></copy> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-25 23:47:25
|
1 new commit in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/1a7dc397625f/ changeset: 1a7dc397625f user: alllee date: 2012-01-26 00:47:11 summary: removing unneeded GroupDataModel parameter - the client / controller has already updated the ClientDataModel by the time we reach this affected #: 1 file diff -r b0caf38bd44bdcefaa124a91148c4c3cd0b1fb26 -r 1a7dc397625f280283925aa1ff94694787821ed8 src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java --- a/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java +++ b/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java @@ -322,7 +322,7 @@ SwingUtilities.invokeLater(new Runnable() { public void run() { investedTokensTextField.setText(""); - showDebriefing(event.getGroupDataModel(), event.isLastRound()); + showDebriefing(event.isLastRound()); addCenterComponent(getInstructionsPanel()); } }); @@ -333,7 +333,7 @@ System.err.println(message); } - public void showDebriefing(GroupDataModel groupDataModel, boolean showExitInstructions) { + public void showDebriefing(boolean showExitInstructions) { instructionsBuilder.delete(0, instructionsBuilder.length()); instructionsBuilder.append(clientDataModel.getRoundConfiguration().generateClientDebriefing(clientDataModel, showExitInstructions)); setInstructions(instructionsBuilder.toString()); Repository URL: https://bitbucket.org/virtualcommons/irrigation/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-25 07:10:35
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/73ddec992afa/ changeset: 73ddec992afa user: alllee date: 2012-01-25 08:10:18 summary: minor instruction template updates affected #: 4 files diff -r 0c31e837051799f75aaacda6df3f211ca45c6ceb -r 73ddec992afaa3c2b93cd1964c56671b04c97390 src/main/resources/configuration/asu/2011/t3/round1.xml --- a/src/main/resources/configuration/asu/2011/t3/round1.xml +++ b/src/main/resources/configuration/asu/2011/t3/round1.xml @@ -40,6 +40,13 @@ collected at the top right corner of the screen. On the top left corner of the screen you will see the remaining time in the round. </p> +<h3>Vision Range</h3> +<hr> +<p>You can only see other participants or resource units within your vision range. +The figure below indicates the vision range compared to the entire environment. +</p> +<img src="@CODEBASE_URL@/images/vision-range.jpg"> + <h3>Anonymity</h3><hr><p> diff -r 0c31e837051799f75aaacda6df3f211ca45c6ceb -r 73ddec992afaa3c2b93cd1964c56671b04c97390 src/main/resources/configuration/asu/2011/t3/round4.xml --- a/src/main/resources/configuration/asu/2011/t3/round4.xml +++ b/src/main/resources/configuration/asu/2011/t3/round4.xml @@ -22,15 +22,20 @@ <entry key="instructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr><p> This round is the same as the previous rounds with one exception. You will be - able to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type your message, and then hit the - enter key again. You must hit the enter key before every message you type, - otherwise control will return to the game screen where you can use the arrow - keys to move around. + able to communicate with the other <b>visible</b> participants in your group + <b>during</b> the round. If you cannot see another participant in + your vision range, you will not see their chats and they will not see your + chats. +</p> +<p> + To communicate, hit the enter key, type your message, and then hit the enter key + again. You must hit the enter key before every message you type, otherwise + control will return to the game screen where you can use the arrow keys to move + around. </p><p> diff -r 0c31e837051799f75aaacda6df3f211ca45c6ceb -r 73ddec992afaa3c2b93cd1964c56671b04c97390 src/main/resources/configuration/asu/2011/t4/round1.xml --- a/src/main/resources/configuration/asu/2011/t4/round1.xml +++ b/src/main/resources/configuration/asu/2011/t4/round1.xml @@ -41,6 +41,27 @@ collected at the top right corner of the screen. On the top left corner of the screen you will see the remaining time in the round. </p> +<h3>Vision Range</h3> +<hr> +<p>You can only see other participants or resource units within your vision range. +The figure below indicates the vision range compared to the entire environment. +</p> +<img src="@CODEBASE_URL@/images/vision-range.jpg"> +<h3>In round chat</h3> +<hr> + <p> + You will be able to communicate with the other <b>visible</b> participants + in your group <b>during</b> the round. If you cannot see another + participant in your vision range, you will not see their chats and they will + not see your chats. + </p> + <p> + To communicate, hit the enter key, type your message, and then hit the enter key + again. You must hit the enter key before every message you type, otherwise + control will return to the game screen where you can use the arrow keys to move + around. + </p> + <h3>Anonymity</h3><hr><p> diff -r 0c31e837051799f75aaacda6df3f211ca45c6ceb -r 73ddec992afaa3c2b93cd1964c56671b04c97390 src/main/resources/configuration/asu/2011/t4/round4.xml --- a/src/main/resources/configuration/asu/2011/t4/round4.xml +++ b/src/main/resources/configuration/asu/2011/t4/round4.xml @@ -21,15 +21,12 @@ <entry key="instructions"><![CDATA[ -<h3>Round {roundNumber} Instructions</h3> +<h3>Round {self.roundNumber} Instructions</h3><hr><p> - This round is the same as the previous rounds with one exception. You will be - able to communicate with the other participants in your group <b>during</b> the - round. To communicate, hit the enter key, type your message, and then hit the - enter key again. You must hit the enter key before every message you type, - otherwise control will return to the game screen where you can use the arrow - keys to move around. + This round is the same as the previous rounds with one exception. You will no + longer be able to communicate with the other visible participants in your group + <b>during</b> the round. </p><p> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-25 00:02:49
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/163f188c9762/ changeset: 163f188c9762 branch: stable user: alllee date: 2012-01-25 01:02:03 summary: merging default back into stable release branch to grab the hopefully final changes to the foraging IU treatment. affected #: 6 files diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -834,4 +834,9 @@ public boolean showTokenAnimation() { return getBooleanProperty("show-token-animation", true); } + + public String getSurveyConfirmationMessage() { + return getProperty("survey-confirmation-message", "Please make sure you have completed the survey before continuing. Have you completed the survey?"); + + } } diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -193,9 +193,18 @@ return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - client.transmit(new SurveyCompletedEvent(client.getId())); - showInstructions(); - instructionsEditorPane.setActionListener(null); + int selectedOption = JOptionPane.showConfirmDialog(getPanel(), + dataModel.getRoundConfiguration().getSurveyConfirmationMessage(), + "Confirm survey completion", JOptionPane.YES_NO_OPTION); + switch (selectedOption) { + case JOptionPane.YES_OPTION: + showInstructions(); + client.transmit(new SurveyCompletedEvent(client.getId())); + instructionsEditorPane.setActionListener(null); + break; + default: + break; + } } }; } diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/java/edu/asu/commons/foraging/ui/SubjectView.java --- a/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java @@ -89,7 +89,7 @@ } super.setup(configuration); if (tokenFieldOfVisionEnabled || subjectFieldOfVisionEnabled) { - fieldOfVisionOffset = (dw / 2.0d); + fieldOfVisionOffset = (dw * 0.3d); System.err.println("field of vision offset: " + fieldOfVisionOffset); } } @@ -157,7 +157,7 @@ graphics2D.setFont(font); FontMetrics fontMetrics = graphics2D.getFontMetrics(font); int characterHeight = fontMetrics.getAscent(); - int verticalCharacterSpacing = (int) ( (dh - characterHeight) / 2); + int verticalCharacterSpacing = (int) ((dh - characterHeight) * 0.5d); Point currentPosition = dataModel.getCurrentPosition(); if (subjectFieldOfVisionEnabled) { // paint a transparent circle centered on the current position of the subject. @@ -195,7 +195,7 @@ String subjectNumber = String.valueOf( dataModel.getAssignedNumber(id) ); //Calculate x and y so that the text is center aligned int characterWidth = fontMetrics.stringWidth(subjectNumber); - int x = (int) (scaledX + ( (dw - characterWidth) / 2)); + int x = (int) (scaledX + ( (dw - characterWidth) * 0.5d)); int y = (int) (scaledY + characterHeight - verticalCharacterSpacing); graphics2D.drawString(subjectNumber, x, y); } diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/resources/configuration/asu/2011/t3/round6.xml --- a/src/main/resources/configuration/asu/2011/t3/round6.xml +++ b/src/main/resources/configuration/asu/2011/t3/round6.xml @@ -18,31 +18,4 @@ <entry key='always-explicit'>true</entry><entry key='max-cell-occupancy'>1</entry><entry key='trust-game'>true</entry> - -<entry key="last-round-debriefing"> -<![CDATA[ -<h2>Survey</h2> -<hr> -<p> -This was the last round, but not the end of the experiment. We will now -determine your payments. While we are doing this, we request that you -carefully fill out a brief survey. -</p> -<h2>Payments</h2> -<hr> - <p>NOTE: Your computer number is <b>{id}</b></p> -<p> -When we are ready we will call you one by one to the room next door. We will -pay you there in private. Please wait until your computer number, <b>{id}</b>, is -called, and then proceed to the room next door to turn in your computer number and -your survey. -</p> -<p> -Please answer the survey carefully and thank you for participating. -</p> - - - -]]> -</entry></properties> diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> diff -r 0d374e0c76556c6080ff9b97879bdbc8b2e717e5 -r 163f188c9762dc522abb45d28d884f0bd3a0e223 src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-25 00:00:30
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/48f75eca369a/ changeset: 48f75eca369a user: alllee date: 2012-01-25 00:58:50 summary: adding tiebreaker message back to voting-results affected #: 2 files diff -r 569002c6259c4dcc2ca9a59f857afa1ffc27ee38 -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 src/main/resources/configuration/iu/2011/vote-punish/server.xml --- a/src/main/resources/configuration/iu/2011/vote-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/vote-punish/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> diff -r 569002c6259c4dcc2ca9a59f857afa1ffc27ee38 -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 src/main/resources/configuration/iu/2011/vote/server.xml --- a/src/main/resources/configuration/iu/2011/vote/server.xml +++ b/src/main/resources/configuration/iu/2011/vote/server.xml @@ -262,6 +262,9 @@ <h1>Nomination Results</h1><h2>Selected Strategy</h2><hr> + {if (tiebreaker)} + <p><b>NOTE:</b> There was a tie and the selected strategy listed here was randomly selected as the winner.</p> + {endif} <p><b> {first(selectedRules)} </b></p> ]]></entry> https://bitbucket.org/virtualcommons/foraging/changeset/0c31e8370517/ changeset: 0c31e8370517 user: alllee date: 2012-01-25 01:00:06 summary: adding confirmation dialog when clicking continue past the survey screen affected #: 5 files diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/foraging/conf/RoundConfiguration.java @@ -834,4 +834,9 @@ public boolean showTokenAnimation() { return getBooleanProperty("show-token-animation", true); } + + public String getSurveyConfirmationMessage() { + return getProperty("survey-confirmation-message", "Please make sure you have completed the survey before continuing. Have you completed the survey?"); + + } } diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java @@ -18,7 +18,7 @@ import edu.asu.commons.net.Identifier; /** - * $Id: AggregateTokenSpatialDistributionProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * * @author <a href='mailto:all...@as...'>Allen Lee</a> diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java @@ -18,7 +18,7 @@ import edu.asu.commons.net.Identifier; /** - * $Id: CollectedTokenSpatialDistributionProcessor.java 526 2010-08-06 01:25:27Z alllee $ + * $Id$ * * Generates spatial distribution statistics. * diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java --- a/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java +++ b/src/main/java/edu/asu/commons/foraging/ui/GameWindow2D.java @@ -193,9 +193,18 @@ return new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - client.transmit(new SurveyCompletedEvent(client.getId())); - showInstructions(); - instructionsEditorPane.setActionListener(null); + int selectedOption = JOptionPane.showConfirmDialog(getPanel(), + dataModel.getRoundConfiguration().getSurveyConfirmationMessage(), + "Confirm survey completion", JOptionPane.YES_NO_OPTION); + switch (selectedOption) { + case JOptionPane.YES_OPTION: + showInstructions(); + client.transmit(new SurveyCompletedEvent(client.getId())); + instructionsEditorPane.setActionListener(null); + break; + default: + break; + } } }; } diff -r 48f75eca369a29ddf4f28437b7c7a9fdf6af0de0 -r 0c31e837051799f75aaacda6df3f211ca45c6ceb src/main/java/edu/asu/commons/foraging/ui/SubjectView.java --- a/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java +++ b/src/main/java/edu/asu/commons/foraging/ui/SubjectView.java @@ -89,7 +89,7 @@ } super.setup(configuration); if (tokenFieldOfVisionEnabled || subjectFieldOfVisionEnabled) { - fieldOfVisionOffset = (dw / 2.0d); + fieldOfVisionOffset = (dw * 0.3d); System.err.println("field of vision offset: " + fieldOfVisionOffset); } } @@ -157,7 +157,7 @@ graphics2D.setFont(font); FontMetrics fontMetrics = graphics2D.getFontMetrics(font); int characterHeight = fontMetrics.getAscent(); - int verticalCharacterSpacing = (int) ( (dh - characterHeight) / 2); + int verticalCharacterSpacing = (int) ((dh - characterHeight) * 0.5d); Point currentPosition = dataModel.getCurrentPosition(); if (subjectFieldOfVisionEnabled) { // paint a transparent circle centered on the current position of the subject. @@ -195,7 +195,7 @@ String subjectNumber = String.valueOf( dataModel.getAssignedNumber(id) ); //Calculate x and y so that the text is center aligned int characterWidth = fontMetrics.stringWidth(subjectNumber); - int x = (int) (scaledX + ( (dw - characterWidth) / 2)); + int x = (int) (scaledX + ( (dw - characterWidth) * 0.5d)); int y = (int) (scaledY + characterHeight - verticalCharacterSpacing); graphics2D.drawString(subjectNumber, x, y); } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |
From: Bitbucket <com...@bi...> - 2012-01-24 17:51:52
|
1 new commit in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/6c2df9d35f7d/ changeset: 6c2df9d35f7d user: alllee date: 2012-01-24 18:51:24 summary: fixing spatial distribution processors ArrayIndexOutOfBoundsExceptions due to the transient cached boardSize/boardWidth fields. Should investigate and remove if not used / unneeded. affected #: 2 files diff -r e81105acac41540f332be3f9e86cad839306aff7 -r 6c2df9d35f7de242cb014cc389cf5bcd4b881e48 src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/AggregateTokenSpatialDistributionProcessor.java @@ -33,7 +33,8 @@ ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); SortedSet<PersistableEvent> actions = savedRoundData.getActions(); Map<Identifier, ClientSpatialDistribution> clientSpatialDistributionMap = new HashMap<Identifier, ClientSpatialDistribution>(); - Dimension boardSize = new Dimension(serverDataModel.getBoardWidth(), serverDataModel.getBoardHeight()); + Dimension boardSize = serverDataModel.getRoundConfiguration().getBoardSize(); + System.err.println("board size: " + boardSize); for (ClientData clientData : serverDataModel.getClientDataMap().values()) { clientSpatialDistributionMap.put(clientData.getId(), new ClientSpatialDistribution(boardSize)); } @@ -88,4 +89,4 @@ public String getOutputFileExtension() { return "-aggregated-spatial-distribution.txt"; } - } \ No newline at end of file + } diff -r e81105acac41540f332be3f9e86cad839306aff7 -r 6c2df9d35f7de242cb014cc389cf5bcd4b881e48 src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java --- a/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java +++ b/src/main/java/edu/asu/commons/foraging/data/CollectedTokenSpatialDistributionProcessor.java @@ -32,7 +32,7 @@ ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); SortedSet<PersistableEvent> actions = savedRoundData.getActions(); Map<Identifier, ClientSpatialDistribution> clientSpatialDistributionMap = new HashMap<Identifier, ClientSpatialDistribution>(); - Dimension boardSize = new Dimension(serverDataModel.getBoardWidth(), serverDataModel.getBoardHeight()); + Dimension boardSize = serverDataModel.getRoundConfiguration().getBoardSize(); for (ClientData clientData : serverDataModel.getClientDataMap().values()) { clientSpatialDistributionMap.put(clientData.getId(), new ClientSpatialDistribution(boardSize)); } @@ -78,4 +78,4 @@ public String getOutputFileExtension() { return "-spatial-distribution.txt"; } - } \ No newline at end of file + } Repository URL: https://bitbucket.org/virtualcommons/foraging/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. |