Index: lams_admin/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('
').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_central/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_gradebook/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_learning/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_monitoring/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_chat/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_daco/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_doku/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_doku/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_doku/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_forum/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_gmap/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_images/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_imscc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_lamc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_laqa/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_larsrc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_leader/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_mindmap/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_nb/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_notebook/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_pixlr/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_preview/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_sbmt/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_scribe/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_survey/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_task/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_vote/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_wiki/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_tool_zoom/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_tool_zoom/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_tool_zoom/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() { Index: lams_www/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r973a921a8f59a78026f54c84d6b04e2378bac517 -r06a1b71e208bdebf43003c989a1685a824f525bd --- lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 973a921a8f59a78026f54c84d6b04e2378bac517) +++ lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 06a1b71e208bdebf43003c989a1685a824f525bd) @@ -217,22 +217,41 @@ } else { alert(command.message); } - } + // if learner's currently displayed page has hookTrigger same as in the JSON // then a function also defined on that page will run if (command.hookTrigger && command.hookTrigger == commandWebsocketHookTrigger && typeof commandWebsocketHook === 'function') { commandWebsocketHook(command.hookParams); } + if (command.redirectURL) { window.location.href = command.redirectURL; } + if (command.discussion) { + var discussionCommand = $('#discussion-sentiment-command'); + if (discussionCommand.length === 0) { + discussionCommand = $('').attr('id', 'discussion-sentiment-command').appendTo('body'); + } + discussionCommand.load(LEARNING_URL + "discussionSentiment/" + command.discussion + ".do", { + lessonId : lessonId + }); + } + // reset ping timer clearTimeout(commandWebsocketPingTimeout); commandWebsocketPingFunc(true); }; + + // check if there is a running discussion; if so, a websocket command will come to display the widget + $.ajax({ + url : LEARNING_URL + "discussionSentiment/checkLearner.do", + data: { + lessonId : lessonId + } + }); } $(document).ready(function() {