Index: lams_admin/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_admin/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_central/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r0e9eca8da006863730e793b75a47803bc6142c67 -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 0e9eca8da006863730e793b75a47803bc6142c67) +++ lams_central/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_gradebook/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_gradebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_learning/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1f7150d6142f994d113ba543736a9f7c0e154337 -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1f7150d6142f994d113ba543736a9f7c0e154337) +++ lams_learning/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_monitoring/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_monitoring/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_chat/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_chat/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_daco/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_daco/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_doku/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r24ebb6c91f49a10f1e5718036b3a3c1a80c3314f -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_doku/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 24ebb6c91f49a10f1e5718036b3a3c1a80c3314f) +++ lams_tool_doku/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_forum/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_forum/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_gmap/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r36cf71acc82bfe6bc8409a8419617c82bd4f31c0 -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 36cf71acc82bfe6bc8409a8419617c82bd4f31c0) +++ lams_tool_gmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_images/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_images/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_imscc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_imscc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_lamc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_lamc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_laqa/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_laqa/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_larsrc/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_larsrc/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_leader/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_leader/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_mindmap/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_mindmap/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_nb/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_nb/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_notebook/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_notebook/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_pixlr/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_pixlr/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_preview/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1042117ad93a6a9f93d8b1c8be7e718b7efd383f -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1042117ad93a6a9f93d8b1c8be7e718b7efd383f) +++ lams_tool_preview/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_sbmt/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_sbmt/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_scratchie/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_scratchie/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_scratchie/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_scribe/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_scribe/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_spreadsheet/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_survey/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_survey/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_task/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_task/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_vote/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_vote/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_wiki/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r1abddf98cd1cef4c2bd78bedfa702e0908932ccd -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1abddf98cd1cef4c2bd78bedfa702e0908932ccd) +++ lams_tool_wiki/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_tool_zoom/web/WEB-INF/tags/Page.tag =================================================================== diff -u -rcd28f26327e5afe5f9797847d801eba0abab9144 -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_tool_zoom/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision cd28f26327e5afe5f9797847d801eba0abab9144) +++ lams_tool_zoom/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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 Index: lams_www/web/WEB-INF/tags/Page.tag =================================================================== diff -u -r4b717d41f12b0538fb1c04e86a0b389aa2eecc03 -r1d57e77980d70c39242b61da2705eebab2f421af --- lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 4b717d41f12b0538fb1c04e86a0b389aa2eecc03) +++ lams_www/web/WEB-INF/tags/Page.tag (.../Page.tag) (revision 1d57e77980d70c39242b61da2705eebab2f421af) @@ -207,7 +207,17 @@ // read JSON object var command = JSON.parse(e.data); if (command.message) { - alert(command.message); + // some tools implement autosave feature + // if it is such a tool, trigger it + if (command.message === 'autosave') { + // the name of this function is same in all tools + if (typeof learnerAutosave == 'function') { + learnerAutosave(); + } + } 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