[virtualcommons-svn] commit/irrigation: alllee: minor instructions formatting fixes and facilitator
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-03-26 20:30:32
|
1 new commit in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/c3913959c962/ changeset: c3913959c962 user: alllee date: 2012-03-26 22:30:31 summary: minor instructions formatting fixes and facilitator UI tweaks, adding small spacing between buttons affected #: 10 files diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -218,10 +218,8 @@ @Override public void focusGained(FocusEvent e) { if (e.getComponent().equals(chatField)) { - System.err.println("chat field got focus, not setting focus again"); return; } - System.err.println("gained focus, setting on chat field: " + e); chatField.requestFocusInWindow(); } diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java --- a/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java +++ b/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java @@ -13,9 +13,9 @@ /** * $Id$ * - * Configuration parameters for a given round in the irrigation experiment. - * Provides reward functions, etc. - * + * Configuration parameters for a given round in the irrigation experiment. + * Provides reward functions, etc. + * * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Rev$ */ @@ -47,13 +47,14 @@ public int getMaximumTokenInvestment() { return getIntProperty("max-token-investment", 10); } - + public int getTokenEndowment() { return getIntProperty("token-endowment"); } /** * returns maximum number of tokens that could have been contributed + * * @return */ public int getMaximumTotalInvestedTokens() { @@ -67,26 +68,26 @@ public boolean isPracticeRound() { return getBooleanProperty("practice-round"); } - + public String getPracticeRoundPaymentInstructions() { - return getProperty("practice-round-payment-instructions", + return getProperty("practice-round-payment-instructions", "This was a practice round so the earnings mentioned are only for illustrative purposes and <b>do not count towards your actual earnings</b>."); } - + public int getClientsPerGroup() { return getIntProperty("clients-per-group", 5); } /** - * Returns the dollars/token exchange rate. $1 = 1, 50 cents = $.50, 1 penny per token = .01, etc. + * Returns the dollars/token exchange rate. $1 = 1, 50 cents = $.50, 1 penny per token = .01, etc. * * FIXME: this should be a ServerConfiguration parameter unless we change it so - * the client keeps track of total dollars earned per round instead of total tokens earned per round. + * the client keeps track of total dollars earned per round instead of total tokens earned per round. * * @return */ public double getDollarsPerToken() { - return getDoubleProperty("dollars-per-token"); + return getDoubleProperty("dollars-per-token"); } /** @@ -95,13 +96,13 @@ public void report() { getProperties().list(System.err); } - + public boolean isInfrastructureEfficiencyReset() { - return isFirstRound() || getBooleanProperty("reset-infrastructure-efficiency", false); + return isFirstRound() || getBooleanProperty("reset-infrastructure-efficiency", false); } /** - * Returns the instructions for this round. If undefined at the round level it uses default instructions at the parent ServerConfiguration level. + * 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().getSameAsPreviousRoundInstructions())); @@ -112,8 +113,9 @@ } /** - * FIXME: convoluted flow of control; specialInstructions is set by generateUpdatedInstructions before invoking getInstructions(). This means - * that showInstructions will never + * FIXME: convoluted flow of control; specialInstructions is set by generateUpdatedInstructions before invoking getInstructions(). This means + * that showInstructions will never + * * @return */ public String getSpecialInstructions() { @@ -143,15 +145,15 @@ } /** - * Returns the duration of the round in seconds. Set to default of 50 seconds per round. + * Returns the duration of the round in seconds. Set to default of 50 seconds per round. */ @Override public Duration getRoundDuration() { return Duration.create(getRoundDurationInSeconds()); } - + public int getRoundDurationInSeconds() { - return getIntProperty("round-duration", 50); + return getIntProperty("round-duration"); } public boolean shouldRandomizeGroup() { @@ -161,20 +163,21 @@ public boolean isRestrictedVisibility() { return getFieldOfVision() > 0; } - + /** - * Returns the number of neighbors visible on both sides of the participant. A negative value signifies that + * Returns the number of neighbors visible on both sides of the participant. A negative value signifies that * participants can see everything. + * * @return the number of neighbors visible to either side of each participant. */ public int getFieldOfVision() { return getIntProperty("field-of-vision", getParentConfiguration().getFieldOfVision()); } - + public String getClientDebriefingTemplate() { return getProperty("client-debriefing"); } - + private void populateClientEarnings(ClientData data, ServerConfiguration serverConfiguration, NumberFormat currencyFormatter) { data.setGrandTotalIncome(currencyFormatter.format(serverConfiguration.getTotalIncome(data))); data.setTotalDollarsEarnedThisRound(currencyFormatter.format(serverConfiguration.getTokenEarningsThisRound(data))); @@ -184,7 +187,7 @@ public String generateClientDebriefing(ClientDataModel clientDataModel, boolean showExitInstructions) { ST st = createStringTemplate(getClientDebriefingTemplate()); NumberFormat formatter = NumberFormat.getCurrencyInstance(); - for (ClientData clientData: clientDataModel.getClientDataMap().values()) { + for (ClientData clientData : clientDataModel.getClientDataMap().values()) { populateClientEarnings(clientData, getParentConfiguration(), formatter); } st.add("clientData", clientDataModel.getClientData()); @@ -193,7 +196,7 @@ st.add("showExitInstructions", showExitInstructions); return st.render(); } - + public String generateContributionSummary(ClientData clientData) { ST st = createStringTemplate(getContributionSummaryTemplate()); st.add("clientData", clientData); @@ -204,11 +207,11 @@ private String getContributionSummaryTemplate() { return getProperty("contribution-summary"); } - + public int getChatDuration() { - return getIntProperty("chat-duration"); + return getIntProperty("chat-duration"); } - + public String getRestrictedVisibilityInstructions() { return render(getProperty("restricted-visibility-instructions")); } @@ -219,7 +222,7 @@ this.specialInstructions = specialInstructionsTemplate.render(); return getInstructions(); } - + private void populateInfrastructureEfficiencyAttributes(ClientDataModel clientDataModel, ST template) { int initialInfrastructureEfficiency = clientDataModel.getGroupDataModel().getInfrastructureEfficiency(); int actualInfrastructureEfficiency = initialInfrastructureEfficiency - getInfrastructureDegradationFactor(); @@ -231,7 +234,7 @@ template.add("initialInfrastructureEfficiency", initialInfrastructureEfficiency); template.add("actualInfrastructureEfficiency", actualInfrastructureEfficiency); template.add("waterDeliveryCapacity", waterDeliveryCapacity); - + } public String generateInvestmentInstructions(ClientDataModel clientDataModel) { @@ -244,7 +247,7 @@ ST template = createStringTemplate(getProperty("facilitator-debriefing")); ServerConfiguration serverConfiguration = getParentConfiguration(); NumberFormat formatter = NumberFormat.getCurrencyInstance(); - for (ClientData data: serverDataModel.getClientDataMap().values()) { + for (ClientData data : serverDataModel.getClientDataMap().values()) { populateClientEarnings(data, serverConfiguration, formatter); } template.add("clientDataList", serverDataModel.getClientDataMap().values()); diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -27,7 +27,7 @@ private static final String CONFIGURATION_FILE_NAME = "irrigation.xml"; private static final String DEFAULT_LOG_FILE_DESTINATION = "irrigation.log"; - + private static final double DEFAULT_DOLLARS_PER_TOKEN = 0.05d; public ServerConfiguration() { @@ -59,7 +59,7 @@ protected String getServerConfigurationFilename() { return CONFIGURATION_FILE_NAME; } - + private final static String[] PRIORITY_STRINGS = { "A", "B", "C", "D", "E" }; public static String toPriorityString(int clientPriority) { @@ -70,7 +70,7 @@ return "Position not found"; } - public boolean isUndisruptedFlowRequired(){ + public boolean isUndisruptedFlowRequired() { return getBooleanProperty("undisrupted-flow-required", false); } @@ -83,69 +83,70 @@ } public String getInitialInstructions() { - ST template = createStringTemplate(getProperty("initial-instructions")); - template.groupThatCreatedThisInstance.registerRenderer(Number.class, new NumberRenderer()); - NumberFormat formatter = NumberFormat.getCurrencyInstance(); - template.add("showUpPayment", formatter.format(getShowUpPayment())); + ST template = createStringTemplate(getProperty("initial-instructions")); + template.groupThatCreatedThisInstance.registerRenderer(Number.class, new NumberRenderer()); + NumberFormat formatter = NumberFormat.getCurrencyInstance(); + template.add("showUpPayment", formatter.format(getShowUpPayment())); template.add("dollarsPerToken", formatter.format(getDollarsPerToken())); template.add("quizCorrectAnswerReward", formatter.format(getQuizCorrectAnswerReward())); - return template.render(); + return template.render(); } - + public String getChatInstructions() { return render(getProperty("chat-instructions")); } - + public String getChatDurationInMinutes() { long minutes = inMinutes(getChatDuration()); return String.format("%d minute%s", minutes, (minutes > 1) ? "s" : ""); } - + public double getTotalIncome(ClientData data) { return getTotalTokenEarnings(data) + getShowUpPayment() + getQuizEarnings(data); } - + public double getTotalTokenEarnings(ClientData data) { return data.getTotalTokens() * getDollarsPerToken(); } - + public double getTokenEarningsThisRound(ClientData data) { return data.getAllTokensEarnedThisRound() * getDollarsPerToken(); } - + public double getQuizEarnings(ClientData data) { return data.getCorrectQuizAnswers() * getQuizCorrectAnswerReward(); } - + public String getRestrictedVisibilityInstructions() { return render(getProperty("restricted-visibility-instructions")); } - + public boolean isRestrictedVisibility() { return getFieldOfVision() > 0; } - + /** - * Returns the number of neighbors visible on both sides of the participant. A negative value signifies that + * Returns the number of neighbors visible on both sides of the participant. A negative value signifies that * participants can see everything. + * * @return the number of neighbors visible to either side of each participant. */ public int getFieldOfVision() { return getIntProperty("field-of-vision", -1); } - + public double getQuizCorrectAnswerReward() { return getDoubleProperty("quiz-correct-answer-reward", DEFAULT_QUIZ_CORRECT_ANSWER_REWARD); } - + public double getMaximumQuizEarnings() { return getQuizCorrectAnswerReward() * getNumberOfQuizQuestions(); } - + public String getWelcomeInstructions() { return getProperty("welcome-instructions"); } - + public int getNumberOfQuizQuestions() { return getIntProperty("numberOfQuizQuestions", 6); } @@ -160,39 +161,43 @@ } return answers; } - + public String getQuizQuestion(int pageNumber) { return getProperty("general-instructionsq" + pageNumber); } public String getQuizInstructions() { - return render(getProperty("quiz-instructions")); + return render(getProperty("quiz-instructions")); } - + public String getWaterCollectedToTokensTable() { - return getProperty("water-collected-to-tokens-table"); + return getProperty("water-collected-to-tokens-table"); } public String getFinalInstructions() { return getProperty("final-instructions", "<b>The experiment is now over. Thanks for participating!</b>"); } - + public String getInvestmentInstructions() { return render(getProperty("investment-instructions")); } - + public int getNumberOfQuizPages() { return getIntProperty("quiz-pages", 2); } - + public int getChatDuration() { return getIntProperty("chat-duration", 60); } + public int getRoundDuration() { + return getIntProperty("round-duration", 50); + } + public String getGameScreenshotInstructions() { return render(getProperty("game-screenshot-instructions")); } - + public String getSameAsPreviousRoundInstructions() { return getProperty("same-as-previous-round-instructions"); } @@ -204,57 +209,57 @@ public double getDollarsPerToken() { return getDoubleProperty("dollars-per-token", DEFAULT_DOLLARS_PER_TOKEN); } - + public int getTokenEndowment() { return getIntProperty("token-endowment", 10); } public static int getTokensEarned(int waterCollected) { - if (waterCollected < 150) { - return 0; - } - else if (waterCollected < 200) { - return 1; - } - else if (waterCollected < 250) { - return 4; - } - else if (waterCollected < 300) { - return 10; - } - else if (waterCollected < 350) { - return 15; - } - else if (waterCollected < 400) { - return 18; - } - else if (waterCollected < 500) { - return 19; - } - else if (waterCollected < 550) { - return 20; - } - else if (waterCollected < 650) { - return 19; - } - else if (waterCollected < 700) { - return 18; - } - else if (waterCollected < 750) { - return 15; - } - else if (waterCollected < 800) { - return 10; - } - else if (waterCollected < 850) { - return 4; - } - else if (waterCollected < 900) { - return 1; - } - else { - return 0; - } + if (waterCollected < 150) { + return 0; + } + else if (waterCollected < 200) { + return 1; + } + else if (waterCollected < 250) { + return 4; + } + else if (waterCollected < 300) { + return 10; + } + else if (waterCollected < 350) { + return 15; + } + else if (waterCollected < 400) { + return 18; + } + else if (waterCollected < 500) { + return 19; + } + else if (waterCollected < 550) { + return 20; + } + else if (waterCollected < 650) { + return 19; + } + else if (waterCollected < 700) { + return 18; + } + else if (waterCollected < 750) { + return 15; + } + else if (waterCollected < 800) { + return 10; + } + else if (waterCollected < 850) { + return 4; + } + else if (waterCollected < 900) { + return 1; + } + else { + return 0; + } } public String getQuizResults(List<String> incorrectQuestionNumbers, Map<Object, Object> actualAnswers) { diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java --- a/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java +++ b/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java @@ -19,7 +19,7 @@ /** * $Id$ * - * + * * @author <a href='mailto:All...@as...'>Allen Lee</a>, Sanket Joshi * @version $Rev$ */ @@ -27,7 +27,7 @@ private ServerDataModel serverDataModel; private FacilitatorWindow facilitatorWindow; - + private Facilitator() { this(new ServerConfiguration()); } @@ -35,10 +35,10 @@ public Facilitator(ServerConfiguration configuration) { super(configuration); } - + private void initializeEventProcessors() { - addEventProcessor(new EventTypeProcessor<RegistrationEvent>(RegistrationEvent.class) { - @Override + addEventProcessor(new EventTypeProcessor<RegistrationEvent>(RegistrationEvent.class) { + @Override public void handle(RegistrationEvent registrationEvent) { facilitatorWindow.addInstructions(registrationEvent.getRoundConfiguration().getInstructions()); } @@ -60,7 +60,7 @@ void initialize() { facilitatorWindow = new FacilitatorWindow(this); - facilitatorWindow.setText(getServerConfiguration().getFacilitatorInstructions()); + facilitatorWindow.setInstructions(getServerConfiguration().getFacilitatorInstructions()); initializeEventProcessors(); } @@ -79,14 +79,14 @@ SwingUtilities.invokeLater(createGuiRunnable); } - void sendStartRoundOverride(){ + void sendStartRoundOverride() { transmit(new BeginExperimentRequest(getId())); } /* * Send a request to start a round */ - public void sendBeginRoundRequest() { + public void sendBeginRoundRequest() { transmit(new BeginRoundRequest(getId())); } @@ -98,7 +98,7 @@ return facilitatorWindow; } - public ServerDataModel getServerDataModel(){ + public ServerDataModel getServerDataModel() { return serverDataModel; } diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JLabel; @@ -19,7 +20,6 @@ import edu.asu.commons.irrigation.events.FacilitatorEndRoundEvent; import edu.asu.commons.irrigation.events.ShowGameScreenshotRequest; import edu.asu.commons.irrigation.events.ShowQuizRequest; -import edu.asu.commons.irrigation.model.ServerDataModel; import edu.asu.commons.ui.HtmlEditorPane; import edu.asu.commons.ui.UserInterfaceUtils; @@ -27,7 +27,7 @@ * $Id$ * * Basic facilitator interface for driving the experiment. - * + * * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Rev$ */ @@ -37,7 +37,7 @@ private Facilitator facilitator; - private JButton startRoundButton = null; + private JButton startRoundButton; private JButton beginChatButton; @@ -46,16 +46,19 @@ private JScrollPane informationScrollPane; private JButton showInstructionsButton; - + private JButton showQuizButton; - + private JButton showScreenshotButton; - -// private JButton displayInvestmentButton; - + + // private JButton displayInvestmentButton; + private StringBuilder builder = new StringBuilder(); - private JButton overrideButton; + private JButton overrideButton; + + private JButton stopRoundButton; + /** * This is the default constructor */ @@ -69,19 +72,21 @@ setLayout(new BorderLayout()); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); - buttonPanel.add(getShowInstructionsButton()); - buttonPanel.add(getShowScreenshotButton()); - buttonPanel.add(getBeginChatButton()); -// buttonPanel.add(getDisplayInvestmentButton()); - buttonPanel.add(getStartRoundButton()); - buttonPanel.add(getShowQuizButton()); - buttonPanel.add(getStartRoundOverrideButton()); + addToBoxLayout(buttonPanel, getShowInstructionsButton()); + addToBoxLayout(buttonPanel, getShowInstructionsButton()); + addToBoxLayout(buttonPanel, getShowScreenshotButton()); + addToBoxLayout(buttonPanel, getBeginChatButton()); + // addToBoxLayout(buttonPanel, getDisplayInvestmentButton()); + addToBoxLayout(buttonPanel, getStartRoundButton()); + addToBoxLayout(buttonPanel, getShowQuizButton()); + addToBoxLayout(buttonPanel, getStartRoundOverrideButton()); + addToBoxLayout(buttonPanel, getStopRoundButton()); add(buttonPanel, BorderLayout.NORTH); informationEditorPane = UserInterfaceUtils.createInstructionsEditorPane(); informationScrollPane = new JScrollPane(informationEditorPane); informationScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); informationScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - + JPanel messagePanel = new JPanel(new BorderLayout()); JLabel messagePanelLabel = new JLabel("System messages"); messagePanelLabel.setFont(UserInterfaceUtils.DEFAULT_PLAIN_FONT); @@ -98,7 +103,12 @@ splitPane.setDividerLocation(proportion); splitPane.setResizeWeight(proportion); } - + + private void addToBoxLayout(JPanel buttonPanel, JButton button) { + buttonPanel.add(button); + buttonPanel.add(Box.createHorizontalStrut(5)); + } + public void addMessage(String message) { try { messageEditorPane.getDocument().insertString(0, "-----\n" + message + "\n", null); @@ -107,13 +117,12 @@ } } - private JButton getShowInstructionsButton() { if (showInstructionsButton == null) { showInstructionsButton = new JButton("Show Instructions"); showInstructionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { -// enableInstructionButton.setEnabled(false); + // enableInstructionButton.setEnabled(false); facilitator.transmit(new ShowInstructionsRequest(facilitator.getId())); } }); @@ -122,9 +131,9 @@ } /** - * This method initializes Start_Facilitator_Button - * - * @return javax.swing.JButton + * This method initializes Start_Facilitator_Button + * + * @return javax.swing.JButton */ private JButton getBeginChatButton() { @@ -132,7 +141,7 @@ beginChatButton = new JButton("Begin Chat"); beginChatButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { - //At present default isChatEnabledBeforeRound() value isscreen false + // At present default isChatEnabledBeforeRound() value isscreen false if (facilitator.getCurrentRoundConfiguration().isChatEnabledBeforeRound()) { facilitator.transmit(new BeginChatRoundRequest(facilitator.getId())); } @@ -141,36 +150,36 @@ } return beginChatButton; } - + private JButton getStartRoundOverrideButton() { - if (overrideButton == null) { - overrideButton = new JButton("Override"); - overrideButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - facilitator.sendStartRoundOverride(); - } - }); - } - return overrideButton; + if (overrideButton == null) { + overrideButton = new JButton("Override"); + overrideButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + facilitator.sendStartRoundOverride(); + } + }); + } + return overrideButton; } - -// private JButton getDisplayInvestmentButton() { -// if (displayInvestmentButton == null) { -// displayInvestmentButton = new JButton("Show Investment Screen"); -// displayInvestmentButton.addActionListener(new ActionListener() { -// public void actionPerformed(ActionEvent event) { -// facilitator.transmit(new ShowTokenInvestmentScreenRequest(facilitator.getId())); -// } -// }); -// } -// return displayInvestmentButton; -// } + + // private JButton getDisplayInvestmentButton() { + // if (displayInvestmentButton == null) { + // displayInvestmentButton = new JButton("Show Investment Screen"); + // displayInvestmentButton.addActionListener(new ActionListener() { + // public void actionPerformed(ActionEvent event) { + // facilitator.transmit(new ShowTokenInvestmentScreenRequest(facilitator.getId())); + // } + // }); + // } + // return displayInvestmentButton; + // } public Facilitator getFacilitator() { return facilitator; } - private JButton getStartRoundButton() { + private JButton getStartRoundButton() { if (startRoundButton == null) { startRoundButton = new JButton("Start round"); startRoundButton.addActionListener(new ActionListener() { @@ -181,7 +190,19 @@ } return startRoundButton; } - + + private JButton getStopRoundButton() { + if (stopRoundButton == null) { + stopRoundButton = new JButton("Stop round"); + stopRoundButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + facilitator.sendEndRoundRequest(); + } + }); + } + return stopRoundButton; + } + private JButton getShowQuizButton() { if (showQuizButton == null) { showQuizButton = new JButton("Show quiz"); @@ -193,8 +214,8 @@ } return showQuizButton; } - - public void setText(final String text) { + + public void setInstructions(final String text) { SwingUtilities.invokeLater(new Runnable() { public void run() { informationEditorPane.setText(text); @@ -204,20 +225,16 @@ } /** - * FIXME: replace with StringTemplate - * - * @return + * + * @param event */ public void endRound(FacilitatorEndRoundEvent event) { - ServerDataModel model = event.getServerDataModel(); - builder = new StringBuilder(model.generateFacilitatorDebriefing()); - - setText(builder.toString()); + setInstructions(event.getServerDataModel().generateFacilitatorDebriefing()); } - + public void addInstructions(String instructions) { builder.append(instructions); - setText(builder.toString()); + setInstructions(builder.toString()); } private JButton getShowScreenshotButton() { diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -424,7 +424,7 @@ </entry><entry key="same-as-previous-round-instructions"><![CDATA[ - <h3>Round {self.roundNumber} Instructions</h3> + <h2>Round {self.roundNumber} Instructions</h2><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>{self.specialInstructions}</p> @@ -506,6 +506,7 @@ incorrectly are highlighted in red. Please see below for more details. {endif} </p> + <br><hr><p><span class='q1'>Question 1:</span><br> Given an existing infrastructure efficiency of 20%, if the five participants invest diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -424,7 +424,7 @@ </entry><entry key="same-as-previous-round-instructions"><![CDATA[ - <h3>Round {self.roundNumber} Instructions</h3> + <h2>Round {self.roundNumber} Instructions</h2><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>{self.specialInstructions}</p> @@ -506,6 +506,7 @@ incorrectly are highlighted in red. Please see below for more details. {endif} </p> + <br><hr><p><span class='q1'>Question 1:</span><br> Given an existing infrastructure efficiency of 20%, if the five participants invest diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -424,7 +424,7 @@ </entry><entry key="same-as-previous-round-instructions"><![CDATA[ - <h3>Round {self.roundNumber} Instructions</h3> + <h2>Round {self.roundNumber} Instructions</h2><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>{self.specialInstructions}</p> @@ -506,6 +506,7 @@ incorrectly are highlighted in red. Please see below for more details. {endif} </p> + <br><hr><p><span class='q1'>Question 1:</span><br> Given an existing infrastructure efficiency of 20%, if the five participants invest diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -424,7 +424,7 @@ </entry><entry key="same-as-previous-round-instructions"><![CDATA[ - <h3>Round {self.roundNumber} Instructions</h3> + <h2>Round {self.roundNumber} Instructions</h2><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>{self.specialInstructions}</p> @@ -506,6 +506,7 @@ incorrectly are highlighted in red. Please see below for more details. {endif} </p> + <br><hr><p><span class='q1'>Question 1:</span><br> Given an existing infrastructure efficiency of 20%, if the five participants invest diff -r 7a67c82159e2af3e2d42173649081dc0f36499fe -r c3913959c96218a3ab8ae3eccff6272372b4679d 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 @@ -424,7 +424,7 @@ </entry><entry key="same-as-previous-round-instructions"><![CDATA[ - <h3>Round {self.roundNumber} Instructions</h3> + <h2>Round {self.roundNumber} Instructions</h2><hr><p>Round {self.roundNumber} is the same as the previous round.</p><p>{self.specialInstructions}</p> @@ -506,6 +506,7 @@ incorrectly are highlighted in red. Please see below for more details. {endif} </p> + <br><hr><p><span class='q1'>Question 1:</span><br> Given an existing infrastructure efficiency of 20%, if the five participants invest 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. |