[virtualcommons-svn] commit/irrigation: alllee: final default->stable merge before first irrigation
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-03-27 05:20:00
|
1 new commit in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/8b3f4d027b4d/ changeset: 8b3f4d027b4d branch: stable user: alllee date: 2012-03-27 07:19:59 summary: final default->stable merge before first irrigation experiment of the season, minor fixes to chat panel and instructions affected #: 9 files diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java --- a/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java +++ b/src/main/java/edu/asu/commons/irrigation/client/ChatPanel.java @@ -64,8 +64,7 @@ public void handle(final ChatEvent chatEvent) { SwingUtilities.invokeLater(new Runnable() { public void run() { - displayMessage(getChatHandle(chatEvent.getSource()), - chatEvent.toString()); + displayMessage(getChatHandle(chatEvent.getSource()), chatEvent.toString()); } }); } @@ -88,12 +87,6 @@ } } }); -// final JButton sendButton = new JButton("Send"); -// sendButton.addActionListener(new ActionListener() { -// public void actionPerformed(ActionEvent event) { -// sendMessage(); -// } -// }); JPanel timeLeftPanel = new JPanel(); int chatDuration = irrigationClient.getServerConfiguration().getChatDuration(); timeLeftProgressBar = new JProgressBar(0, chatDuration); @@ -109,7 +102,7 @@ private void sendMessage() { String message = chatField.getText(); if (message != null && ! message.isEmpty() && targetIdentifier != null) { - displayMessage(getChatHandle(getClientId()), message); + displayMessage(getChatHandle(getClientId()) + " (you): ", message); chatField.setText(""); irrigationClient.transmit(new ChatRequest(getClientId(), message, targetIdentifier)); } @@ -181,7 +174,7 @@ public void displayMessage(String chatHandle, String message) { final StyledDocument document = messageWindow.getStyledDocument(); - if (!chatHandle.endsWith(":")) { + if (!chatHandle.trim().endsWith(":")) { chatHandle = chatHandle.concat(": "); } try { diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 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 @@ -271,6 +271,8 @@ public synchronized void actionPerformed(ActionEvent e) { FormActionEvent formEvent = (FormActionEvent) e; Properties actualAnswers = formEvent.getData(); + // remove the submit button if it exists + actualAnswers.remove("submit"); System.err.println("actual answers: " + actualAnswers); List<String> incorrectQuestionNumbers = new ArrayList<String>(); List<String> correctQuestionNumbers = new ArrayList<String>(); diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java --- a/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java +++ b/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java @@ -269,7 +269,7 @@ public String getQuizResults(List<String> incorrectQuestionNumbers, Map<Object, Object> actualAnswers) { ST template = createStringTemplate(getProperty("quiz-results")); // FIXME: actual answers includes the submit button, so there's an off-by-one that we need to deal with. - int totalQuestions = actualAnswers.size() - 1; + int totalQuestions = actualAnswers.size(); int numberCorrect = totalQuestions - incorrectQuestionNumbers.size(); template.add("allCorrect", incorrectQuestionNumbers.isEmpty()); template.add("numberCorrect", numberCorrect); diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java --- a/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java +++ b/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java @@ -249,7 +249,7 @@ ChatEvent chatEvent = new ChatEvent(target, request.getMessage(), source); transmit(chatEvent); } - sendFacilitatorMessage(String.format("%s->%s: %s", source, allTargets, request.toString())); + sendFacilitatorMessage(String.format("%s->%s: %s", sendingClient, allTargets, request.toString())); persister.store(request); } }); diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/resources/configuration/asu/2011/pretest/irrigation.xml --- a/src/main/resources/configuration/asu/2011/pretest/irrigation.xml +++ b/src/main/resources/configuration/asu/2011/pretest/irrigation.xml @@ -83,15 +83,13 @@ <h2>How to participate</h2><hr><p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive {self.tokenEndowment} tokens which you can invest in the irrigation -infrastructure. Based on the <b>water delivery capacity</b> of the irrigation -infrastructure and the availability of water you will be able to grow crops. Tokens -earned in a round is the sum of tokens not invested plus tokens earned by growing -crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to -invest in the irrigation infrastructure. Based on the combined contributions of all -5 participants in your group in each round, your group can maintain the capacity of -the irrigation infrastructure for growing crops. +This exercise mimics decisions people make in irrigation systems. In each round you will receive {self.tokenEndowment} +tokens. You can choose to invest in the irrigation infrastructure or keep the tokens. Based on the <b>water delivery +capacity</b> of the irrigation infrastructure and the availability of water you will be able to grow crops. The total +number of tokens you can earn in a round is the sum of your tokens not invested plus the tokens you earn from growing +crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to invest in the irrigation +infrastructure. Based on the combined contributions of all 5 participants in your group in each round, your group can +maintain the capacity of the irrigation infrastructure for growing crops. </p><p> diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/resources/configuration/asu/2011/t1/irrigation.xml --- a/src/main/resources/configuration/asu/2011/t1/irrigation.xml +++ b/src/main/resources/configuration/asu/2011/t1/irrigation.xml @@ -83,15 +83,13 @@ <h2>How to participate</h2><hr><p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive {self.tokenEndowment} tokens which you can invest in the irrigation -infrastructure. Based on the <b>water delivery capacity</b> of the irrigation -infrastructure and the availability of water you will be able to grow crops. Tokens -earned in a round is the sum of tokens not invested plus tokens earned by growing -crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to -invest in the irrigation infrastructure. Based on the combined contributions of all -5 participants in your group in each round, your group can maintain the capacity of -the irrigation infrastructure for growing crops. +This exercise mimics decisions people make in irrigation systems. In each round you will receive {self.tokenEndowment} +tokens. You can choose to invest in the irrigation infrastructure or keep the tokens. Based on the <b>water delivery +capacity</b> of the irrigation infrastructure and the availability of water you will be able to grow crops. The total +number of tokens you can earn in a round is the sum of your tokens not invested plus the tokens you earn from growing +crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to invest in the irrigation +infrastructure. Based on the combined contributions of all 5 participants in your group in each round, your group can +maintain the capacity of the irrigation infrastructure for growing crops. </p><p> diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/resources/configuration/asu/2011/t2/irrigation.xml --- a/src/main/resources/configuration/asu/2011/t2/irrigation.xml +++ b/src/main/resources/configuration/asu/2011/t2/irrigation.xml @@ -83,15 +83,13 @@ <h2>How to participate</h2><hr><p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive {self.tokenEndowment} tokens which you can invest in the irrigation -infrastructure. Based on the <b>water delivery capacity</b> of the irrigation -infrastructure and the availability of water you will be able to grow crops. Tokens -earned in a round is the sum of tokens not invested plus tokens earned by growing -crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to -invest in the irrigation infrastructure. Based on the combined contributions of all -5 participants in your group in each round, your group can maintain the capacity of -the irrigation infrastructure for growing crops. +This exercise mimics decisions people make in irrigation systems. In each round you will receive {self.tokenEndowment} +tokens. You can choose to invest in the irrigation infrastructure or keep the tokens. Based on the <b>water delivery +capacity</b> of the irrigation infrastructure and the availability of water you will be able to grow crops. The total +number of tokens you can earn in a round is the sum of your tokens not invested plus the tokens you earn from growing +crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to invest in the irrigation +infrastructure. Based on the combined contributions of all 5 participants in your group in each round, your group can +maintain the capacity of the irrigation infrastructure for growing crops. </p><p> diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/resources/configuration/asu/2011/t3/irrigation.xml --- a/src/main/resources/configuration/asu/2011/t3/irrigation.xml +++ b/src/main/resources/configuration/asu/2011/t3/irrigation.xml @@ -83,15 +83,13 @@ <h2>How to participate</h2><hr><p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive {self.tokenEndowment} tokens which you can invest in the irrigation -infrastructure. Based on the <b>water delivery capacity</b> of the irrigation -infrastructure and the availability of water you will be able to grow crops. Tokens -earned in a round is the sum of tokens not invested plus tokens earned by growing -crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to -invest in the irrigation infrastructure. Based on the combined contributions of all -5 participants in your group in each round, your group can maintain the capacity of -the irrigation infrastructure for growing crops. +This exercise mimics decisions people make in irrigation systems. In each round you will receive {self.tokenEndowment} +tokens. You can choose to invest in the irrigation infrastructure or keep the tokens. Based on the <b>water delivery +capacity</b> of the irrigation infrastructure and the availability of water you will be able to grow crops. The total +number of tokens you can earn in a round is the sum of your tokens not invested plus the tokens you earn from growing +crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to invest in the irrigation +infrastructure. Based on the combined contributions of all 5 participants in your group in each round, your group can +maintain the capacity of the irrigation infrastructure for growing crops. </p><p> diff -r 5bbb87c0ba61aa9867b70669ace58a69054af9fa -r 8b3f4d027b4d38e16d05e1cae9fb668db680d928 src/main/resources/configuration/asu/2011/t4/irrigation.xml --- a/src/main/resources/configuration/asu/2011/t4/irrigation.xml +++ b/src/main/resources/configuration/asu/2011/t4/irrigation.xml @@ -83,15 +83,13 @@ <h2>How to participate</h2><hr><p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive {self.tokenEndowment} tokens which you can invest in the irrigation -infrastructure. Based on the <b>water delivery capacity</b> of the irrigation -infrastructure and the availability of water you will be able to grow crops. Tokens -earned in a round is the sum of tokens not invested plus tokens earned by growing -crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to -invest in the irrigation infrastructure. Based on the combined contributions of all -5 participants in your group in each round, your group can maintain the capacity of -the irrigation infrastructure for growing crops. +This exercise mimics decisions people make in irrigation systems. In each round you will receive {self.tokenEndowment} +tokens. You can choose to invest in the irrigation infrastructure or keep the tokens. Based on the <b>water delivery +capacity</b> of the irrigation infrastructure and the availability of water you will be able to grow crops. The total +number of tokens you can earn in a round is the sum of your tokens not invested plus the tokens you earn from growing +crops. Each token is worth {dollarsPerToken}. In each round you will first decide how much to invest in the irrigation +infrastructure. Based on the combined contributions of all 5 participants in your group in each round, your group can +maintain the capacity of the irrigation infrastructure for growing crops. </p><p> 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. |