Index: lams_admin/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_admin/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.16 -r1.1.2.17
--- lams_admin/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:57:03 -0000 1.1.2.16
+++ lams_admin/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:26 -0000 1.1.2.17
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_central/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.21 -r1.1.2.22
--- lams_central/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:50 -0000 1.1.2.21
+++ lams_central/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:22 -0000 1.1.2.22
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_gradebook/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_gradebook/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.6 -r1.1.2.7
--- lams_gradebook/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:46 -0000 1.1.2.6
+++ lams_gradebook/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:21 -0000 1.1.2.7
@@ -205,6 +205,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so reload
+ location.reload();
+ };
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_learning/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_learning/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.17 -r1.1.2.18
--- lams_learning/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:42 -0000 1.1.2.17
+++ lams_learning/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:25 -0000 1.1.2.18
@@ -205,6 +205,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so reload
+ location.reload();
+ };
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_monitoring/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/.classpath,v
diff -u -r1.16.2.8 -r1.16.2.9
--- lams_monitoring/.classpath 25 Nov 2014 10:47:09 -0000 1.16.2.8
+++ lams_monitoring/.classpath 4 May 2017 13:33:30 -0000 1.16.2.9
@@ -19,5 +19,6 @@
+
Index: lams_monitoring/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_monitoring/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.16 -r1.1.2.17
--- lams_monitoring/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:52 -0000 1.1.2.16
+++ lams_monitoring/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:30 -0000 1.1.2.17
@@ -205,6 +205,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so reload
+ location.reload();
+ };
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_assessment/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_assessment/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_assessment/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:56 -0000 1.1.2.18
+++ lams_tool_assessment/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:12 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_bbb/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_bbb/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_bbb/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:44 -0000 1.1.2.19
+++ lams_tool_bbb/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:18 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_chat/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_chat/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_chat/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:48 -0000 1.1.2.19
+++ lams_tool_chat/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:34 -0000 1.1.2.20
@@ -205,6 +205,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so reload
+ location.reload();
+ };
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_chat/web/includes/javascript/learning.js
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_chat/web/includes/javascript/learning.js,v
diff -u -r1.15.2.5 -r1.15.2.6
--- lams_tool_chat/web/includes/javascript/learning.js 7 Dec 2016 18:08:55 -0000 1.15.2.5
+++ lams_tool_chat/web/includes/javascript/learning.js 4 May 2017 13:33:34 -0000 1.15.2.6
@@ -23,9 +23,12 @@
var selectedUser = null,
// init the connection with server using server URL but with different protocol
chatToolWebsocket = new WebSocket(APP_URL.replace('http', 'ws') + 'learningWebsocket?toolSessionID=' + TOOL_SESSION_ID);
+
+ chatToolWebsocket.onclose = function(){
+ location.reload();
+ };
chatToolWebsocket.onmessage = function(e){
-
// create JSON object
var input = JSON.parse(e.data);
// clear old messages
Index: lams_tool_daco/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_daco/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_daco/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:57:01 -0000 1.1.2.18
+++ lams_tool_daco/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:17 -0000 1.1.2.19
@@ -205,6 +205,12 @@
// it is not an obvious place to init the websocket, but we need lesson ID
commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so reload
+ location.reload();
+ };
// when the server pushes new commands
commandWebsocket.onmessage = function(e){
// read JSON object
Index: lams_tool_forum/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.20 -r1.1.2.21
--- lams_tool_forum/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:57:00 -0000 1.1.2.20
+++ lams_tool_forum/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:20 -0000 1.1.2.21
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_gmap/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_gmap/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_gmap/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:45 -0000 1.1.2.19
+++ lams_tool_gmap/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:15 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_images/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_images/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_images/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:49 -0000 1.1.2.18
+++ lams_tool_images/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:38 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_imscc/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_imscc/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_imscc/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:44 -0000 1.1.2.18
+++ lams_tool_imscc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:18 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_kaltura/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_kaltura/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_kaltura/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:57:02 -0000 1.1.2.18
+++ lams_tool_kaltura/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:27 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_lamc/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_lamc/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_lamc/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:59 -0000 1.1.2.19
+++ lams_tool_lamc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:16 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_laqa/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_laqa/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.20 -r1.1.2.21
--- lams_tool_laqa/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:43 -0000 1.1.2.20
+++ lams_tool_laqa/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:10 -0000 1.1.2.21
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_larsrc/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_larsrc/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:51 -0000 1.1.2.18
+++ lams_tool_larsrc/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:11 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_leader/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_leader/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_leader/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:54 -0000 1.1.2.18
+++ lams_tool_leader/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:33 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_leader/web/pages/learning/leaderselection.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_leader/web/pages/learning/leaderselection.jsp,v
diff -u -r1.2.2.5 -r1.2.2.6
--- lams_tool_leader/web/pages/learning/leaderselection.jsp 20 Apr 2017 04:42:59 -0000 1.2.2.5
+++ lams_tool_leader/web/pages/learning/leaderselection.jsp 4 May 2017 13:33:33 -0000 1.2.2.6
@@ -27,11 +27,15 @@
}
//init the connection with server using server URL but with different protocol
- var websocket = new WebSocket(''.replace('http', 'ws')
+ var leaderWebsocket = new WebSocket(''.replace('http', 'ws')
+ 'learningWebsocket?toolSessionID=' + ${toolSessionID});
+ leaderWebsocket.onclose = function(){
+ location.reload();
+ };
+
// run when the leader has just been selected
- websocket.onmessage = function(e) {
+ leaderWebsocket.onmessage = function(e) {
// create JSON object
var input = JSON.parse(e.data);
Index: lams_tool_mindmap/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_mindmap/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_mindmap/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:41 -0000 1.1.2.18
+++ lams_tool_mindmap/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:12 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_nb/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_nb/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:48 -0000 1.1.2.19
+++ lams_tool_nb/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:35 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_notebook/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_notebook/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.21 -r1.1.2.22
--- lams_tool_notebook/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:54 -0000 1.1.2.21
+++ lams_tool_notebook/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:19 -0000 1.1.2.22
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_pixlr/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_pixlr/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_pixlr/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:58 -0000 1.1.2.18
+++ lams_tool_pixlr/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:29 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_preview/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_preview/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_preview/web/WEB-INF/tags/Page.tag 24 Mar 2017 01:12:58 -0000 1.1.2.18
+++ lams_tool_preview/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:37 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -245,7 +255,7 @@
Exit
Notebook
- Restart
+ Restart
@@ -339,7 +349,3 @@
-
-
-
-
Index: lams_tool_sbmt/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_sbmt/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_sbmt/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:47 -0000 1.1.2.19
+++ lams_tool_sbmt/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:24 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_scratchie/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.18 -r1.1.2.19
--- lams_tool_scratchie/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:56:53 -0000 1.1.2.18
+++ lams_tool_scratchie/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:31 -0000 1.1.2.19
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_scratchie/web/pages/learning/questionlist.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scratchie/web/pages/learning/questionlist.jsp,v
diff -u -r1.12.2.7 -r1.12.2.8
--- lams_tool_scratchie/web/pages/learning/questionlist.jsp 14 Dec 2016 18:51:20 -0000 1.12.2.7
+++ lams_tool_scratchie/web/pages/learning/questionlist.jsp 4 May 2017 13:33:31 -0000 1.12.2.8
@@ -28,11 +28,14 @@
});
//init the connection with server using server URL but with different protocol
- var websocket = new WebSocket(''.replace('http', 'ws')
+ var scratchieWebsocket = new WebSocket(''.replace('http', 'ws')
+ 'learningWebsocket?toolSessionID=' + ${toolSessionID});
+ scratchieWebsocket.onclose = function() {
+ location.reload();
+ };
// run when the server pushes new reports and vote statistics
- websocket.onmessage = function(e) {
+ scratchieWebsocket.onmessage = function(e) {
// create JSON object
var input = JSON.parse(e.data);
Index: lams_tool_scribe/web/WEB-INF/tags/Page.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/WEB-INF/tags/Attic/Page.tag,v
diff -u -r1.1.2.19 -r1.1.2.20
--- lams_tool_scribe/web/WEB-INF/tags/Page.tag 24 Mar 2017 00:57:04 -0000 1.1.2.19
+++ lams_tool_scribe/web/WEB-INF/tags/Page.tag 4 May 2017 13:33:34 -0000 1.1.2.20
@@ -146,6 +146,28 @@
}
$('#sidebar').show();
}
+
+ function initCommandWebsocket(){
+ // it is not an obvious place to init the websocket, but we need lesson ID
+ commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
+
+ commandWebsocket.onclose = function(){
+ // maybe iPad went into sleep mode?
+ // we need this websocket working, so init it again
+ initCommandWebsocket();
+ };
+ // when the server pushes new commands
+ commandWebsocket.onmessage = function(e){
+ // read JSON object
+ var command = JSON.parse(e.data);
+ if (command.message) {
+ alert(command.message);
+ }
+ if (command.redirectURL) {
+ window.location.href = command.redirectURL;
+ }
+ };
+ }
$(document).ready(function() {
var showControlBar = 1; // 0/1/2 none/full/keep space
@@ -203,19 +225,7 @@
});
}
- // it is not an obvious place to init the websocket, but we need lesson ID
- commandWebsocket = new WebSocket(LEARNING_URL.replace('http', 'ws') + 'commandWebsocket?lessonID=' + lessonId);
- // when the server pushes new commands
- commandWebsocket.onmessage = function(e){
- // read JSON object
- var command = JSON.parse(e.data);
- if (command.message) {
- alert(command.message);
- }
- if (command.redirectURL) {
- window.location.href = command.redirectURL;
- }
- };
+ initCommandWebsocket();
}
});
}
@@ -339,7 +349,3 @@
-
-
-
-
\ No newline at end of file
Index: lams_tool_scribe/web/pages/learning/learning.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_scribe/web/pages/learning/learning.jsp,v
diff -u -r1.13.2.2 -r1.13.2.3
--- lams_tool_scribe/web/pages/learning/learning.jsp 12 Apr 2016 12:04:02 -0000 1.13.2.2
+++ lams_tool_scribe/web/pages/learning/learning.jsp 4 May 2017 13:33:34 -0000 1.13.2.3
@@ -11,13 +11,17 @@