[virtualcommons-svn] commit/irrigation: 3 new changesets
Status: Beta
Brought to you by:
alllee
From: Bitbucket <com...@bi...> - 2012-02-15 07:25:43
|
3 new commits in irrigation: https://bitbucket.org/virtualcommons/irrigation/changeset/dc8d504e6a2d/ changeset: dc8d504e6a2d user: alllee date: 2012-02-15 08:22:50 summary: un-italicizing chat messages affected #: 1 file diff -r 6ee2823f546279040678104de10375b07897ee04 -r dc8d504e6a2d9fecac08a739586a790fa09cfa2e 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 @@ -177,7 +177,7 @@ } try { document.insertString(0, chatHandle, document.getStyle("bold")); - document.insertString(chatHandle.length(), message + "\n", document.getStyle("italic")); + document.insertString(chatHandle.length(), message + "\n", null); messageWindow.setCaretPosition(0); } catch (BadLocationException e) { https://bitbucket.org/virtualcommons/irrigation/changeset/e8e76f4099c3/ changeset: e8e76f4099c3 user: alllee date: 2012-02-15 08:24:56 summary: fixes issue 10 but adds a new requirement for an explicit Show Instructions after all quizzes have been submitted. Also need to consider whether or not to move the quiz earnings out of the debriefing table as it might be inappropriate to show visible participant quiz earnings. affected #: 1 file diff -r dc8d504e6a2d9fecac08a739586a790fa09cfa2e -r e8e76f4099c36f7eb587954e5595314a706c27b5 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 @@ -209,9 +209,11 @@ } else { // this only works in between practice rounds #1 & #2 or after practice round 2 - setInstructions(instructionsBuilder.toString()); + // should just regenerate all the instructions... nextButton.setEnabled(false); disableQuiz(); + showDebriefing(false); +// setInstructions(instructionsBuilder.toString()); } } }); @@ -220,13 +222,7 @@ return nextButton; } -// private CanalAnimationPanel getCanalAnimationPanel() { -// if (canalAnimationPanel == null) { -// canalAnimationPanel = new CanalAnimationPanel(40); -// } -// return canalAnimationPanel; -// } - + // FIXME: replace with StringTemplate private String getQuizPage() { StringBuilder builder = new StringBuilder(); String quizPage = getServerConfiguration().getQuizPage(currentQuizPageNumber); @@ -465,7 +461,10 @@ nextButton.setEnabled(true); } // quizzesAnswered++; - client.transmit(new QuizResponseEvent(client.getId(), currentQuizPageNumber, responses, incorrectAnswers)); + QuizResponseEvent event = new QuizResponseEvent(client.getId(), currentQuizPageNumber, responses, incorrectAnswers); + System.err.println("Correct answers: " + event.getNumberOfCorrectQuizAnswers()); + clientDataModel.getClientData().addCorrectQuizAnswers(event.getNumberOfCorrectQuizAnswers()); + client.transmit(event); setInstructions(getQuizPage(), true); } }; @@ -644,6 +643,11 @@ * Invoked when the show instructions button is pressed. */ public void showInstructions() { - displayInstructions(getServerConfiguration().getInitialInstructions()); + if (clientDataModel == null || clientDataModel.getRoundConfiguration().isFirstRound()) { + displayInstructions(getServerConfiguration().getInitialInstructions()); + } + else { + displayInstructions(clientDataModel.getRoundConfiguration().getInstructions()); + } } } https://bitbucket.org/virtualcommons/irrigation/changeset/2063dc891c99/ changeset: 2063dc891c99 user: alllee date: 2012-02-15 08:25:26 summary: fixing bug, ShowRequest handler needs to accept subtypes affected #: 1 file diff -r e8e76f4099c36f7eb587954e5595314a706c27b5 -r 2063dc891c99de0530f8c309afb4bef656c64409 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 @@ -150,7 +150,7 @@ } } }); - addEventProcessor(new EventTypeProcessor<ShowRequest>(ShowRequest.class) { + addEventProcessor(new EventTypeProcessor<ShowRequest>(ShowRequest.class, true) { @Override public void handle(ShowRequest request) { if (request.getId().equals(getFacilitatorId())) { @@ -404,8 +404,7 @@ process(group); } catch (RuntimeException exception) { - exception.printStackTrace(); - getLogger().throwing(IrrigationServerStateMachine.class.getName(), "processRound", exception); + sendFacilitatorMessage("Couldn't process group: " + exception.getMessage(), exception); } } // lastTime = System.currentTimeMillis(); 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. |