Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java,v diff -u -r1.20.2.8 -r1.20.2.9 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java 4 Apr 2017 12:27:05 -0000 1.20.2.8 +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/IImageGalleryService.java 17 May 2017 01:26:55 -0000 1.20.2.9 @@ -122,7 +122,7 @@ */ Set getImagesForGroup(ImageGallery imageGallery, Long sessionId); - ItemRatingDTO getRatingCriteriaDtos(Long contentId, Long imageUid, Long userId); + ItemRatingDTO getRatingCriteriaDtos(Long contentId, Long toolSessionId, Long imageUid, Long userId); /** * Save/update current ImageGalleryItem. Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryOutputFactory.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryOutputFactory.java,v diff -u -r1.7.2.4 -r1.7.2.5 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryOutputFactory.java 11 May 2016 07:15:19 -0000 1.7.2.4 +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryOutputFactory.java 17 May 2017 01:26:55 -0000 1.7.2.5 @@ -211,7 +211,7 @@ boolean isCommentsByOtherUsersRequired = user == null; Long userId = user == null ? -1L : user.getUserId(); - List ratingCriteriaDtos = imageGalleryService.getRatingCriteriaDtos(contentId, itemIds, + List ratingCriteriaDtos = imageGalleryService.getRatingCriteriaDtos(contentId, session.getSessionId(), itemIds, isCommentsByOtherUsersRequired, userId); if (user != null) { Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java,v diff -u -r1.31.2.24 -r1.31.2.25 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java 4 Apr 2017 12:27:05 -0000 1.31.2.24 +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/service/ImageGalleryServiceImpl.java 17 May 2017 01:26:55 -0000 1.31.2.25 @@ -344,19 +344,19 @@ } @Override - public ItemRatingDTO getRatingCriteriaDtos(Long contentId, Long imageUid, Long userId) { + public ItemRatingDTO getRatingCriteriaDtos(Long contentId, Long toolSessionId, Long imageUid, Long userId) { LinkedList itemIds = new LinkedList(); itemIds.add(imageUid); - ItemRatingDTO ratingCriteria = getRatingCriteriaDtos(contentId, itemIds, true, userId).get(0); + ItemRatingDTO ratingCriteria = getRatingCriteriaDtos(contentId, toolSessionId, itemIds, true, userId).get(0); return ratingCriteria; } @Override - public List getRatingCriteriaDtos(Long contentId, Collection itemIds, + public List getRatingCriteriaDtos(Long contentId, Long toolSessionId, Collection itemIds, boolean isCommentsByOtherUsersRequired, Long userId) { - return ratingService.getRatingCriteriaDtos(contentId, itemIds, isCommentsByOtherUsersRequired, userId); + return ratingService.getRatingCriteriaDtos(contentId, toolSessionId, itemIds, isCommentsByOtherUsersRequired, userId); } @Override @@ -411,7 +411,7 @@ final boolean IS_COMMENTS_BY_OTHER_USERS_REQUIRED = true; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!TODO calculate average ratings based on one // session data - itemRatingDtos = getRatingCriteriaDtos(contentId, itemIds, IS_COMMENTS_BY_OTHER_USERS_REQUIRED, + itemRatingDtos = getRatingCriteriaDtos(contentId, session.getSessionId(), itemIds, IS_COMMENTS_BY_OTHER_USERS_REQUIRED, USER_ID); } Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java,v diff -u -r1.27.2.14 -r1.27.2.15 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java 30 Mar 2017 13:35:34 -0000 1.27.2.14 +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/LearningAction.java 17 May 2017 01:26:55 -0000 1.27.2.15 @@ -434,9 +434,11 @@ int commentsMinWordsLimit = 0; boolean isCommentsEnabled = false; int countRatedImages = 0; + Long toolSessionId = (Long) sessionMap.get(ImageGalleryConstants.ATTR_TOOL_SESSION_ID); + if (imageGallery.isAllowRank()) { - ItemRatingDTO itemRatingDto = service.getRatingCriteriaDtos(imageGallery.getContentId(), imageUid, userId); + ItemRatingDTO itemRatingDto = service.getRatingCriteriaDtos(imageGallery.getContentId(), toolSessionId, imageUid, userId); sessionMap.put(AttributeNames.ATTR_ITEM_RATING_DTO, itemRatingDto); if (itemRatingDto != null) { Index: lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java,v diff -u -r1.9.2.7 -r1.9.2.8 --- lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java 30 Mar 2017 13:35:34 -0000 1.9.2.7 +++ lams_tool_images/src/java/org/lamsfoundation/lams/tool/imageGallery/web/action/MonitoringAction.java 17 May 2017 01:26:55 -0000 1.9.2.8 @@ -144,14 +144,15 @@ ImageGallery imageGallery = (ImageGallery) sessionMap.get(ImageGalleryConstants.ATTR_IMAGE_GALLERY); Long imageUid = new Long(request.getParameter(ImageGalleryConstants.PARAM_IMAGE_UID)); ImageGalleryItem image = getImageGalleryService().getImageGalleryItemByUid(imageUid); - + Long toolSessionId = WebUtil.readLongParam(request, ImageGalleryConstants.ATTR_SESSION_MAP_ID); + if (imageGallery.isAllowVote()) { List> imageSummary = getImageGalleryService().getImageSummary(contentId, imageUid); request.setAttribute(ImageGalleryConstants.ATTR_IMAGE_SUMMARY, imageSummary); } else if (imageGallery.isAllowRank()) { - ItemRatingDTO itemRatingDto = getImageGalleryService().getRatingCriteriaDtos(contentId, imageUid, -1L); + ItemRatingDTO itemRatingDto = getImageGalleryService().getRatingCriteriaDtos(contentId, toolSessionId, imageUid, -1L); request.setAttribute("itemRatingDto", itemRatingDto); } Index: lams_tool_images/web/pages/learning/parts/commentsarea.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/learning/parts/commentsarea.jsp,v diff -u -r1.12.2.11 -r1.12.2.12 --- lams_tool_images/web/pages/learning/parts/commentsarea.jsp 28 Mar 2017 10:36:35 -0000 1.12.2.11 +++ lams_tool_images/web/pages/learning/parts/commentsarea.jsp 17 May 2017 01:26:55 -0000 1.12.2.12 @@ -9,6 +9,7 @@ + @@ -26,7 +27,9 @@ COUNT_RATED_ITEMS = ${sessionMap.countRatedItems}, COMMENT_TEXTAREA_TIP_LABEL = '', WARN_COMMENTS_IS_BLANK_LABEL = '', - WARN_MIN_NUMBER_WORDS_LABEL = ''; + WARN_MIN_NUMBER_WORDS_LABEL = '', + ALLOW_RERATE = false, + SESSION_ID = ${toolSessionID}; Index: lams_tool_images/web/pages/monitoring/summary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_images/web/pages/monitoring/summary.jsp,v diff -u -r1.16.2.8 -r1.16.2.9 --- lams_tool_images/web/pages/monitoring/summary.jsp 30 Mar 2017 13:35:34 -0000 1.16.2.8 +++ lams_tool_images/web/pages/monitoring/summary.jsp 17 May 2017 01:26:55 -0000 1.16.2.9 @@ -94,7 +94,7 @@ ${image.thumbnailFileUuid}&preferDownload=false - ?sessionMapID=${sessionMapID}&imageUid=${image.uid}&KeepThis=true&TB_iframe=true&modal=true + ?sessionMapID=${sessionMapID}&imageUid=${image.uid}&KeepThis=true&TB_iframe=true&modal=true&toolSessionID=${sessionId} Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java,v diff -u -r1.111.2.32 -r1.111.2.33 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 4 Apr 2017 12:27:07 -0000 1.111.2.32 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/service/QaServicePOJO.java 17 May 2017 01:27:07 -0000 1.111.2.33 @@ -863,9 +863,9 @@ } @Override - public List getRatingCriteriaDtos(Long contentId, Collection itemIds, + public List getRatingCriteriaDtos(Long contentId, Long toolSessionId, Collection itemIds, boolean isCommentsByOtherUsersRequired, Long userId) { - return ratingService.getRatingCriteriaDtos(contentId, itemIds, isCommentsByOtherUsersRequired, userId); + return ratingService.getRatingCriteriaDtos(contentId, toolSessionId, itemIds, isCommentsByOtherUsersRequired, userId); } @Override Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java,v diff -u -r1.53.2.30 -r1.53.2.31 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 25 Apr 2017 01:10:57 -0000 1.53.2.30 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningAction.java 17 May 2017 01:27:07 -0000 1.53.2.31 @@ -374,7 +374,7 @@ generalLearnerFlowDTO.setHttpSessionID(httpSessionID); /** Set up the data for the view all answers screen */ - QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, httpSessionID, user, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, QaLearningAction.qaService, httpSessionID, user, generalLearnerFlowDTO); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); @@ -456,7 +456,7 @@ qaLearningForm.resetUserActions(); qaLearningForm.setSubmitAnswersContent(null); - QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, httpSessionID, user, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, QaLearningAction.qaService, httpSessionID, user, generalLearnerFlowDTO); generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); @@ -798,7 +798,7 @@ generalLearnerFlowDTO.setNotebookEntry(entryText); generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); - QaLearningAction.refreshSummaryData(request, qaContent, QaLearningAction.qaService, httpSessionID, qaQueUsr, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, QaLearningAction.qaService, httpSessionID, qaQueUsr, generalLearnerFlowDTO); boolean isLearnerFinished = qaQueUsr.isLearnerFinished(); @@ -928,7 +928,7 @@ * User id is needed if isUserNamesVisible is false && learnerRequest is true, as it is required to work out if the * data being analysed is the current user. */ - public static void refreshSummaryData(HttpServletRequest request, QaContent qaContent, IQaService qaService, + public static void refreshSummaryData(HttpServletRequest request, QaContent qaContent, QaSession qaSession, IQaService qaService, String httpSessionID, QaQueUsr user, GeneralLearnerFlowDTO generalLearnerFlowDTO) { SessionMap sessionMap = (SessionMap) request.getSession() @@ -963,7 +963,7 @@ itemIds.add(responseIter.getResponseId()); } - List itemRatingDtos = qaService.getRatingCriteriaDtos(qaContent.getQaContentId(), itemIds, + List itemRatingDtos = qaService.getRatingCriteriaDtos(qaContent.getQaContentId(), qaSession.getQaSessionId(), itemIds, true, userId); sessionMap.put(AttributeNames.ATTR_ITEM_RATING_DTOS, itemRatingDtos); @@ -991,6 +991,9 @@ countRatedQuestions = qaService.getCountItemsRatedByUser(qaContent.getQaContentId(), userId.intValue()); } } + + request.setAttribute(TOOL_SESSION_ID, qaSession.getQaSessionId()); + sessionMap.put("commentsMinWordsLimit", commentsMinWordsLimit); sessionMap.put("isCommentsEnabled", isCommentsEnabled); sessionMap.put(AttributeNames.ATTR_COUNT_RATED_ITEMS, countRatedQuestions); @@ -1010,7 +1013,7 @@ HttpSession ss = SessionManager.getSession(); UserDTO userDto = (UserDTO) ss.getAttribute(AttributeNames.USER); TimeZone userTimeZone = userDto.getTimeZone(); - + boolean isAllowRateAnswers = WebUtil.readBooleanParam(request, "isAllowRateAnswers"); boolean isAllowRichEditor = WebUtil.readBooleanParam(request, "isAllowRichEditor"); boolean isOnlyLeadersIncluded = WebUtil.readBooleanParam(request, "isOnlyLeadersIncluded", false); @@ -1064,7 +1067,7 @@ //all comments required only for monitoring boolean isCommentsByOtherUsersRequired = isMonitoring; - itemRatingDtos = QaLearningAction.qaService.getRatingCriteriaDtos(qaContentId, itemIds, + itemRatingDtos = QaLearningAction.qaService.getRatingCriteriaDtos(qaContentId, qaSessionId, itemIds, isCommentsByOtherUsersRequired, userId); // store how many items are rated Index: lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java,v diff -u -r1.86.2.13 -r1.86.2.14 --- lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 17 Nov 2016 11:44:50 -0000 1.86.2.13 +++ lams_tool_laqa/src/java/org/lamsfoundation/lams/tool/qa/web/QaLearningStarterAction.java 17 May 2017 01:27:07 -0000 1.86.2.14 @@ -272,7 +272,7 @@ generalLearnerFlowDTO.setRequestLearningReportProgress(new Boolean(true).toString()); generalLearnerFlowDTO.setTeacherViewOnly(new Boolean(true).toString()); - QaLearningAction.refreshSummaryData(request, qaContent, qaService, sessionMapId, user, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); request.setAttribute(QaAppConstants.GENERAL_LEARNER_FLOW_DTO, generalLearnerFlowDTO); @@ -306,7 +306,7 @@ */ generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - QaLearningAction.refreshSummaryData(request, qaContent, qaService, sessionMapId, user, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); if (user.isLearnerFinished()) { @@ -357,7 +357,7 @@ */ generalLearnerFlowDTO.setRequestLearningReport(new Boolean(true).toString()); - QaLearningAction.refreshSummaryData(request, qaContent, qaService, sessionMapId, user, + QaLearningAction.refreshSummaryData(request, qaContent, qaSession, qaService, sessionMapId, user, generalLearnerFlowDTO); if (user.isLearnerFinished()) { Index: lams_tool_laqa/web/learning/LearnerRep.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/LearnerRep.jsp,v diff -u -r1.53.2.22 -r1.53.2.23 --- lams_tool_laqa/web/learning/LearnerRep.jsp 16 Feb 2017 04:10:15 -0000 1.53.2.22 +++ lams_tool_laqa/web/learning/LearnerRep.jsp 17 May 2017 01:27:07 -0000 1.53.2.23 @@ -35,7 +35,9 @@ COUNT_RATED_ITEMS = ${sessionMap.countRatedItems}, COMMENT_TEXTAREA_TIP_LABEL = '', WARN_COMMENTS_IS_BLANK_LABEL = '', - WARN_MIN_NUMBER_WORDS_LABEL = ""; + WARN_MIN_NUMBER_WORDS_LABEL = "", + ALLOW_RERATE = false, + SESSION_ID = ${toolSessionID}; Index: lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp,v diff -u -r1.32.2.22 -r1.32.2.23 --- lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 16 Feb 2017 04:10:15 -0000 1.32.2.22 +++ lams_tool_laqa/web/learning/RevisitedLearnerRep.jsp 17 May 2017 01:27:07 -0000 1.32.2.23 @@ -24,6 +24,7 @@ + - Index: lams_tool_larsrc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/rsrc/model/Resource.hbm.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/rsrc/model/Attic/Resource.hbm.xml,v diff -u -r1.1.2.2 -r1.1.2.3 --- lams_tool_larsrc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/rsrc/model/Resource.hbm.xml 7 Mar 2017 06:07:36 -0000 1.1.2.2 +++ lams_tool_larsrc/conf/hibernate/mappings/org/lamsfoundation/lams/tool/rsrc/model/Resource.hbm.xml 17 May 2017 01:27:00 -0000 1.1.2.3 @@ -185,6 +185,25 @@ column="file_upload_notify" /> + + + + + + + Index: lams_tool_larsrc/web/pages/authoring/parts/addlearningobject.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/addlearningobject.jsp,v diff -u -r1.18.2.9 -r1.18.2.10 --- lams_tool_larsrc/web/pages/authoring/parts/addlearningobject.jsp 6 Mar 2017 11:21:54 -0000 1.18.2.9 +++ lams_tool_larsrc/web/pages/authoring/parts/addlearningobject.jsp 17 May 2017 01:27:00 -0000 1.18.2.10 @@ -93,6 +93,11 @@ +
+ +   +
+ Index: lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp,v diff -u -r1.24.2.10 -r1.24.2.11 --- lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp 6 Mar 2017 11:21:54 -0000 1.24.2.10 +++ lams_tool_larsrc/web/pages/authoring/parts/addurl.jsp 17 May 2017 01:27:00 -0000 1.24.2.11 @@ -59,8 +59,13 @@
: -
+
+ +   + + +  
Index: lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp,v diff -u -r1.18.2.9 -r1.18.2.10 --- lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp 6 Mar 2017 11:21:54 -0000 1.18.2.9 +++ lams_tool_larsrc/web/pages/authoring/parts/addwebsite.jsp 17 May 2017 01:27:00 -0000 1.18.2.10 @@ -94,6 +94,11 @@ +
+ +   +
+ Index: lams_tool_larsrc/web/pages/learning/learning.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/learning/learning.jsp,v diff -u -r1.53.2.9 -r1.53.2.10 --- lams_tool_larsrc/web/pages/learning/learning.jsp 1 Mar 2017 00:29:02 -0000 1.53.2.9 +++ lams_tool_larsrc/web/pages/learning/learning.jsp 17 May 2017 01:27:00 -0000 1.53.2.10 @@ -9,6 +9,7 @@ <fmt:message key="label.learning.title" /> <%@ include file="/common/header.jsp"%> + <%-- param has higher level for request attribute --%> @@ -25,11 +26,31 @@ - + + + + + - + var reqIDVar = new Date(); + document.location.href = '?mode=${mode}&toolSessionID=${toolSessionID}&reqID='+reqIDVar.getTime(); +
- \ No newline at end of file Index: lams_tool_larsrc/web/pages/monitoring/summary.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/monitoring/summary.jsp,v diff -u -r1.23.2.4 -r1.23.2.5 --- lams_tool_larsrc/web/pages/monitoring/summary.jsp 1 Mar 2017 00:29:02 -0000 1.23.2.4 +++ lams_tool_larsrc/web/pages/monitoring/summary.jsp 17 May 2017 01:27:00 -0000 1.23.2.5 @@ -3,7 +3,8 @@ - + + + + + +