[virtualcommons-svn] commit/foraging: 2 new changesets
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-02-28 07:57:31
|
2 new commits in foraging: https://bitbucket.org/virtualcommons/foraging/changeset/ffd3e3edacdb/ changeset: ffd3e3edacdb user: alllee date: 2012-02-28 08:56:35 summary: adding imposed strategy instructions to voting-instructions template affected #: 3 files diff -r 2f8283b23b0c06845bc083903801b0c31803aa04 -r ffd3e3edacdb88ff8446862ff21e89792794faef 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 @@ -3,6 +3,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; import java.util.List; @@ -20,6 +21,7 @@ import edu.asu.commons.foraging.model.ResourceDispenser; import edu.asu.commons.foraging.model.ServerDataModel; import edu.asu.commons.foraging.rules.Strategy; +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; @@ -736,6 +738,10 @@ template.add("selectedRules", selectedRules); return template.render(); } + + public List<ForagingStrategy> getForagingStrategies() { + return Arrays.asList(ForagingStrategy.values()); + } public String getVotingResultsTemplate() { return getProperty("voting-results", getParentConfiguration().getVotingResults()); diff -r 2f8283b23b0c06845bc083903801b0c31803aa04 -r ffd3e3edacdb88ff8446862ff21e89792794faef src/main/resources/configuration/iu/2011/imposed-punish/server.xml --- a/src/main/resources/configuration/iu/2011/imposed-punish/server.xml +++ b/src/main/resources/configuration/iu/2011/imposed-punish/server.xml @@ -322,6 +322,21 @@ </entry><entry key='voting-instructions'><![CDATA[ +{if (self.imposedStrategyEnabled)} +<h1>Strategies</h1> +<hr> + <p>You now have the opportunity to consider {self.foragingStrategies.size} + possible strategies for managing how you and the other members of your group + collect tokens for the rest of the experiment. + </p> + <p> + Below is the list of different strategies. Please read the list carefully. + Press "Submit" once you have finished reviewing the strategies. + </p> + <ol> + {foragingStrategies: { strategy | <li>{strategy}</li> }} + </ol> +{else} <h1>Strategy Nomination Instructions</h1><hr><p> @@ -336,9 +351,9 @@ Therefore, neither you nor the experimenter will know who nominated a particular strategy. </p> +{endif} ]]></entry> - <entry key='imposed-strategy-instructions'><![CDATA[ <h1>Important New Instructions!</h1> diff -r 2f8283b23b0c06845bc083903801b0c31803aa04 -r ffd3e3edacdb88ff8446862ff21e89792794faef src/main/resources/configuration/iu/2011/imposed/server.xml --- a/src/main/resources/configuration/iu/2011/imposed/server.xml +++ b/src/main/resources/configuration/iu/2011/imposed/server.xml @@ -323,6 +323,21 @@ <entry key='voting-instructions'><![CDATA[ +{if (self.imposedStrategyEnabled)} +<h1>Strategies</h1> +<hr> + <p>You now have the opportunity to consider {self.foragingStrategies.size} + possible strategies for managing how you and the other members of your group + collect tokens for the rest of the experiment. + </p> + <p> + Below is the list of different strategies. Please read the list carefully. + Press "Submit" once you have finished reviewing the strategies. + </p> + <ol> + {foragingStrategies: { strategy | <li>{strategy}</li> }} + </ol> +{else} <h1>Strategy Nomination Instructions</h1><hr><p> @@ -337,6 +352,7 @@ Therefore, neither you nor the experimenter will know who nominated a particular strategy. </p> +{endif} ]]></entry> https://bitbucket.org/virtualcommons/foraging/changeset/3fecb9d954fc/ changeset: 3fecb9d954fc user: alllee date: 2012-02-28 08:57:29 summary: treating voting instructions as a StringTemplate affected #: 1 file diff -r ffd3e3edacdb88ff8446862ff21e89792794faef -r 3fecb9d954fc2f21b415c17bfce09c89211833cd 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 @@ -559,7 +559,7 @@ } public String getVotingInstructions() { - return getProperty("voting-instructions"); + return render(getProperty("voting-instructions")); } public String getInitialVotingInstructions() { 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. |