[virtualcommons-svn] commit/foraging: alllee: merging default back into stable release branch to gr
Status: Beta
Brought to you by:
alllee
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. |