Index: lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/LearningWebsocketServer.java =================================================================== diff -u -rf06669784fcf047185a7f9c48587b3096474aa2a -r2bc7ead1354db2ac929b07aad9ae32e82c0b7456 --- lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/LearningWebsocketServer.java (.../LearningWebsocketServer.java) (revision f06669784fcf047185a7f9c48587b3096474aa2a) +++ lams_tool_scratchie/src/java/org/lamsfoundation/lams/tool/scratchie/web/action/LearningWebsocketServer.java (.../LearningWebsocketServer.java) (revision 2bc7ead1354db2ac929b07aad9ae32e82c0b7456) @@ -70,15 +70,7 @@ if (toolSession.isScratchingFinished()) { boolean isWaitingForLeaderToSubmit = LearningWebsocketServer.getScratchieService() .isWaitingForLeaderToSubmit(toolSession); - if (isWaitingForLeaderToSubmit) { - Object cache = LearningWebsocketServer.cache.get(toolSessionId); - // missing cache is a marker that we've been here before, - // so no need to send refresh again - if (cache != null) { - LearningWebsocketServer.cache.remove(toolSessionId); - LearningWebsocketServer.sendPageRefreshRequest(toolSessionId); - } - } else { + if (!isWaitingForLeaderToSubmit) { // this should make all websockets close on client side, // so next run will not happen LearningWebsocketServer.sendCloseRequest(toolSessionId); @@ -249,27 +241,6 @@ } } - /** - * The time limit is expired but leader hasn't submitted required notebook/burning questions yet. Non-leaders - * will need to refresh the page in order to stop showing them questions page. - */ - public static void sendPageRefreshRequest(Long toolSessionId) throws JSONException, IOException { - Set sessionWebsockets = LearningWebsocketServer.websockets.get(toolSessionId); - if (sessionWebsockets == null) { - return; - } - - JSONObject responseJSON = new JSONObject(); - responseJSON.put("pageRefresh", true); - String response = responseJSON.toString(); - - for (Session websocket : sessionWebsockets) { - if (websocket.isOpen()) { - websocket.getBasicRemote().sendText(response); - } - } - } - private static IScratchieService getScratchieService() { if (LearningWebsocketServer.scratchieService == null) { LearningWebsocketServer.scratchieService = ScratchieServiceProxy Index: lams_tool_scratchie/web/pages/learning/questionlist.jsp =================================================================== diff -u -rf06669784fcf047185a7f9c48587b3096474aa2a -r2bc7ead1354db2ac929b07aad9ae32e82c0b7456 --- lams_tool_scratchie/web/pages/learning/questionlist.jsp (.../questionlist.jsp) (revision f06669784fcf047185a7f9c48587b3096474aa2a) +++ lams_tool_scratchie/web/pages/learning/questionlist.jsp (.../questionlist.jsp) (revision 2bc7ead1354db2ac929b07aad9ae32e82c0b7456) @@ -65,13 +65,6 @@ // create JSON object var input = JSON.parse(e.data); - //time limit is expired but leader hasn't submitted required notebook/burning questions yet. Non-leaders - //will need to refresh the page in order to stop showing them questions page. - if (input.pageRefresh) { - location.reload(); - return; - } - // reset ping timer clearTimeout(scratchieWebsocketPingTimeout); scratchieWebsocketPingFunc(true);