[virtualcommons-svn] commit/irrigation: 2 new changesets
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-03-27 21:33:08
|
2 new commits in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/cccbf9276e86/ changeset: cccbf9276e86 user: alllee date: 2012-03-27 22:37:10 summary: merging off-by-one fix for issue 21 from stable into default and replacing station id + uid with just station id affected #: 6 files diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f src/main/java/edu/asu/commons/irrigation/events/QuizResponseEvent.java --- a/src/main/java/edu/asu/commons/irrigation/events/QuizResponseEvent.java +++ b/src/main/java/edu/asu/commons/irrigation/events/QuizResponseEvent.java @@ -44,6 +44,6 @@ } public int getNumberOfCorrectQuizAnswers() { - return responses.size() - 1 - getIncorrectAnswers().size(); + return responses.size() - getIncorrectAnswers().size(); } } diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f 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 @@ -408,11 +408,11 @@ <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> - <h2>Payment</h2> + <h2>Payment for Computer Number {clientData.id.stationId}</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 + your computer number, <b>{clientData.id.stationId}</b>, is called to turn in your survey and receive payment. 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 diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f 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 @@ -408,11 +408,11 @@ <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> - <h2>Payment</h2> + <h2>Payment for Computer Number {clientData.id.stationId}</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 + your computer number, <b>{clientData.id.stationId}</b>, is called to turn in your survey and receive payment. 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 diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f 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 @@ -408,11 +408,11 @@ <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> - <h2>Payment</h2> + <h2>Payment for Computer Number {clientData.id.stationId}</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 + your computer number, <b>{clientData.id.stationId}</b>, is called to turn in your survey and receive payment. 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 diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f 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 @@ -408,11 +408,11 @@ <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> - <h2>Payment</h2> + <h2>Payment for Computer Number {clientData.id.stationId}</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 + your computer number, <b>{clientData.id.stationId}</b>, is called to turn in your survey and receive payment. 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 diff -r 0c4ced9932245edf82b2c89e01a5e7af8ced741a -r cccbf9276e86e63345ebb0408726cf0d0a19de3f 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 @@ -408,11 +408,11 @@ <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> - <h2>Payment</h2> + <h2>Payment for Computer Number {clientData.id.stationId}</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 + your computer number, <b>{clientData.id.stationId}</b>, is called to turn in your survey and receive payment. 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 https://bitbucket.org/virtualcommons/irrigation/changeset/b359e069f13f/ changeset: b359e069f13f user: alllee date: 2012-03-27 23:33:06 summary: fixes issue 22 and fixes issue 20 affected #: 5 files diff -r cccbf9276e86e63345ebb0408726cf0d0a19de3f -r b359e069f13fc35f081cbf1912034f15e4368b5a ivy.xml --- a/ivy.xml +++ b/ivy.xml @@ -7,5 +7,6 @@ <dependencies><dependency org="edu.asu.commons" name="csidex" rev="0.5-SNAPSHOT"/><dependency org="org.jfree" name="jfreechart" rev="1.0.14"/> + <dependency org="javax.jnlp" name="javaws" rev="1.6.0_30"/></dependencies></ivy-module> diff -r cccbf9276e86e63345ebb0408726cf0d0a19de3f -r b359e069f13fc35f081cbf1912034f15e4368b5a pom.xml --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,12 @@ <artifactId>forms</artifactId><version>1.1.0</version></dependency> + <dependency> + <groupId>javax.jnlp</groupId> + <artifactId>javaws</artifactId> + <version>1.6.0_30</version> + <scope>provided</scope> + </dependency></dependencies><build><finalName>irrigation</finalName> diff -r cccbf9276e86e63345ebb0408726cf0d0a19de3f -r b359e069f13fc35f081cbf1912034f15e4368b5a src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java --- a/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java +++ b/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java @@ -9,6 +9,7 @@ import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JLabel; +import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSplitPane; @@ -21,6 +22,7 @@ import edu.asu.commons.irrigation.events.ShowGameScreenshotRequest; import edu.asu.commons.irrigation.events.ShowQuizRequest; import edu.asu.commons.ui.HtmlEditorPane; +import edu.asu.commons.ui.HtmlSelection; import edu.asu.commons.ui.UserInterfaceUtils; /** @@ -59,6 +61,8 @@ private JButton stopRoundButton; + private JButton copyToClipboardButton; + /** * This is the default constructor */ @@ -81,6 +85,7 @@ addToBoxLayout(buttonPanel, getShowQuizButton()); addToBoxLayout(buttonPanel, getStartRoundOverrideButton()); addToBoxLayout(buttonPanel, getStopRoundButton()); + addToBoxLayout(buttonPanel, getCopyToClipboardButton()); add(buttonPanel, BorderLayout.NORTH); informationEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); informationScrollPane = new JScrollPane(informationEditorPane); @@ -104,6 +109,36 @@ splitPane.setResizeWeight(proportion); } + private JButton getCopyToClipboardButton() { + // create copy to clipboard menu item + if (copyToClipboardButton == null) { + copyToClipboardButton = new JButton("Copy to clipboard"); + copyToClipboardButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String text = informationEditorPane.getSelectedText(); + if (text == null || text.trim().isEmpty()) { + addMessage("No text selected, copying all text in the editor pane to the clipboard."); + text = informationEditorPane.getText(); + if (text == null || text.trim().isEmpty()) { + // if text is still empty, give up + JOptionPane.showMessageDialog(FacilitatorWindow.this, "Unable to find any text to copy to the clipboard."); + return; + } + } + if (UserInterfaceUtils.getClipboardService() != null) { + HtmlSelection selection = new HtmlSelection(text); + UserInterfaceUtils.getClipboardService().setContents(selection); + } + else { + addMessage("Clipboard service is not available."); + } + } + }); + } + return copyToClipboardButton; + } + private void addToBoxLayout(JPanel buttonPanel, JButton button) { buttonPanel.add(button); buttonPanel.add(Box.createHorizontalStrut(5)); diff -r cccbf9276e86e63345ebb0408726cf0d0a19de3f -r b359e069f13fc35f081cbf1912034f15e4368b5a 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 @@ -119,7 +119,7 @@ } // ignore the request if not every group has submit their tokens. if (isTokenInvestmentComplete()) { - sendFacilitatorMessage("Starting round."); + sendFacilitatorMessage("Starting actual round."); synchronized (roundSignal) { roundSignal.notifyAll(); } @@ -274,7 +274,7 @@ private volatile int numberOfCompletedQuizzes = 0; @Override public void handle(QuizResponseEvent quizResponseEvent) { - sendFacilitatorMessage("Received quiz response: " + quizResponseEvent); + sendFacilitatorMessage(String.format("%d/%d quiz response: %s", numberOfCompletedQuizzes, clients.size(), quizResponseEvent)); clients.get(quizResponseEvent.getId()).addCorrectQuizAnswers(quizResponseEvent.getNumberOfCorrectQuizAnswers()); numberOfCompletedQuizzes++; if (numberOfCompletedQuizzes >= clients.size()) { @@ -443,6 +443,7 @@ getConfiguration().isLastRound())); } } + sendFacilitatorMessage("Round ended, ready to begin chat again"); transmit(new FacilitatorEndRoundEvent(getFacilitatorId(), serverDataModel)); } diff -r cccbf9276e86e63345ebb0408726cf0d0a19de3f -r b359e069f13fc35f081cbf1912034f15e4368b5a 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 @@ -485,7 +485,7 @@ <table border=1 cellspacing=3 cellpadding=3><tr><th>Participant</th><th>Current tokens</th><th>Current income</th><th>Quiz earnings</th><th>Total income</th></tr> {clientDataList: {data | -<tr align="RIGHT"><td>{data.id}</td><td>{data.allTokensEarnedThisRound}</td><td>{data.totalDollarsEarnedThisRound}</td><td>{data.quizEarnings}</td><td>{data.grandTotalIncome}</td></tr> +<tr align="RIGHT"><td>{data}</td><td>{data.allTokensEarnedThisRound}</td><td>{data.totalDollarsEarnedThisRound}</td><td>{data.quizEarnings}</td><td>{data.grandTotalIncome}</td></tr> }} </table> {if (self.lastRound)} 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. |