Index: lams_admin/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_admin/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_admin/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_central/src/java/org/lamsfoundation/lams/comments/web/CommentController.java =================================================================== diff -u -rf3e44aee5373a1233080ea5acd1cb5959bb46544 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_central/src/java/org/lamsfoundation/lams/comments/web/CommentController.java (.../CommentController.java) (revision f3e44aee5373a1233080ea5acd1cb5959bb46544) +++ lams_central/src/java/org/lamsfoundation/lams/comments/web/CommentController.java (.../CommentController.java) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -77,8 +77,8 @@ private ISecurityService securityService; /** - * Display the comments for a given external id (usually tool session id). The session comments will be - * arranged by Tree structure and loaded thread by thread (with paging). + * Display the comments for a given external id (usually tool session id). The session comments will be arranged by + * Tree structure and loaded thread by thread (with paging). */ @SuppressWarnings("unchecked") @RequestMapping("/init") @@ -156,7 +156,10 @@ sessionMap.put(CommentConstants.ATTR_ROOT_COMMENT_UID, rootComment.getUid()); prepareViewTopicData(request, sessionMap, pageSize, sortBy, true); - return "comments/comments"; + + boolean newUI = WebUtil.readBooleanParam(request, "newUI", false); + String viewDir = newUI ? "comments5" : "comments"; + return viewDir + "/comments"; } private void throwException(String msg, String loginName, Long externalId, Integer externalType, @@ -179,8 +182,8 @@ private boolean monitorInToolSession(Long toolSessionId, User user, SessionMap sessionMap) { - if (ToolAccessMode.TEACHER - .equals(WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE)))) { + if (ToolAccessMode.TEACHER.equals( + WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE)))) { GroupedToolSession toolSession = (GroupedToolSession) lamsCoreToolService.getToolSessionById(toolSessionId); return securityService.isLessonMonitor(toolSession.getLesson().getLessonId(), user.getUserId(), "Comment Monitoring Tasks"); @@ -190,9 +193,9 @@ } /** - * Display the comments for a given external id (usually tool session id). The session comments will be - * arranged by Tree structure and loaded thread by thread (with paging). This may set a new value of sort by, so - * make sure the session is updated. + * Display the comments for a given external id (usually tool session id). The session comments will be arranged by + * Tree structure and loaded thread by thread (with paging). This may set a new value of sort by, so make sure the + * session is updated. */ @RequestMapping("/viewTopic") @SuppressWarnings("unchecked") @@ -209,7 +212,10 @@ } prepareViewTopicData(request, sessionMap, pageSize, sortBy, sticky); - return (sticky ? "comments/allviewwrapper" : "comments/topicviewwrapper"); + + boolean newUI = WebUtil.readBooleanParam(request, "newUI", false); + String viewDir = newUI ? "comments5" : "comments"; + return viewDir + (sticky ? "/allviewwrapper" : "/topicviewwrapper"); } private void prepareViewTopicData(HttpServletRequest request, SessionMap sessionMap, @@ -344,8 +350,8 @@ User user = getCurrentUser(request); ToolAccessMode mode = WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE)); - boolean isMonitor = ToolAccessMode.TEACHER.equals(mode) - && monitorInToolSession(externalId, user, sessionMap); + boolean isMonitor = + ToolAccessMode.TEACHER.equals(mode) && monitorInToolSession(externalId, user, sessionMap); if (!isMonitor && !learnerInToolSession(externalId, user)) { throwException("New comment: User does not have the rights to access the comments. ", user.getLogin(), externalId, externalType, externalSignature); @@ -416,8 +422,8 @@ User user = getCurrentUser(request); ToolAccessMode mode = WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE)); - boolean isMonitor = ToolAccessMode.TEACHER.equals(mode) - && monitorInToolSession(externalId, user, sessionMap); + boolean isMonitor = + ToolAccessMode.TEACHER.equals(mode) && monitorInToolSession(externalId, user, sessionMap); if (!isMonitor && !learnerInToolSession(externalId, user)) { throwException("New comment: User does not have the rights to access the comments. ", user.getLogin(), externalId, externalType, externalSignature); @@ -497,9 +503,10 @@ } // Don't update anonymous if it is monitoring - boolean isMonitoring = ToolAccessMode.TEACHER - .equals(WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE))); - Boolean commentAnonymous = isMonitoring ? null + boolean isMonitoring = ToolAccessMode.TEACHER.equals( + WebUtil.getToolAccessMode((String) sessionMap.get(AttributeNames.ATTR_MODE))); + Boolean commentAnonymous = isMonitoring + ? null : WebUtil.readBooleanParam(request, CommentConstants.ATTR_COMMENT_ANONYMOUS_EDIT, false); ObjectNode ObjectNode; @@ -512,8 +519,8 @@ CommentDTO originalComment = commentService.getComment(commentId); User user = getCurrentUser(request); - if (!originalComment.getComment().getCreatedBy().equals(user) - && !monitorInToolSession(externalId, user, sessionMap)) { + if (!originalComment.getComment().getCreatedBy().equals(user) && !monitorInToolSession(externalId, user, + sessionMap)) { throwException( "Update comment: User does not have the rights to update the comment " + commentId + ". ", user.getLogin(), externalId, externalType, externalSignature); @@ -633,8 +640,7 @@ if (!monitorInToolSession(externalId, user, sessionMap)) { throwException( "Make comment sticky: User does not have the rights to make the comment stick to the top of the list " - + commentId + ". ", - user.getLogin()); + + commentId + ". ", user.getLogin()); } if (originalComment.getComment().getCommentLevel() != 1) { throwException("Make comment sticky: Comment much be level 1 to stick to the top of the list " + commentId Index: lams_central/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_central/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_central/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_gradebook/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_gradebook/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_gradebook/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_learning/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_learning/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_learning/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_monitoring/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_monitoring/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_monitoring/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_assessment/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_assessment/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_assessment/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_chat/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_chat/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_chat/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_daco/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_daco/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_daco/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_doku/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_doku/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_doku/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_forum/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_forum/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_forum/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_gmap/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_gmap/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_gmap/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_images/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_images/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_images/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_imscc/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_imscc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_imscc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_lamc/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_lamc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_lamc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_laqa/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_laqa/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_laqa/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_larsrc/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_larsrc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_larsrc/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_leader/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_leader/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_leader/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_mindmap/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_mindmap/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_mindmap/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_nb/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_nb/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_nb/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_notebook/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_notebook/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_notebook/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_pixlr/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_pixlr/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_pixlr/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_preview/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_preview/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_preview/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_sbmt/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_sbmt/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_sbmt/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_scratchie/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_scratchie/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_scratchie/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_scribe/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_scribe/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_scribe/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_spreadsheet/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_spreadsheet/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_spreadsheet/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_survey/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_survey/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_survey/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_task/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_task/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_task/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_vote/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_vote/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_vote/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_whiteboard/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_whiteboard/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_whiteboard/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_wiki/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_wiki/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_wiki/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_tool_zoom/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_tool_zoom/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_tool_zoom/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + } Index: lams_www/web/WEB-INF/tags/PageLearner.tag =================================================================== diff -u -rbf60766c348fc37bc6671a6bbb3778a3173b5777 -r26a34c350d04eba17d74496a06d0e4664c0925e7 --- lams_www/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision bf60766c348fc37bc6671a6bbb3778a3173b5777) +++ lams_www/web/WEB-INF/tags/PageLearner.tag (.../PageLearner.tag) (revision 26a34c350d04eba17d74496a06d0e4664c0925e7) @@ -40,7 +40,6 @@ - @@ -54,18 +53,18 @@ initLearnerPage(${toolSessionID}); }); - function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { - let currentTime = new Date().getTime(), - lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); - // check if autosave does not happen too often - if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { - // this label is required only in tool which implement autosave - alert(''); - return false; - } - localStorage.setItem('lamsAutosaveTimestamp', currentTime); - return true; - } + function preventLearnerAutosaveFromMultipleTabs(autosaveInterval) { + let currentTime = new Date().getTime(), + lamsAutosaveTimestamp = +localStorage.getItem('lamsAutosaveTimestamp'); + // check if autosave does not happen too often + if (autosaveInterval > 0 && lamsAutosaveTimestamp && lamsAutosaveTimestamp + autosaveInterval/2 > currentTime) { + // this label is required only in tool which implement autosave + alert(''); + return false; + } + localStorage.setItem('lamsAutosaveTimestamp', currentTime); + return true; + }